1 # Copyright © 2017 Intel Corporation
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:
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
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
21 libintel_compiler_files = files(
28 'brw_clip_unfilled.c',
34 'brw_dead_control_flow.cpp',
35 'brw_dead_control_flow.h',
45 'brw_fs_cmod_propagation.cpp',
46 'brw_fs_combine_constants.cpp',
47 'brw_fs_copy_propagation.cpp',
50 'brw_fs_dead_code_eliminate.cpp',
51 'brw_fs_generator.cpp',
53 'brw_fs_live_variables.cpp',
54 'brw_fs_live_variables.h',
55 'brw_fs_lower_conversions.cpp',
56 'brw_fs_lower_pack.cpp',
58 'brw_fs_reg_allocate.cpp',
59 'brw_fs_register_coalesce.cpp',
60 'brw_fs_saturate_propagation.cpp',
61 'brw_fs_sel_peephole.cpp',
62 'brw_fs_surface_builder.cpp',
63 'brw_fs_surface_builder.h',
64 'brw_fs_validate.cpp',
67 'brw_interpolation_map.c',
73 'brw_nir_analyze_boolean_resolves.c',
74 'brw_nir_analyze_ubo_ranges.c',
75 'brw_nir_attribute_workarounds.c',
76 'brw_nir_intrinsics.c',
77 'brw_nir_opt_peephole_ffma.c',
78 'brw_nir_tcs_workarounds.c',
80 'brw_predicated_break.cpp',
84 'brw_schedule_instructions.cpp',
88 'brw_vec4_cmod_propagation.cpp',
89 'brw_vec4_copy_propagation.cpp',
92 'brw_vec4_dead_code_eliminate.cpp',
93 'brw_vec4_generator.cpp',
94 'brw_vec4_gs_visitor.cpp',
95 'brw_vec4_gs_visitor.h',
97 'brw_vec4_live_variables.cpp',
98 'brw_vec4_live_variables.h',
100 'brw_vec4_gs_nir.cpp',
101 'brw_vec4_reg_allocate.cpp',
102 'brw_vec4_surface_builder.cpp',
103 'brw_vec4_surface_builder.h',
108 'brw_vec4_visitor.cpp',
109 'brw_vec4_vs_visitor.cpp',
113 'gen6_gs_visitor.cpp',
115 'intel_asm_annotation.c',
116 'intel_asm_annotation.h',
119 brw_nir_trig = custom_target(
120 'brw_nir_trig_workarounds.c',
121 input : 'brw_nir_trig_workarounds.py',
122 output : 'brw_nir_trig_workarounds.c',
123 command : [prog_python2, '@INPUT@', '-p',
124 join_paths(meson.source_root(), 'src/compiler/nir/')],
125 depend_files : files('../../compiler/nir/nir_algebraic.py'),
129 libintel_compiler = static_library(
131 [libintel_compiler_files, brw_nir_trig, nir_opcodes_h, nir_builder_opcodes_h,
132 ir_expression_operation_h],
133 include_directories : [inc_common, inc_intel, inc_nir],
134 c_args : [c_vis_args, no_override_init_args],
135 cpp_args : [cpp_vis_args],
136 build_by_default : false,
140 # The last two tests are not C++ or gtest, pre comment in autotools make
141 foreach t : ['fs_cmod_propagation', 'fs_copy_propagation',
142 'fs_saturate_propagation', 'vf_float_conversions',
143 'vec4_register_coalesce', 'vec4_copy_propagation',
144 'vec4_cmod_propagation', 'eu_compact', 'eu_validate']
146 [t, nir_opcodes_h, ir_expression_operation_h],
147 'test_@0@.cpp'.format(t),
148 include_directories : [inc_common, inc_intel],
149 link_with : [libgtest, libintel_compiler, libintel_common, libnir,
150 libmesa_util, libisl],
151 dependencies : [dep_thread, dep_dl],