1bf215546Sopenharmony_ci# Copyright © 2017 Intel Corporation 2bf215546Sopenharmony_ci 3bf215546Sopenharmony_ci# Permission is hereby granted, free of charge, to any person obtaining a copy 4bf215546Sopenharmony_ci# of this software and associated documentation files (the "Software"), to deal 5bf215546Sopenharmony_ci# in the Software without restriction, including without limitation the rights 6bf215546Sopenharmony_ci# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7bf215546Sopenharmony_ci# copies of the Software, and to permit persons to whom the Software is 8bf215546Sopenharmony_ci# furnished to do so, subject to the following conditions: 9bf215546Sopenharmony_ci 10bf215546Sopenharmony_ci# The above copyright notice and this permission notice shall be included in 11bf215546Sopenharmony_ci# all copies or substantial portions of the Software. 12bf215546Sopenharmony_ci 13bf215546Sopenharmony_ci# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14bf215546Sopenharmony_ci# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15bf215546Sopenharmony_ci# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16bf215546Sopenharmony_ci# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17bf215546Sopenharmony_ci# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18bf215546Sopenharmony_ci# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19bf215546Sopenharmony_ci# SOFTWARE. 20bf215546Sopenharmony_ci 21bf215546Sopenharmony_cifiles_r300 = files( 22bf215546Sopenharmony_ci 'r300_blit.c', 23bf215546Sopenharmony_ci 'r300_cb.h', 24bf215546Sopenharmony_ci 'r300_chipset.c', 25bf215546Sopenharmony_ci 'r300_chipset.h', 26bf215546Sopenharmony_ci 'r300_context.c', 27bf215546Sopenharmony_ci 'r300_context.h', 28bf215546Sopenharmony_ci 'r300_cs.h', 29bf215546Sopenharmony_ci 'r300_debug.c', 30bf215546Sopenharmony_ci 'r300_defines.h', 31bf215546Sopenharmony_ci 'r300_emit.c', 32bf215546Sopenharmony_ci 'r300_emit.h', 33bf215546Sopenharmony_ci 'r300_flush.c', 34bf215546Sopenharmony_ci 'r300_fs.c', 35bf215546Sopenharmony_ci 'r300_fs.h', 36bf215546Sopenharmony_ci 'r300_hyperz.c', 37bf215546Sopenharmony_ci 'r300_public.h', 38bf215546Sopenharmony_ci 'r300_query.c', 39bf215546Sopenharmony_ci 'r300_reg.h', 40bf215546Sopenharmony_ci 'r300_render.c', 41bf215546Sopenharmony_ci 'r300_render_stencilref.c', 42bf215546Sopenharmony_ci 'r300_render_translate.c', 43bf215546Sopenharmony_ci 'r300_resource.c', 44bf215546Sopenharmony_ci 'r300_screen_buffer.c', 45bf215546Sopenharmony_ci 'r300_screen_buffer.h', 46bf215546Sopenharmony_ci 'r300_screen.c', 47bf215546Sopenharmony_ci 'r300_screen.h', 48bf215546Sopenharmony_ci 'r300_shader_semantics.h', 49bf215546Sopenharmony_ci 'r300_state.c', 50bf215546Sopenharmony_ci 'r300_state_derived.c', 51bf215546Sopenharmony_ci 'r300_state_inlines.h', 52bf215546Sopenharmony_ci 'r300_texture.c', 53bf215546Sopenharmony_ci 'r300_texture_desc.c', 54bf215546Sopenharmony_ci 'r300_texture_desc.h', 55bf215546Sopenharmony_ci 'r300_texture.h', 56bf215546Sopenharmony_ci 'r300_tgsi_to_rc.c', 57bf215546Sopenharmony_ci 'r300_tgsi_to_rc.h', 58bf215546Sopenharmony_ci 'r300_transfer.c', 59bf215546Sopenharmony_ci 'r300_transfer.h', 60bf215546Sopenharmony_ci 'r300_vs.c', 61bf215546Sopenharmony_ci 'r300_vs_draw.c', 62bf215546Sopenharmony_ci 'r300_vs.h', 63bf215546Sopenharmony_ci 'compiler/memory_pool.c', 64bf215546Sopenharmony_ci 'compiler/memory_pool.h', 65bf215546Sopenharmony_ci 'compiler/r300_fragprog.c', 66bf215546Sopenharmony_ci 'compiler/r300_fragprog_emit.c', 67bf215546Sopenharmony_ci 'compiler/r300_fragprog.h', 68bf215546Sopenharmony_ci 'compiler/r300_fragprog_swizzle.c', 69bf215546Sopenharmony_ci 'compiler/r300_fragprog_swizzle.h', 70bf215546Sopenharmony_ci 'compiler/r3xx_fragprog.c', 71bf215546Sopenharmony_ci 'compiler/r3xx_vertprog.c', 72bf215546Sopenharmony_ci 'compiler/r3xx_vertprog_dump.c', 73bf215546Sopenharmony_ci 'compiler/r500_fragprog.c', 74bf215546Sopenharmony_ci 'compiler/r500_fragprog_emit.c', 75bf215546Sopenharmony_ci 'compiler/r500_fragprog.h', 76bf215546Sopenharmony_ci 'compiler/radeon_code.c', 77bf215546Sopenharmony_ci 'compiler/radeon_code.h', 78bf215546Sopenharmony_ci 'compiler/radeon_compiler.c', 79bf215546Sopenharmony_ci 'compiler/radeon_compiler.h', 80bf215546Sopenharmony_ci 'compiler/radeon_compiler_util.c', 81bf215546Sopenharmony_ci 'compiler/radeon_compiler_util.h', 82bf215546Sopenharmony_ci 'compiler/radeon_dataflow.c', 83bf215546Sopenharmony_ci 'compiler/radeon_dataflow_deadcode.c', 84bf215546Sopenharmony_ci 'compiler/radeon_dataflow.h', 85bf215546Sopenharmony_ci 'compiler/radeon_dataflow_swizzles.c', 86bf215546Sopenharmony_ci 'compiler/radeon_emulate_branches.c', 87bf215546Sopenharmony_ci 'compiler/radeon_emulate_branches.h', 88bf215546Sopenharmony_ci 'compiler/radeon_inline_literals.c', 89bf215546Sopenharmony_ci 'compiler/radeon_list.c', 90bf215546Sopenharmony_ci 'compiler/radeon_list.h', 91bf215546Sopenharmony_ci 'compiler/radeon_opcodes.c', 92bf215546Sopenharmony_ci 'compiler/radeon_opcodes.h', 93bf215546Sopenharmony_ci 'compiler/radeon_optimize.c', 94bf215546Sopenharmony_ci 'compiler/radeon_pair_dead_sources.c', 95bf215546Sopenharmony_ci 'compiler/radeon_pair_regalloc.c', 96bf215546Sopenharmony_ci 'compiler/radeon_pair_schedule.c', 97bf215546Sopenharmony_ci 'compiler/radeon_pair_translate.c', 98bf215546Sopenharmony_ci 'compiler/radeon_program_alu.c', 99bf215546Sopenharmony_ci 'compiler/radeon_program_alu.h', 100bf215546Sopenharmony_ci 'compiler/radeon_program.c', 101bf215546Sopenharmony_ci 'compiler/radeon_program_constants.h', 102bf215546Sopenharmony_ci 'compiler/radeon_program.h', 103bf215546Sopenharmony_ci 'compiler/radeon_program_pair.c', 104bf215546Sopenharmony_ci 'compiler/radeon_program_pair.h', 105bf215546Sopenharmony_ci 'compiler/radeon_program_print.c', 106bf215546Sopenharmony_ci 'compiler/radeon_program_tex.c', 107bf215546Sopenharmony_ci 'compiler/radeon_program_tex.h', 108bf215546Sopenharmony_ci 'compiler/radeon_regalloc.h', 109bf215546Sopenharmony_ci 'compiler/radeon_remove_constants.c', 110bf215546Sopenharmony_ci 'compiler/radeon_remove_constants.h', 111bf215546Sopenharmony_ci 'compiler/radeon_rename_regs.c', 112bf215546Sopenharmony_ci 'compiler/radeon_rename_regs.h', 113bf215546Sopenharmony_ci 'compiler/radeon_swizzle.h', 114bf215546Sopenharmony_ci 'compiler/radeon_variable.c', 115bf215546Sopenharmony_ci 'compiler/radeon_variable.h', 116bf215546Sopenharmony_ci 'compiler/radeon_vert_fc.c', 117bf215546Sopenharmony_ci) 118bf215546Sopenharmony_ci 119bf215546Sopenharmony_cir300_nir_algebraic_c = custom_target( 120bf215546Sopenharmony_ci 'r300_nir_algebraic.c', 121bf215546Sopenharmony_ci input : 'compiler/r300_nir_algebraic.py', 122bf215546Sopenharmony_ci output : 'r300_nir_algebraic.c', 123bf215546Sopenharmony_ci command : [ 124bf215546Sopenharmony_ci prog_python, '@INPUT@', 125bf215546Sopenharmony_ci '-p', join_paths(meson.source_root(), 'src/compiler/nir/'), 126bf215546Sopenharmony_ci '@OUTPUT@', 127bf215546Sopenharmony_ci ], 128bf215546Sopenharmony_ci depend_files : nir_algebraic_depends, 129bf215546Sopenharmony_ci) 130bf215546Sopenharmony_ci 131bf215546Sopenharmony_cilibr300 = static_library( 132bf215546Sopenharmony_ci 'r300', 133bf215546Sopenharmony_ci files_r300, r300_nir_algebraic_c, 134bf215546Sopenharmony_ci include_directories : [ 135bf215546Sopenharmony_ci inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers, 136bf215546Sopenharmony_ci inc_mesa, 137bf215546Sopenharmony_ci ], 138bf215546Sopenharmony_ci gnu_symbol_visibility : 'hidden', 139bf215546Sopenharmony_ci dependencies : [dep_libdrm_radeon, dep_llvm, idep_mesautil, idep_nir], 140bf215546Sopenharmony_ci) 141bf215546Sopenharmony_ci 142bf215546Sopenharmony_cidriver_r300 = declare_dependency( 143bf215546Sopenharmony_ci compile_args : '-DGALLIUM_R300', 144bf215546Sopenharmony_ci link_with : [libr300, libradeonwinsys], 145bf215546Sopenharmony_ci) 146bf215546Sopenharmony_ci 147bf215546Sopenharmony_ciif with_tests 148bf215546Sopenharmony_ci test( 149bf215546Sopenharmony_ci 'r300_compiler_test', 150bf215546Sopenharmony_ci executable( 151bf215546Sopenharmony_ci 'r300_compiler_test', 152bf215546Sopenharmony_ci files( 153bf215546Sopenharmony_ci 'compiler/tests/r300_compiler_tests.c', 154bf215546Sopenharmony_ci 'compiler/tests/radeon_compiler_optimize_tests.c', 155bf215546Sopenharmony_ci 'compiler/tests/radeon_compiler_regalloc_tests.c', 156bf215546Sopenharmony_ci 'compiler/tests/radeon_compiler_util_tests.c', 157bf215546Sopenharmony_ci 'compiler/tests/rc_test_helpers.c', 158bf215546Sopenharmony_ci 'compiler/tests/unit_test.c', 159bf215546Sopenharmony_ci ), 160bf215546Sopenharmony_ci c_args : [ 161bf215546Sopenharmony_ci '-DTEST_PATH="@0@"'.format( 162bf215546Sopenharmony_ci join_paths(meson.current_source_dir(), 'compiler', 'tests') 163bf215546Sopenharmony_ci ) 164bf215546Sopenharmony_ci ], 165bf215546Sopenharmony_ci include_directories : [ 166bf215546Sopenharmony_ci inc_src, inc_include, inc_gallium, inc_gallium_aux, 167bf215546Sopenharmony_ci include_directories('compiler'), 168bf215546Sopenharmony_ci ], 169bf215546Sopenharmony_ci link_with : [libr300, libgallium], 170bf215546Sopenharmony_ci dependencies : [dep_m, dep_clock, dep_dl, dep_unwind, idep_mesautil], 171bf215546Sopenharmony_ci ), 172bf215546Sopenharmony_ci suite : ['r300'], 173bf215546Sopenharmony_ci ) 174bf215546Sopenharmony_ciendif 175