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_sf.c', 32 'brw_compiler.c', 33 'brw_compiler.h', 34 'brw_dead_control_flow.cpp', 35 'brw_dead_control_flow.h', 36 'brw_debug_recompile.c', 37 'brw_disasm.c', 38 'brw_disasm_info.c', 39 'brw_disasm_info.h', 40 'brw_eu.cpp', 41 'brw_eu_compact.c', 42 'brw_eu_defines.h', 43 'brw_eu_emit.c', 44 'brw_eu.h', 45 'brw_eu_util.c', 46 'brw_eu_validate.c', 47 'brw_fs_bank_conflicts.cpp', 48 'brw_fs_builder.h', 49 'brw_fs_cmod_propagation.cpp', 50 'brw_fs_combine_constants.cpp', 51 'brw_fs_copy_propagation.cpp', 52 'brw_fs.cpp', 53 'brw_fs_cse.cpp', 54 'brw_fs_dead_code_eliminate.cpp', 55 'brw_fs_generator.cpp', 56 'brw_fs.h', 57 'brw_fs_live_variables.cpp', 58 'brw_fs_live_variables.h', 59 'brw_fs_lower_pack.cpp', 60 'brw_fs_lower_regioning.cpp', 61 'brw_fs_nir.cpp', 62 'brw_fs_reg_allocate.cpp', 63 'brw_fs_register_coalesce.cpp', 64 'brw_fs_saturate_propagation.cpp', 65 'brw_fs_scoreboard.cpp', 66 'brw_fs_sel_peephole.cpp', 67 'brw_fs_validate.cpp', 68 'brw_fs_visitor.cpp', 69 'brw_inst.h', 70 'brw_interpolation_map.c', 71 'brw_ir.h', 72 'brw_ir_allocator.h', 73 'brw_ir_analysis.h', 74 'brw_ir_fs.h', 75 'brw_ir_performance.h', 76 'brw_ir_performance.cpp', 77 'brw_ir_vec4.h', 78 'brw_nir.h', 79 'brw_nir.c', 80 'brw_nir_analyze_boolean_resolves.c', 81 'brw_nir_analyze_ubo_ranges.c', 82 'brw_nir_attribute_workarounds.c', 83 'brw_nir_lower_conversions.c', 84 'brw_nir_lower_cs_intrinsics.c', 85 'brw_nir_lower_alpha_to_coverage.c', 86 'brw_nir_lower_image_load_store.c', 87 'brw_nir_lower_mem_access_bit_sizes.c', 88 'brw_nir_lower_scoped_barriers.c', 89 'brw_nir_opt_peephole_ffma.c', 90 'brw_nir_tcs_workarounds.c', 91 'brw_nir_clamp_image_1d_2d_array_sizes.c', 92 'brw_packed_float.c', 93 'brw_predicated_break.cpp', 94 'brw_reg.h', 95 'brw_reg_type.c', 96 'brw_reg_type.h', 97 'brw_schedule_instructions.cpp', 98 'brw_shader.cpp', 99 'brw_shader.h', 100 'brw_vec4_builder.h', 101 'brw_vec4_cmod_propagation.cpp', 102 'brw_vec4_copy_propagation.cpp', 103 'brw_vec4.cpp', 104 'brw_vec4_cse.cpp', 105 'brw_vec4_dead_code_eliminate.cpp', 106 'brw_vec4_generator.cpp', 107 'brw_vec4_gs_visitor.cpp', 108 'brw_vec4_gs_visitor.h', 109 'brw_vec4.h', 110 'brw_vec4_live_variables.cpp', 111 'brw_vec4_live_variables.h', 112 'brw_vec4_nir.cpp', 113 'brw_vec4_gs_nir.cpp', 114 'brw_vec4_reg_allocate.cpp', 115 'brw_vec4_surface_builder.cpp', 116 'brw_vec4_surface_builder.h', 117 'brw_vec4_tcs.cpp', 118 'brw_vec4_tcs.h', 119 'brw_vec4_tes.cpp', 120 'brw_vec4_tes.h', 121 'brw_vec4_visitor.cpp', 122 'brw_vec4_vs_visitor.cpp', 123 'brw_vec4_vs.h', 124 'brw_vue_map.c', 125 'brw_wm_iz.cpp', 126 'gen6_gs_visitor.cpp', 127 'gen6_gs_visitor.h', 128) 129 130brw_nir_trig = custom_target( 131 'brw_nir_trig_workarounds.c', 132 input : 'brw_nir_trig_workarounds.py', 133 output : 'brw_nir_trig_workarounds.c', 134 command : [ 135 prog_python, '@INPUT@', 136 '-p', join_paths(meson.source_root(), 'src/compiler/nir/'), 137 ], 138 depend_files : nir_algebraic_py, 139 capture : true, 140) 141 142libintel_compiler = static_library( 143 'intel_compiler', 144 [libintel_compiler_files, brw_nir_trig, ir_expression_operation_h], 145 include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel], 146 c_args : [no_override_init_args], 147 gnu_symbol_visibility : 'hidden', 148 dependencies : idep_nir_headers, 149 build_by_default : false, 150) 151 152if with_tests 153 # The last two tests are not C++ or gtest, pre comment in autotools make 154 foreach t : ['fs_cmod_propagation', 'fs_copy_propagation', 155 'fs_saturate_propagation', 'vf_float_conversions', 156 'vec4_register_coalesce', 'vec4_copy_propagation', 157 'vec4_cmod_propagation', 'vec4_dead_code_eliminate', 158 'eu_compact', 'eu_validate', 'fs_scoreboard'] 159 test( 160 t, 161 executable( 162 [t, ir_expression_operation_h], 163 'test_@0@.cpp'.format(t), 164 include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel], 165 link_with : [ 166 libintel_compiler, libintel_common, libintel_dev, libisl, 167 ], 168 dependencies : [idep_gtest, idep_nir, idep_mesautil], 169 ), 170 suite : ['intel'], 171 ) 172 endforeach 173endif 174