• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
21files_r300 = files(
22  'r300_blit.c',
23  'r300_cb.h',
24  'r300_chipset.c',
25  'r300_chipset.h',
26  'r300_context.c',
27  'r300_context.h',
28  'r300_cs.h',
29  'r300_debug.c',
30  'r300_defines.h',
31  'r300_emit.c',
32  'r300_emit.h',
33  'r300_flush.c',
34  'r300_fs.c',
35  'r300_fs.h',
36  'r300_hyperz.c',
37  'r300_public.h',
38  'r300_query.c',
39  'r300_reg.h',
40  'r300_render.c',
41  'r300_render_stencilref.c',
42  'r300_render_translate.c',
43  'r300_resource.c',
44  'r300_screen_buffer.c',
45  'r300_screen_buffer.h',
46  'r300_screen.c',
47  'r300_screen.h',
48  'r300_shader_semantics.h',
49  'r300_state.c',
50  'r300_state_derived.c',
51  'r300_state_inlines.h',
52  'r300_texture.c',
53  'r300_texture_desc.c',
54  'r300_texture_desc.h',
55  'r300_texture.h',
56  'r300_tgsi_to_rc.c',
57  'r300_tgsi_to_rc.h',
58  'r300_transfer.c',
59  'r300_transfer.h',
60  'r300_vs.c',
61  'r300_vs_draw.c',
62  'r300_vs.h',
63  'compiler/memory_pool.c',
64  'compiler/memory_pool.h',
65  'compiler/r300_fragprog.c',
66  'compiler/r300_fragprog_emit.c',
67  'compiler/r300_fragprog.h',
68  'compiler/r300_fragprog_swizzle.c',
69  'compiler/r300_fragprog_swizzle.h',
70  'compiler/r3xx_fragprog.c',
71  'compiler/r3xx_vertprog.c',
72  'compiler/r3xx_vertprog_dump.c',
73  'compiler/r500_fragprog.c',
74  'compiler/r500_fragprog_emit.c',
75  'compiler/r500_fragprog.h',
76  'compiler/radeon_code.c',
77  'compiler/radeon_code.h',
78  'compiler/radeon_compiler.c',
79  'compiler/radeon_compiler.h',
80  'compiler/radeon_compiler_util.c',
81  'compiler/radeon_compiler_util.h',
82  'compiler/radeon_dataflow.c',
83  'compiler/radeon_dataflow_deadcode.c',
84  'compiler/radeon_dataflow.h',
85  'compiler/radeon_dataflow_swizzles.c',
86  'compiler/radeon_emulate_branches.c',
87  'compiler/radeon_emulate_branches.h',
88  'compiler/radeon_inline_literals.c',
89  'compiler/radeon_list.c',
90  'compiler/radeon_list.h',
91  'compiler/radeon_opcodes.c',
92  'compiler/radeon_opcodes.h',
93  'compiler/radeon_optimize.c',
94  'compiler/radeon_pair_dead_sources.c',
95  'compiler/radeon_pair_regalloc.c',
96  'compiler/radeon_pair_schedule.c',
97  'compiler/radeon_pair_translate.c',
98  'compiler/radeon_program_alu.c',
99  'compiler/radeon_program_alu.h',
100  'compiler/radeon_program.c',
101  'compiler/radeon_program_constants.h',
102  'compiler/radeon_program.h',
103  'compiler/radeon_program_pair.c',
104  'compiler/radeon_program_pair.h',
105  'compiler/radeon_program_print.c',
106  'compiler/radeon_program_tex.c',
107  'compiler/radeon_program_tex.h',
108  'compiler/radeon_regalloc.h',
109  'compiler/radeon_remove_constants.c',
110  'compiler/radeon_remove_constants.h',
111  'compiler/radeon_rename_regs.c',
112  'compiler/radeon_rename_regs.h',
113  'compiler/radeon_swizzle.h',
114  'compiler/radeon_variable.c',
115  'compiler/radeon_variable.h',
116  'compiler/radeon_vert_fc.c',
117)
118
119r300_nir_algebraic_c = custom_target(
120  'r300_nir_algebraic.c',
121  input : 'compiler/r300_nir_algebraic.py',
122  output : 'r300_nir_algebraic.c',
123  command : [
124    prog_python, '@INPUT@',
125    '-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
126    '@OUTPUT@',
127  ],
128  depend_files : nir_algebraic_depends,
129)
130
131libr300 = static_library(
132  'r300',
133  files_r300, r300_nir_algebraic_c,
134  include_directories : [
135    inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers,
136    inc_mesa,
137  ],
138  gnu_symbol_visibility : 'hidden',
139  dependencies : [dep_libdrm_radeon, dep_llvm, idep_mesautil, idep_nir],
140)
141
142driver_r300 = declare_dependency(
143  compile_args : '-DGALLIUM_R300',
144  link_with : [libr300, libradeonwinsys],
145)
146
147if with_tests
148  test(
149    'r300_compiler_test',
150    executable(
151      'r300_compiler_test',
152      files(
153        'compiler/tests/r300_compiler_tests.c',
154        'compiler/tests/radeon_compiler_optimize_tests.c',
155        'compiler/tests/radeon_compiler_regalloc_tests.c',
156        'compiler/tests/radeon_compiler_util_tests.c',
157        'compiler/tests/rc_test_helpers.c',
158        'compiler/tests/unit_test.c',
159      ),
160      c_args : [
161        '-DTEST_PATH="@0@"'.format(
162          join_paths(meson.current_source_dir(), 'compiler', 'tests')
163        )
164      ],
165      include_directories : [
166        inc_src, inc_include, inc_gallium, inc_gallium_aux,
167        include_directories('compiler'),
168      ],
169      link_with : [libr300, libgallium],
170      dependencies : [dep_m, dep_clock, dep_dl, dep_unwind, idep_mesautil],
171    ),
172    suite : ['r300'],
173  )
174endif
175