1b8e80941Smrg# Copyright © 2017 Intel Corporation
2b8e80941Smrg
3b8e80941Smrg# Permission is hereby granted, free of charge, to any person obtaining a copy
4b8e80941Smrg# of this software and associated documentation files (the "Software"), to deal
5b8e80941Smrg# in the Software without restriction, including without limitation the rights
6b8e80941Smrg# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7b8e80941Smrg# copies of the Software, and to permit persons to whom the Software is
8b8e80941Smrg# furnished to do so, subject to the following conditions:
9b8e80941Smrg
10b8e80941Smrg# The above copyright notice and this permission notice shall be included in
11b8e80941Smrg# all copies or substantial portions of the Software.
12b8e80941Smrg
13b8e80941Smrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14b8e80941Smrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15b8e80941Smrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16b8e80941Smrg# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17b8e80941Smrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18b8e80941Smrg# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19b8e80941Smrg# SOFTWARE.
20b8e80941Smrg
21b8e80941Smrgfiles_r300 = files(
22b8e80941Smrg  'r300_blit.c',
23b8e80941Smrg  'r300_cb.h',
24b8e80941Smrg  'r300_chipset.c',
25b8e80941Smrg  'r300_chipset.h',
26b8e80941Smrg  'r300_context.c',
27b8e80941Smrg  'r300_context.h',
28b8e80941Smrg  'r300_cs.h',
29b8e80941Smrg  'r300_debug.c',
30b8e80941Smrg  'r300_defines.h',
31b8e80941Smrg  'r300_emit.c',
32b8e80941Smrg  'r300_emit.h',
33b8e80941Smrg  'r300_flush.c',
34b8e80941Smrg  'r300_fs.c',
35b8e80941Smrg  'r300_fs.h',
36b8e80941Smrg  'r300_hyperz.c',
37b8e80941Smrg  'r300_public.h',
38b8e80941Smrg  'r300_query.c',
39b8e80941Smrg  'r300_reg.h',
40b8e80941Smrg  'r300_render.c',
41b8e80941Smrg  'r300_render_stencilref.c',
42b8e80941Smrg  'r300_render_translate.c',
43b8e80941Smrg  'r300_resource.c',
44b8e80941Smrg  'r300_screen_buffer.c',
45b8e80941Smrg  'r300_screen_buffer.h',
46b8e80941Smrg  'r300_screen.c',
47b8e80941Smrg  'r300_screen.h',
48b8e80941Smrg  'r300_shader_semantics.h',
49b8e80941Smrg  'r300_state.c',
50b8e80941Smrg  'r300_state_derived.c',
51b8e80941Smrg  'r300_state_inlines.h',
52b8e80941Smrg  'r300_texture.c',
53b8e80941Smrg  'r300_texture_desc.c',
54b8e80941Smrg  'r300_texture_desc.h',
55b8e80941Smrg  'r300_texture.h',
56b8e80941Smrg  'r300_tgsi_to_rc.c',
57b8e80941Smrg  'r300_tgsi_to_rc.h',
58b8e80941Smrg  'r300_transfer.c',
59b8e80941Smrg  'r300_transfer.h',
60b8e80941Smrg  'r300_vs.c',
61b8e80941Smrg  'r300_vs_draw.c',
62b8e80941Smrg  'r300_vs.h',
63b8e80941Smrg  'compiler/memory_pool.c',
64b8e80941Smrg  'compiler/memory_pool.h',
65b8e80941Smrg  'compiler/r300_fragprog.c',
66b8e80941Smrg  'compiler/r300_fragprog_emit.c',
67b8e80941Smrg  'compiler/r300_fragprog.h',
68b8e80941Smrg  'compiler/r300_fragprog_swizzle.c',
69b8e80941Smrg  'compiler/r300_fragprog_swizzle.h',
70b8e80941Smrg  'compiler/r3xx_fragprog.c',
71b8e80941Smrg  'compiler/r3xx_vertprog.c',
72b8e80941Smrg  'compiler/r3xx_vertprog_dump.c',
73b8e80941Smrg  'compiler/r500_fragprog.c',
74b8e80941Smrg  'compiler/r500_fragprog_emit.c',
75b8e80941Smrg  'compiler/r500_fragprog.h',
76b8e80941Smrg  'compiler/radeon_code.c',
77b8e80941Smrg  'compiler/radeon_code.h',
78b8e80941Smrg  'compiler/radeon_compiler.c',
79b8e80941Smrg  'compiler/radeon_compiler.h',
80b8e80941Smrg  'compiler/radeon_compiler_util.c',
81b8e80941Smrg  'compiler/radeon_compiler_util.h',
82b8e80941Smrg  'compiler/radeon_dataflow.c',
83b8e80941Smrg  'compiler/radeon_dataflow_deadcode.c',
84b8e80941Smrg  'compiler/radeon_dataflow.h',
85b8e80941Smrg  'compiler/radeon_dataflow_swizzles.c',
86b8e80941Smrg  'compiler/radeon_emulate_branches.c',
87b8e80941Smrg  'compiler/radeon_emulate_branches.h',
88b8e80941Smrg  'compiler/radeon_emulate_loops.c',
89b8e80941Smrg  'compiler/radeon_emulate_loops.h',
90b8e80941Smrg  'compiler/radeon_inline_literals.c',
91b8e80941Smrg  'compiler/radeon_list.c',
92b8e80941Smrg  'compiler/radeon_list.h',
93b8e80941Smrg  'compiler/radeon_opcodes.c',
94b8e80941Smrg  'compiler/radeon_opcodes.h',
95b8e80941Smrg  'compiler/radeon_optimize.c',
96b8e80941Smrg  'compiler/radeon_pair_dead_sources.c',
97b8e80941Smrg  'compiler/radeon_pair_regalloc.c',
98b8e80941Smrg  'compiler/radeon_pair_schedule.c',
99b8e80941Smrg  'compiler/radeon_pair_translate.c',
100b8e80941Smrg  'compiler/radeon_program_alu.c',
101b8e80941Smrg  'compiler/radeon_program_alu.h',
102b8e80941Smrg  'compiler/radeon_program.c',
103b8e80941Smrg  'compiler/radeon_program_constants.h',
104b8e80941Smrg  'compiler/radeon_program.h',
105b8e80941Smrg  'compiler/radeon_program_pair.c',
106b8e80941Smrg  'compiler/radeon_program_pair.h',
107b8e80941Smrg  'compiler/radeon_program_print.c',
108b8e80941Smrg  'compiler/radeon_program_tex.c',
109b8e80941Smrg  'compiler/radeon_program_tex.h',
110b8e80941Smrg  'compiler/radeon_regalloc.h',
111b8e80941Smrg  'compiler/radeon_remove_constants.c',
112b8e80941Smrg  'compiler/radeon_remove_constants.h',
113b8e80941Smrg  'compiler/radeon_rename_regs.c',
114b8e80941Smrg  'compiler/radeon_rename_regs.h',
115b8e80941Smrg  'compiler/radeon_swizzle.h',
116b8e80941Smrg  'compiler/radeon_variable.c',
117b8e80941Smrg  'compiler/radeon_variable.h',
118b8e80941Smrg  'compiler/radeon_vert_fc.c',
119b8e80941Smrg)
120b8e80941Smrg
121b8e80941Smrglibr300 = static_library(
122b8e80941Smrg  'r300',
123b8e80941Smrg  files_r300,
124b8e80941Smrg  c_args : [c_vis_args],
125b8e80941Smrg  include_directories : [
126b8e80941Smrg    inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers,
127b8e80941Smrg    inc_mesa,
128b8e80941Smrg  ],
129b8e80941Smrg  dependencies : [dep_libdrm_radeon, dep_llvm],
130b8e80941Smrg)
131b8e80941Smrg
132b8e80941Smrgdriver_r300 = declare_dependency(
133b8e80941Smrg  compile_args : '-DGALLIUM_R300',
134b8e80941Smrg  link_with : [libr300, libradeonwinsys],
135b8e80941Smrg)
136b8e80941Smrg
137b8e80941Smrgif with_tests
138b8e80941Smrg  test(
139b8e80941Smrg    'r300_compiler_test',
140b8e80941Smrg    executable(
141b8e80941Smrg      'r300_compiler_test',
142b8e80941Smrg      files(
143b8e80941Smrg        'compiler/tests/r300_compiler_tests.c',
144b8e80941Smrg        'compiler/tests/radeon_compiler_optimize_tests.c',
145b8e80941Smrg        'compiler/tests/radeon_compiler_regalloc_tests.c',
146b8e80941Smrg        'compiler/tests/radeon_compiler_util_tests.c',
147b8e80941Smrg        'compiler/tests/rc_test_helpers.c',
148b8e80941Smrg        'compiler/tests/unit_test.c',
149b8e80941Smrg      ),
150b8e80941Smrg      c_args : [
151b8e80941Smrg        '-DTEST_PATH="@0@"'.format(
152b8e80941Smrg          join_paths(meson.current_source_dir(), 'compiler', 'tests')
153b8e80941Smrg        )
154b8e80941Smrg      ],
155b8e80941Smrg      include_directories : [
156b8e80941Smrg        inc_src, inc_include, inc_gallium, inc_gallium_aux,
157b8e80941Smrg        include_directories('compiler'),
158b8e80941Smrg      ],
159b8e80941Smrg      link_with : [libr300, libgallium, libmesa_util],
160b8e80941Smrg      dependencies : [dep_m, dep_clock, dep_dl, dep_thread, dep_unwind],
161b8e80941Smrg    ),
162b8e80941Smrg    suite : ['r300'],
163b8e80941Smrg  )
164b8e80941Smrgendif
165