1# Copyright © 2017 Intel Corporation 2 3# Permission is hereby granted, free of charge, to any person obtaining a copy 4# of this software and associated documentation files (the "Software"), to deal 5# in the Software without restriction, including without limitation the rights 6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7# copies of the Software, and to permit persons to whom the Software is 8# furnished to do so, subject to the following conditions: 9 10# The above copyright notice and this permission notice shall be included in 11# all copies or substantial portions of the Software. 12 13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19# SOFTWARE. 20 21libintel_compiler_files = files( 22 'brw_cfg.cpp', 23 'brw_cfg.h', 24 'brw_clip.h', 25 'brw_clip_line.c', 26 'brw_clip_point.c', 27 'brw_clip_tri.c', 28 'brw_clip_unfilled.c', 29 'brw_clip_util.c', 30 'brw_compile_clip.c', 31 'brw_compile_ff_gs.c', 32 'brw_compile_sf.c', 33 'brw_compiler.c', 34 'brw_compiler.h', 35 'brw_dead_control_flow.cpp', 36 'brw_dead_control_flow.h', 37 'brw_debug_recompile.c', 38 'brw_disasm.c', 39 'brw_disasm_info.c', 40 'brw_disasm_info.h', 41 'brw_eu.c', 42 'brw_eu_compact.c', 43 'brw_eu_defines.h', 44 'brw_eu_emit.c', 45 'brw_eu.h', 46 'brw_eu_util.c', 47 'brw_eu_validate.c', 48 'brw_fs_bank_conflicts.cpp', 49 'brw_fs_builder.h', 50 'brw_fs_cmod_propagation.cpp', 51 'brw_fs_combine_constants.cpp', 52 'brw_fs_copy_propagation.cpp', 53 'brw_fs.cpp', 54 'brw_fs_cse.cpp', 55 'brw_fs_dead_code_eliminate.cpp', 56 'brw_fs_generator.cpp', 57 'brw_fs.h', 58 'brw_fs_live_variables.cpp', 59 'brw_fs_live_variables.h', 60 'brw_fs_lower_pack.cpp', 61 'brw_fs_lower_regioning.cpp', 62 'brw_fs_nir.cpp', 63 'brw_fs_reg_allocate.cpp', 64 'brw_fs_register_coalesce.cpp', 65 'brw_fs_saturate_propagation.cpp', 66 'brw_fs_scoreboard.cpp', 67 'brw_fs_sel_peephole.cpp', 68 'brw_fs_validate.cpp', 69 'brw_fs_visitor.cpp', 70 'brw_inst.h', 71 'brw_interpolation_map.c', 72 'brw_ir.h', 73 'brw_ir_allocator.h', 74 'brw_ir_analysis.h', 75 'brw_ir_fs.h', 76 'brw_ir_performance.h', 77 'brw_ir_performance.cpp', 78 'brw_ir_vec4.h', 79 'brw_isa_info.h', 80 'brw_kernel.c', 81 'brw_lower_logical_sends.cpp', 82 'brw_mesh.cpp', 83 'brw_nir.h', 84 'brw_nir.c', 85 'brw_nir_analyze_boolean_resolves.c', 86 'brw_nir_analyze_ubo_ranges.c', 87 'brw_nir_attribute_workarounds.c', 88 'brw_nir_lower_conversions.c', 89 'brw_nir_lower_cs_intrinsics.c', 90 'brw_nir_lower_alpha_to_coverage.c', 91 'brw_nir_lower_intersection_shader.c', 92 'brw_nir_lower_mem_access_bit_sizes.c', 93 'brw_nir_lower_ray_queries.c', 94 'brw_nir_lower_rt_intrinsics.c', 95 'brw_nir_lower_scoped_barriers.c', 96 'brw_nir_lower_shader_calls.c', 97 'brw_nir_lower_shading_rate_output.c', 98 'brw_nir_lower_storage_image.c', 99 'brw_nir_opt_peephole_ffma.c', 100 'brw_nir_rt.h', 101 'brw_nir_rt.c', 102 'brw_nir_rt_builder.h', 103 'brw_nir_tcs_workarounds.c', 104 'brw_nir_clamp_image_1d_2d_array_sizes.c', 105 'brw_packed_float.c', 106 'brw_predicated_break.cpp', 107 'brw_prim.h', 108 'brw_private.h', 109 'brw_reg.h', 110 'brw_reg_type.c', 111 'brw_reg_type.h', 112 'brw_rt.h', 113 'brw_schedule_instructions.cpp', 114 'brw_shader.cpp', 115 'brw_shader.h', 116 'brw_simd_selection.c', 117 'brw_vec4_builder.h', 118 'brw_vec4_cmod_propagation.cpp', 119 'brw_vec4_copy_propagation.cpp', 120 'brw_vec4.cpp', 121 'brw_vec4_cse.cpp', 122 'brw_vec4_dead_code_eliminate.cpp', 123 'brw_vec4_generator.cpp', 124 'brw_vec4_gs_visitor.cpp', 125 'brw_vec4_gs_visitor.h', 126 'brw_vec4.h', 127 'brw_vec4_live_variables.cpp', 128 'brw_vec4_live_variables.h', 129 'brw_vec4_nir.cpp', 130 'brw_vec4_gs_nir.cpp', 131 'brw_vec4_reg_allocate.cpp', 132 'brw_vec4_surface_builder.cpp', 133 'brw_vec4_surface_builder.h', 134 'brw_vec4_tcs.cpp', 135 'brw_vec4_tcs.h', 136 'brw_vec4_tes.cpp', 137 'brw_vec4_tes.h', 138 'brw_vec4_visitor.cpp', 139 'brw_vec4_vs_visitor.cpp', 140 'brw_vec4_vs.h', 141 'brw_vue_map.c', 142 'brw_wm_iz.cpp', 143 'gfx6_gs_visitor.cpp', 144 'gfx6_gs_visitor.h', 145) 146 147brw_nir_trig = custom_target( 148 'brw_nir_trig_workarounds.c', 149 input : 'brw_nir_trig_workarounds.py', 150 output : 'brw_nir_trig_workarounds.c', 151 command : [ 152 prog_python, '@INPUT@', 153 '-p', join_paths(meson.source_root(), 'src/compiler/nir/'), 154 ], 155 depend_files : nir_algebraic_depends, 156 capture : true, 157) 158 159libintel_compiler = static_library( 160 'intel_compiler', 161 [libintel_compiler_files, brw_nir_trig, ir_expression_operation_h], 162 include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel], 163 c_args : [no_override_init_args], 164 gnu_symbol_visibility : 'hidden', 165 dependencies : [idep_nir_headers, idep_mesautil], 166 build_by_default : false, 167) 168 169# For now this tool is only going to be used by Anv 170if with_intel_clc 171 prog_intel_clc = executable( 172 'intel_clc', 173 ['intel_clc.c'], 174 link_with : [ 175 libintel_compiler, libintel_common, libintel_dev, libisl, 176 ], 177 include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel], 178 c_args : [pre_args, no_override_init_args], 179 dependencies : [idep_nir, idep_clc, idep_mesautil], 180 native : true, 181 ) 182endif 183 184if with_tests 185 test( 186 'intel_compiler_tests', 187 executable( 188 'intel_compiler_tests', 189 files( 190 'test_eu_compact.cpp', 191 'test_eu_validate.cpp', 192 'test_fs_cmod_propagation.cpp', 193 'test_fs_copy_propagation.cpp', 194 'test_fs_saturate_propagation.cpp', 195 'test_fs_scoreboard.cpp', 196 'test_simd_selection.cpp', 197 'test_vec4_cmod_propagation.cpp', 198 'test_vec4_copy_propagation.cpp', 199 'test_vec4_dead_code_eliminate.cpp', 200 'test_vec4_register_coalesce.cpp', 201 'test_vf_float_conversions.cpp', 202 ), 203 ir_expression_operation_h, 204 include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel], 205 link_with : [ 206 libintel_compiler, libintel_common, libintel_dev, libisl, 207 ], 208 dependencies : [idep_gtest, idep_nir, idep_mesautil], 209 ), 210 suite : ['intel'], 211 protocol : gtest_test_protocol, 212 ) 213endif 214