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_cilibintel_compiler_files = files( 22bf215546Sopenharmony_ci 'brw_cfg.cpp', 23bf215546Sopenharmony_ci 'brw_cfg.h', 24bf215546Sopenharmony_ci 'brw_clip.h', 25bf215546Sopenharmony_ci 'brw_clip_line.c', 26bf215546Sopenharmony_ci 'brw_clip_point.c', 27bf215546Sopenharmony_ci 'brw_clip_tri.c', 28bf215546Sopenharmony_ci 'brw_clip_unfilled.c', 29bf215546Sopenharmony_ci 'brw_clip_util.c', 30bf215546Sopenharmony_ci 'brw_compile_clip.c', 31bf215546Sopenharmony_ci 'brw_compile_ff_gs.c', 32bf215546Sopenharmony_ci 'brw_compile_sf.c', 33bf215546Sopenharmony_ci 'brw_compiler.c', 34bf215546Sopenharmony_ci 'brw_compiler.h', 35bf215546Sopenharmony_ci 'brw_dead_control_flow.cpp', 36bf215546Sopenharmony_ci 'brw_dead_control_flow.h', 37bf215546Sopenharmony_ci 'brw_debug_recompile.c', 38bf215546Sopenharmony_ci 'brw_disasm.c', 39bf215546Sopenharmony_ci 'brw_disasm_info.c', 40bf215546Sopenharmony_ci 'brw_disasm_info.h', 41bf215546Sopenharmony_ci 'brw_eu.c', 42bf215546Sopenharmony_ci 'brw_eu_compact.c', 43bf215546Sopenharmony_ci 'brw_eu_defines.h', 44bf215546Sopenharmony_ci 'brw_eu_emit.c', 45bf215546Sopenharmony_ci 'brw_eu.h', 46bf215546Sopenharmony_ci 'brw_eu_util.c', 47bf215546Sopenharmony_ci 'brw_eu_validate.c', 48bf215546Sopenharmony_ci 'brw_fs_bank_conflicts.cpp', 49bf215546Sopenharmony_ci 'brw_fs_builder.h', 50bf215546Sopenharmony_ci 'brw_fs_cmod_propagation.cpp', 51bf215546Sopenharmony_ci 'brw_fs_combine_constants.cpp', 52bf215546Sopenharmony_ci 'brw_fs_copy_propagation.cpp', 53bf215546Sopenharmony_ci 'brw_fs.cpp', 54bf215546Sopenharmony_ci 'brw_fs_cse.cpp', 55bf215546Sopenharmony_ci 'brw_fs_dead_code_eliminate.cpp', 56bf215546Sopenharmony_ci 'brw_fs_generator.cpp', 57bf215546Sopenharmony_ci 'brw_fs.h', 58bf215546Sopenharmony_ci 'brw_fs_live_variables.cpp', 59bf215546Sopenharmony_ci 'brw_fs_live_variables.h', 60bf215546Sopenharmony_ci 'brw_fs_lower_pack.cpp', 61bf215546Sopenharmony_ci 'brw_fs_lower_regioning.cpp', 62bf215546Sopenharmony_ci 'brw_fs_nir.cpp', 63bf215546Sopenharmony_ci 'brw_fs_reg_allocate.cpp', 64bf215546Sopenharmony_ci 'brw_fs_register_coalesce.cpp', 65bf215546Sopenharmony_ci 'brw_fs_saturate_propagation.cpp', 66bf215546Sopenharmony_ci 'brw_fs_scoreboard.cpp', 67bf215546Sopenharmony_ci 'brw_fs_sel_peephole.cpp', 68bf215546Sopenharmony_ci 'brw_fs_validate.cpp', 69bf215546Sopenharmony_ci 'brw_fs_visitor.cpp', 70bf215546Sopenharmony_ci 'brw_inst.h', 71bf215546Sopenharmony_ci 'brw_interpolation_map.c', 72bf215546Sopenharmony_ci 'brw_ir.h', 73bf215546Sopenharmony_ci 'brw_ir_allocator.h', 74bf215546Sopenharmony_ci 'brw_ir_analysis.h', 75bf215546Sopenharmony_ci 'brw_ir_fs.h', 76bf215546Sopenharmony_ci 'brw_ir_performance.h', 77bf215546Sopenharmony_ci 'brw_ir_performance.cpp', 78bf215546Sopenharmony_ci 'brw_ir_vec4.h', 79bf215546Sopenharmony_ci 'brw_isa_info.h', 80bf215546Sopenharmony_ci 'brw_kernel.c', 81bf215546Sopenharmony_ci 'brw_lower_logical_sends.cpp', 82bf215546Sopenharmony_ci 'brw_mesh.cpp', 83bf215546Sopenharmony_ci 'brw_nir.h', 84bf215546Sopenharmony_ci 'brw_nir.c', 85bf215546Sopenharmony_ci 'brw_nir_analyze_boolean_resolves.c', 86bf215546Sopenharmony_ci 'brw_nir_analyze_ubo_ranges.c', 87bf215546Sopenharmony_ci 'brw_nir_attribute_workarounds.c', 88bf215546Sopenharmony_ci 'brw_nir_lower_conversions.c', 89bf215546Sopenharmony_ci 'brw_nir_lower_cs_intrinsics.c', 90bf215546Sopenharmony_ci 'brw_nir_lower_alpha_to_coverage.c', 91bf215546Sopenharmony_ci 'brw_nir_lower_intersection_shader.c', 92bf215546Sopenharmony_ci 'brw_nir_lower_mem_access_bit_sizes.c', 93bf215546Sopenharmony_ci 'brw_nir_lower_ray_queries.c', 94bf215546Sopenharmony_ci 'brw_nir_lower_rt_intrinsics.c', 95bf215546Sopenharmony_ci 'brw_nir_lower_scoped_barriers.c', 96bf215546Sopenharmony_ci 'brw_nir_lower_shader_calls.c', 97bf215546Sopenharmony_ci 'brw_nir_lower_shading_rate_output.c', 98bf215546Sopenharmony_ci 'brw_nir_lower_storage_image.c', 99bf215546Sopenharmony_ci 'brw_nir_opt_peephole_ffma.c', 100bf215546Sopenharmony_ci 'brw_nir_rt.h', 101bf215546Sopenharmony_ci 'brw_nir_rt.c', 102bf215546Sopenharmony_ci 'brw_nir_rt_builder.h', 103bf215546Sopenharmony_ci 'brw_nir_tcs_workarounds.c', 104bf215546Sopenharmony_ci 'brw_nir_clamp_image_1d_2d_array_sizes.c', 105bf215546Sopenharmony_ci 'brw_packed_float.c', 106bf215546Sopenharmony_ci 'brw_predicated_break.cpp', 107bf215546Sopenharmony_ci 'brw_prim.h', 108bf215546Sopenharmony_ci 'brw_private.h', 109bf215546Sopenharmony_ci 'brw_reg.h', 110bf215546Sopenharmony_ci 'brw_reg_type.c', 111bf215546Sopenharmony_ci 'brw_reg_type.h', 112bf215546Sopenharmony_ci 'brw_rt.h', 113bf215546Sopenharmony_ci 'brw_schedule_instructions.cpp', 114bf215546Sopenharmony_ci 'brw_shader.cpp', 115bf215546Sopenharmony_ci 'brw_shader.h', 116bf215546Sopenharmony_ci 'brw_simd_selection.c', 117bf215546Sopenharmony_ci 'brw_vec4_builder.h', 118bf215546Sopenharmony_ci 'brw_vec4_cmod_propagation.cpp', 119bf215546Sopenharmony_ci 'brw_vec4_copy_propagation.cpp', 120bf215546Sopenharmony_ci 'brw_vec4.cpp', 121bf215546Sopenharmony_ci 'brw_vec4_cse.cpp', 122bf215546Sopenharmony_ci 'brw_vec4_dead_code_eliminate.cpp', 123bf215546Sopenharmony_ci 'brw_vec4_generator.cpp', 124bf215546Sopenharmony_ci 'brw_vec4_gs_visitor.cpp', 125bf215546Sopenharmony_ci 'brw_vec4_gs_visitor.h', 126bf215546Sopenharmony_ci 'brw_vec4.h', 127bf215546Sopenharmony_ci 'brw_vec4_live_variables.cpp', 128bf215546Sopenharmony_ci 'brw_vec4_live_variables.h', 129bf215546Sopenharmony_ci 'brw_vec4_nir.cpp', 130bf215546Sopenharmony_ci 'brw_vec4_gs_nir.cpp', 131bf215546Sopenharmony_ci 'brw_vec4_reg_allocate.cpp', 132bf215546Sopenharmony_ci 'brw_vec4_surface_builder.cpp', 133bf215546Sopenharmony_ci 'brw_vec4_surface_builder.h', 134bf215546Sopenharmony_ci 'brw_vec4_tcs.cpp', 135bf215546Sopenharmony_ci 'brw_vec4_tcs.h', 136bf215546Sopenharmony_ci 'brw_vec4_tes.cpp', 137bf215546Sopenharmony_ci 'brw_vec4_tes.h', 138bf215546Sopenharmony_ci 'brw_vec4_visitor.cpp', 139bf215546Sopenharmony_ci 'brw_vec4_vs_visitor.cpp', 140bf215546Sopenharmony_ci 'brw_vec4_vs.h', 141bf215546Sopenharmony_ci 'brw_vue_map.c', 142bf215546Sopenharmony_ci 'brw_wm_iz.cpp', 143bf215546Sopenharmony_ci 'gfx6_gs_visitor.cpp', 144bf215546Sopenharmony_ci 'gfx6_gs_visitor.h', 145bf215546Sopenharmony_ci) 146bf215546Sopenharmony_ci 147bf215546Sopenharmony_cibrw_nir_trig = custom_target( 148bf215546Sopenharmony_ci 'brw_nir_trig_workarounds.c', 149bf215546Sopenharmony_ci input : 'brw_nir_trig_workarounds.py', 150bf215546Sopenharmony_ci output : 'brw_nir_trig_workarounds.c', 151bf215546Sopenharmony_ci command : [ 152bf215546Sopenharmony_ci prog_python, '@INPUT@', 153bf215546Sopenharmony_ci '-p', join_paths(meson.source_root(), 'src/compiler/nir/'), 154bf215546Sopenharmony_ci ], 155bf215546Sopenharmony_ci depend_files : nir_algebraic_depends, 156bf215546Sopenharmony_ci capture : true, 157bf215546Sopenharmony_ci) 158bf215546Sopenharmony_ci 159bf215546Sopenharmony_cilibintel_compiler = static_library( 160bf215546Sopenharmony_ci 'intel_compiler', 161bf215546Sopenharmony_ci [libintel_compiler_files, brw_nir_trig, ir_expression_operation_h], 162bf215546Sopenharmony_ci include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel], 163bf215546Sopenharmony_ci c_args : [no_override_init_args], 164bf215546Sopenharmony_ci gnu_symbol_visibility : 'hidden', 165bf215546Sopenharmony_ci dependencies : [idep_nir_headers, idep_mesautil], 166bf215546Sopenharmony_ci build_by_default : false, 167bf215546Sopenharmony_ci) 168bf215546Sopenharmony_ci 169bf215546Sopenharmony_ci# For now this tool is only going to be used by Anv 170bf215546Sopenharmony_ciif with_intel_clc 171bf215546Sopenharmony_ci prog_intel_clc = executable( 172bf215546Sopenharmony_ci 'intel_clc', 173bf215546Sopenharmony_ci ['intel_clc.c'], 174bf215546Sopenharmony_ci link_with : [ 175bf215546Sopenharmony_ci libintel_compiler, libintel_common, libintel_dev, libisl, 176bf215546Sopenharmony_ci ], 177bf215546Sopenharmony_ci include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel], 178bf215546Sopenharmony_ci c_args : [pre_args, no_override_init_args], 179bf215546Sopenharmony_ci dependencies : [idep_nir, idep_clc, idep_mesautil], 180bf215546Sopenharmony_ci native : true, 181bf215546Sopenharmony_ci ) 182bf215546Sopenharmony_ciendif 183bf215546Sopenharmony_ci 184bf215546Sopenharmony_ciif with_tests 185bf215546Sopenharmony_ci test( 186bf215546Sopenharmony_ci 'intel_compiler_tests', 187bf215546Sopenharmony_ci executable( 188bf215546Sopenharmony_ci 'intel_compiler_tests', 189bf215546Sopenharmony_ci files( 190bf215546Sopenharmony_ci 'test_eu_compact.cpp', 191bf215546Sopenharmony_ci 'test_eu_validate.cpp', 192bf215546Sopenharmony_ci 'test_fs_cmod_propagation.cpp', 193bf215546Sopenharmony_ci 'test_fs_copy_propagation.cpp', 194bf215546Sopenharmony_ci 'test_fs_saturate_propagation.cpp', 195bf215546Sopenharmony_ci 'test_fs_scoreboard.cpp', 196bf215546Sopenharmony_ci 'test_simd_selection.cpp', 197bf215546Sopenharmony_ci 'test_vec4_cmod_propagation.cpp', 198bf215546Sopenharmony_ci 'test_vec4_copy_propagation.cpp', 199bf215546Sopenharmony_ci 'test_vec4_dead_code_eliminate.cpp', 200bf215546Sopenharmony_ci 'test_vec4_register_coalesce.cpp', 201bf215546Sopenharmony_ci 'test_vf_float_conversions.cpp', 202bf215546Sopenharmony_ci ), 203bf215546Sopenharmony_ci ir_expression_operation_h, 204bf215546Sopenharmony_ci include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel], 205bf215546Sopenharmony_ci link_with : [ 206bf215546Sopenharmony_ci libintel_compiler, libintel_common, libintel_dev, libisl, 207bf215546Sopenharmony_ci ], 208bf215546Sopenharmony_ci dependencies : [idep_gtest, idep_nir, idep_mesautil], 209bf215546Sopenharmony_ci ), 210bf215546Sopenharmony_ci suite : ['intel'], 211bf215546Sopenharmony_ci protocol : gtest_test_protocol, 212bf215546Sopenharmony_ci ) 213bf215546Sopenharmony_ciendif 214