1b8e80941Smrg# Copyright © 2017 Dylan Baker
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_libnouveau = files(
22b8e80941Smrg  'nouveau_buffer.c',
23b8e80941Smrg  'nouveau_buffer.h',
24b8e80941Smrg  'nouveau_context.h',
25b8e80941Smrg  'nouveau_debug.h',
26b8e80941Smrg  'nouveau_fence.c',
27b8e80941Smrg  'nouveau_fence.h',
28b8e80941Smrg  'nouveau_gldefs.h',
29b8e80941Smrg  'nouveau_heap.c',
30b8e80941Smrg  'nouveau_heap.h',
31b8e80941Smrg  'nouveau_mm.c',
32b8e80941Smrg  'nouveau_mm.h',
33b8e80941Smrg  'nouveau_screen.c',
34b8e80941Smrg  'nouveau_screen.h',
35b8e80941Smrg  'nouveau_statebuf.h',
36b8e80941Smrg  'nouveau_video.c',
37b8e80941Smrg  'nouveau_video.h',
38b8e80941Smrg  'nouveau_vp3_video_bsp.c',
39b8e80941Smrg  'nouveau_vp3_video.c',
40b8e80941Smrg  'nouveau_vp3_video.h',
41b8e80941Smrg  'nouveau_vp3_video_vp.c',
42b8e80941Smrg  'nouveau_winsys.h',
43b8e80941Smrg  'nv17_mpeg.xml.h',
44b8e80941Smrg  'nv31_mpeg.xml.h',
45b8e80941Smrg  'nv_m2mf.xml.h',
46b8e80941Smrg  'nv_object.xml.h',
47b8e80941Smrg  'nv30/nv01_2d.xml.h',
48b8e80941Smrg  'nv30/nv30-40_3d.xml.h',
49b8e80941Smrg  'nv30/nv30_clear.c',
50b8e80941Smrg  'nv30/nv30_context.c',
51b8e80941Smrg  'nv30/nv30_context.h',
52b8e80941Smrg  'nv30/nv30_draw.c',
53b8e80941Smrg  'nv30/nv30_format.c',
54b8e80941Smrg  'nv30/nv30_format.h',
55b8e80941Smrg  'nv30/nv30_fragprog.c',
56b8e80941Smrg  'nv30/nv30_fragtex.c',
57b8e80941Smrg  'nv30/nv30_miptree.c',
58b8e80941Smrg  'nv30/nv30_push.c',
59b8e80941Smrg  'nv30/nv30_query.c',
60b8e80941Smrg  'nv30/nv30_resource.c',
61b8e80941Smrg  'nv30/nv30_resource.h',
62b8e80941Smrg  'nv30/nv30_screen.c',
63b8e80941Smrg  'nv30/nv30_screen.h',
64b8e80941Smrg  'nv30/nv30_state.c',
65b8e80941Smrg  'nv30/nv30_state.h',
66b8e80941Smrg  'nv30/nv30_state_validate.c',
67b8e80941Smrg  'nv30/nv30_texture.c',
68b8e80941Smrg  'nv30/nv30_transfer.c',
69b8e80941Smrg  'nv30/nv30_transfer.h',
70b8e80941Smrg  'nv30/nv30_vbo.c',
71b8e80941Smrg  'nv30/nv30_vertprog.c',
72b8e80941Smrg  'nv30/nv30_vertprog.h',
73b8e80941Smrg  'nv30/nv30_winsys.h',
74b8e80941Smrg  'nv30/nv40_vertprog.h',
75b8e80941Smrg  'nv30/nv40_verttex.c',
76b8e80941Smrg  'nv30/nvfx_fragprog.c',
77b8e80941Smrg  'nv30/nvfx_shader.h',
78b8e80941Smrg  'nv30/nvfx_vertprog.c',
79b8e80941Smrg  'nv50/g80_defs.xml.h',
80b8e80941Smrg  'nv50/g80_texture.xml.h',
81b8e80941Smrg  'nv50/nv50_2d.xml.h',
82b8e80941Smrg  'nv50/nv50_3ddefs.xml.h',
83b8e80941Smrg  'nv50/nv50_3d.xml.h',
84b8e80941Smrg  'nv50/nv50_blit.h',
85b8e80941Smrg  'nv50/nv50_compute.c',
86b8e80941Smrg  'nv50/nv50_compute.xml.h',
87b8e80941Smrg  'nv50/nv50_context.c',
88b8e80941Smrg  'nv50/nv50_context.h',
89b8e80941Smrg  'nv50/nv50_formats.c',
90b8e80941Smrg  'nv50/nv50_miptree.c',
91b8e80941Smrg  'nv50/nv50_program.c',
92b8e80941Smrg  'nv50/nv50_program.h',
93b8e80941Smrg  'nv50/nv50_push.c',
94b8e80941Smrg  'nv50/nv50_query.c',
95b8e80941Smrg  'nv50/nv50_query.h',
96b8e80941Smrg  'nv50/nv50_query_hw.c',
97b8e80941Smrg  'nv50/nv50_query_hw.h',
98b8e80941Smrg  'nv50/nv50_query_hw_metric.c',
99b8e80941Smrg  'nv50/nv50_query_hw_metric.h',
100b8e80941Smrg  'nv50/nv50_query_hw_sm.c',
101b8e80941Smrg  'nv50/nv50_query_hw_sm.h',
102b8e80941Smrg  'nv50/nv50_resource.c',
103b8e80941Smrg  'nv50/nv50_resource.h',
104b8e80941Smrg  'nv50/nv50_screen.c',
105b8e80941Smrg  'nv50/nv50_screen.h',
106b8e80941Smrg  'nv50/nv50_shader_state.c',
107b8e80941Smrg  'nv50/nv50_state.c',
108b8e80941Smrg  'nv50/nv50_stateobj.h',
109b8e80941Smrg  'nv50/nv50_stateobj_tex.h',
110b8e80941Smrg  'nv50/nv50_state_validate.c',
111b8e80941Smrg  'nv50/nv50_surface.c',
112b8e80941Smrg  'nv50/nv50_tex.c',
113b8e80941Smrg  'nv50/nv50_transfer.c',
114b8e80941Smrg  'nv50/nv50_transfer.h',
115b8e80941Smrg  'nv50/nv50_vbo.c',
116b8e80941Smrg  'nv50/nv50_winsys.h',
117b8e80941Smrg  'nv50/nv84_video_bsp.c',
118b8e80941Smrg  'nv50/nv84_video.c',
119b8e80941Smrg  'nv50/nv84_video.h',
120b8e80941Smrg  'nv50/nv84_video_vp.c',
121b8e80941Smrg  'nv50/nv98_video_bsp.c',
122b8e80941Smrg  'nv50/nv98_video.c',
123b8e80941Smrg  'nv50/nv98_video.h',
124b8e80941Smrg  'nv50/nv98_video_ppp.c',
125b8e80941Smrg  'nv50/nv98_video_vp.c',
126b8e80941Smrg  'codegen/nv50_ir.cpp',
127b8e80941Smrg  'codegen/nv50_ir_bb.cpp',
128b8e80941Smrg  'codegen/nv50_ir_build_util.cpp',
129b8e80941Smrg  'codegen/nv50_ir_build_util.h',
130b8e80941Smrg  'codegen/nv50_ir_driver.h',
131b8e80941Smrg  'codegen/nv50_ir_emit_nv50.cpp',
132b8e80941Smrg  'codegen/nv50_ir_from_common.cpp',
133b8e80941Smrg  'codegen/nv50_ir_from_common.h',
134b8e80941Smrg  'codegen/nv50_ir_from_nir.cpp',
135b8e80941Smrg  'codegen/nv50_ir_from_tgsi.cpp',
136b8e80941Smrg  'codegen/nv50_ir_graph.cpp',
137b8e80941Smrg  'codegen/nv50_ir_graph.h',
138b8e80941Smrg  'codegen/nv50_ir.h',
139b8e80941Smrg  'codegen/nv50_ir_inlines.h',
140b8e80941Smrg  'codegen/nv50_ir_lowering_helper.cpp',
141b8e80941Smrg  'codegen/nv50_ir_lowering_helper.h',
142b8e80941Smrg  'codegen/nv50_ir_lowering_nv50.cpp',
143b8e80941Smrg  'codegen/nv50_ir_peephole.cpp',
144b8e80941Smrg  'codegen/nv50_ir_print.cpp',
145b8e80941Smrg  'codegen/nv50_ir_ra.cpp',
146b8e80941Smrg  'codegen/nv50_ir_ssa.cpp',
147b8e80941Smrg  'codegen/nv50_ir_target.cpp',
148b8e80941Smrg  'codegen/nv50_ir_target.h',
149b8e80941Smrg  'codegen/nv50_ir_target_nv50.cpp',
150b8e80941Smrg  'codegen/nv50_ir_target_nv50.h',
151b8e80941Smrg  'codegen/nv50_ir_util.cpp',
152b8e80941Smrg  'codegen/nv50_ir_util.h',
153b8e80941Smrg  'codegen/unordered_set.h',
154b8e80941Smrg  'codegen/nv50_ir_emit_gk110.cpp',
155b8e80941Smrg  'codegen/nv50_ir_emit_gm107.cpp',
156b8e80941Smrg  'codegen/nv50_ir_emit_nvc0.cpp',
157b8e80941Smrg  'codegen/nv50_ir_lowering_gm107.cpp',
158b8e80941Smrg  'codegen/nv50_ir_lowering_gm107.h',
159b8e80941Smrg  'codegen/nv50_ir_lowering_nvc0.cpp',
160b8e80941Smrg  'codegen/nv50_ir_lowering_nvc0.h',
161b8e80941Smrg  'codegen/nv50_ir_target_gm107.cpp',
162b8e80941Smrg  'codegen/nv50_ir_target_gm107.h',
163b8e80941Smrg  'codegen/nv50_ir_target_nvc0.cpp',
164b8e80941Smrg  'codegen/nv50_ir_target_nvc0.h',
165b8e80941Smrg  'nvc0/gm107_texture.xml.h',
166b8e80941Smrg  'nvc0/nvc0_3d.xml.h',
167b8e80941Smrg  'nvc0/nvc0_compute.c',
168b8e80941Smrg  'nvc0/nvc0_compute.xml.h',
169b8e80941Smrg  'nvc0/nvc0_context.c',
170b8e80941Smrg  'nvc0/nvc0_context.h',
171b8e80941Smrg  'nvc0/nvc0_formats.c',
172b8e80941Smrg  'nvc0/nvc0_m2mf.xml.h',
173b8e80941Smrg  'nvc0/nvc0_macros.h',
174b8e80941Smrg  'nvc0/nvc0_miptree.c',
175b8e80941Smrg  'nvc0/nvc0_program.c',
176b8e80941Smrg  'nvc0/nvc0_program.h',
177b8e80941Smrg  'nvc0/nvc0_query.c',
178b8e80941Smrg  'nvc0/nvc0_query.h',
179b8e80941Smrg  'nvc0/nvc0_query_hw.c',
180b8e80941Smrg  'nvc0/nvc0_query_hw.h',
181b8e80941Smrg  'nvc0/nvc0_query_hw_metric.c',
182b8e80941Smrg  'nvc0/nvc0_query_hw_metric.h',
183b8e80941Smrg  'nvc0/nvc0_query_hw_sm.c',
184b8e80941Smrg  'nvc0/nvc0_query_hw_sm.h',
185b8e80941Smrg  'nvc0/nvc0_query_sw.c',
186b8e80941Smrg  'nvc0/nvc0_query_sw.h',
187b8e80941Smrg  'nvc0/nvc0_resource.c',
188b8e80941Smrg  'nvc0/nvc0_resource.h',
189b8e80941Smrg  'nvc0/nvc0_screen.c',
190b8e80941Smrg  'nvc0/nvc0_screen.h',
191b8e80941Smrg  'nvc0/nvc0_shader_state.c',
192b8e80941Smrg  'nvc0/nvc0_state.c',
193b8e80941Smrg  'nvc0/nvc0_stateobj.h',
194b8e80941Smrg  'nvc0/nvc0_state_validate.c',
195b8e80941Smrg  'nvc0/nvc0_surface.c',
196b8e80941Smrg  'nvc0/nvc0_tex.c',
197b8e80941Smrg  'nvc0/nvc0_transfer.c',
198b8e80941Smrg  'nvc0/nvc0_vbo.c',
199b8e80941Smrg  'nvc0/nvc0_vbo_translate.c',
200b8e80941Smrg  'nvc0/nvc0_video_bsp.c',
201b8e80941Smrg  'nvc0/nvc0_video.c',
202b8e80941Smrg  'nvc0/nvc0_video.h',
203b8e80941Smrg  'nvc0/nvc0_video_ppp.c',
204b8e80941Smrg  'nvc0/nvc0_video_vp.c',
205b8e80941Smrg  'nvc0/nvc0_winsys.h',
206b8e80941Smrg  'nvc0/nve4_compute.c',
207b8e80941Smrg  'nvc0/nve4_compute.h',
208b8e80941Smrg  'nvc0/nve4_compute.xml.h',
209b8e80941Smrg  'nvc0/nve4_p2mf.xml.h',
210b8e80941Smrg)
211b8e80941Smrg
212b8e80941Smrglibnouveau = static_library(
213b8e80941Smrg  'nouveau',
214b8e80941Smrg  [files_libnouveau, nir_opcodes_h],
215b8e80941Smrg  include_directories : [
216b8e80941Smrg    inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_common,
217b8e80941Smrg  ],
218b8e80941Smrg  c_args : [c_vis_args],
219b8e80941Smrg  cpp_args : [cpp_vis_args],
220b8e80941Smrg  dependencies : [dep_libdrm, dep_libdrm_nouveau],
221b8e80941Smrg)
222b8e80941Smrg
223b8e80941Smrgnouveau_compiler = executable(
224b8e80941Smrg  'nouveau_compiler',
225b8e80941Smrg  'nouveau_compiler.c',
226b8e80941Smrg  include_directories : [inc_src, inc_include, inc_gallium, inc_gallium_aux],
227b8e80941Smrg  dependencies : [dep_libdrm, dep_libdrm_nouveau],
228b8e80941Smrg  link_with : [libnouveau, libgallium, libmesa_util, libnir],
229b8e80941Smrg  build_by_default : with_tools.contains('nouveau'),
230b8e80941Smrg  install : with_tools.contains('nouveau'),
231b8e80941Smrg)
232b8e80941Smrg
233b8e80941Smrgdriver_nouveau = declare_dependency(
234b8e80941Smrg  compile_args : '-DGALLIUM_NOUVEAU',
235b8e80941Smrg  link_with : [libnouveauwinsys, libnouveau, libnir],
236b8e80941Smrg)
237