meson: Use consistent style
[mesa.git] / src / intel / compiler / meson.build
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
21 libintel_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_disasm.c',
37 'brw_disasm_info.c',
38 'brw_disasm_info.h',
39 'brw_eu.c',
40 'brw_eu_compact.c',
41 'brw_eu_defines.h',
42 'brw_eu_emit.c',
43 'brw_eu.h',
44 'brw_eu_util.c',
45 'brw_eu_validate.c',
46 'brw_fs_bank_conflicts.cpp',
47 'brw_fs_builder.h',
48 'brw_fs_cmod_propagation.cpp',
49 'brw_fs_combine_constants.cpp',
50 'brw_fs_copy_propagation.cpp',
51 'brw_fs.cpp',
52 'brw_fs_cse.cpp',
53 'brw_fs_dead_code_eliminate.cpp',
54 'brw_fs_generator.cpp',
55 'brw_fs.h',
56 'brw_fs_live_variables.cpp',
57 'brw_fs_live_variables.h',
58 'brw_fs_lower_conversions.cpp',
59 'brw_fs_lower_pack.cpp',
60 'brw_fs_nir.cpp',
61 'brw_fs_reg_allocate.cpp',
62 'brw_fs_register_coalesce.cpp',
63 'brw_fs_saturate_propagation.cpp',
64 'brw_fs_sel_peephole.cpp',
65 'brw_fs_surface_builder.cpp',
66 'brw_fs_surface_builder.h',
67 'brw_fs_validate.cpp',
68 'brw_fs_visitor.cpp',
69 'brw_inst.h',
70 'brw_interpolation_map.c',
71 'brw_ir_allocator.h',
72 'brw_ir_fs.h',
73 'brw_ir_vec4.h',
74 'brw_nir.h',
75 'brw_nir.c',
76 'brw_nir_analyze_boolean_resolves.c',
77 'brw_nir_analyze_ubo_ranges.c',
78 'brw_nir_attribute_workarounds.c',
79 'brw_nir_lower_cs_intrinsics.c',
80 'brw_nir_opt_peephole_ffma.c',
81 'brw_nir_tcs_workarounds.c',
82 'brw_packed_float.c',
83 'brw_predicated_break.cpp',
84 'brw_reg.h',
85 'brw_reg_type.c',
86 'brw_reg_type.h',
87 'brw_schedule_instructions.cpp',
88 'brw_shader.cpp',
89 'brw_shader.h',
90 'brw_vec4_builder.h',
91 'brw_vec4_cmod_propagation.cpp',
92 'brw_vec4_copy_propagation.cpp',
93 'brw_vec4.cpp',
94 'brw_vec4_cse.cpp',
95 'brw_vec4_dead_code_eliminate.cpp',
96 'brw_vec4_generator.cpp',
97 'brw_vec4_gs_visitor.cpp',
98 'brw_vec4_gs_visitor.h',
99 'brw_vec4.h',
100 'brw_vec4_live_variables.cpp',
101 'brw_vec4_live_variables.h',
102 'brw_vec4_nir.cpp',
103 'brw_vec4_gs_nir.cpp',
104 'brw_vec4_reg_allocate.cpp',
105 'brw_vec4_surface_builder.cpp',
106 'brw_vec4_surface_builder.h',
107 'brw_vec4_tcs.cpp',
108 'brw_vec4_tcs.h',
109 'brw_vec4_tes.cpp',
110 'brw_vec4_tes.h',
111 'brw_vec4_visitor.cpp',
112 'brw_vec4_vs_visitor.cpp',
113 'brw_vec4_vs.h',
114 'brw_vue_map.c',
115 'brw_wm_iz.cpp',
116 'gen6_gs_visitor.cpp',
117 'gen6_gs_visitor.h',
118 )
119
120 brw_nir_trig = custom_target(
121 'brw_nir_trig_workarounds.c',
122 input : 'brw_nir_trig_workarounds.py',
123 output : 'brw_nir_trig_workarounds.c',
124 command : [
125 prog_python2, '@INPUT@',
126 '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
127 ],
128 depend_files : nir_algebraic_py,
129 capture : true,
130 )
131
132 libintel_compiler = static_library(
133 'intel_compiler',
134 [libintel_compiler_files, brw_nir_trig, nir_opcodes_h, nir_builder_opcodes_h,
135 ir_expression_operation_h],
136 include_directories : [inc_common, inc_intel, inc_nir],
137 c_args : [c_vis_args, no_override_init_args],
138 cpp_args : [cpp_vis_args],
139 build_by_default : false,
140 )
141
142 if with_tests
143 # The last two tests are not C++ or gtest, pre comment in autotools make
144 foreach t : ['fs_cmod_propagation', 'fs_copy_propagation',
145 'fs_saturate_propagation', 'vf_float_conversions',
146 'vec4_register_coalesce', 'vec4_copy_propagation',
147 'vec4_cmod_propagation', 'eu_compact', 'eu_validate']
148 _exe = executable(
149 [t, nir_opcodes_h, ir_expression_operation_h],
150 'test_@0@.cpp'.format(t),
151 include_directories : [inc_common, inc_intel],
152 link_with : [libintel_compiler, libintel_common, libnir, libmesa_util,
153 libisl],
154 dependencies : [dep_thread, dep_dl, idep_gtest],
155 )
156 test(t, _exe)
157 endforeach
158 endif