1 # Copyright © 2017 Dylan Baker
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 files_libgallium = files(
22 'cso_cache/cso_cache.c',
23 'cso_cache/cso_cache.h',
24 'cso_cache/cso_context.c',
25 'cso_cache/cso_context.h',
26 'cso_cache/cso_hash.c',
27 'cso_cache/cso_hash.h',
28 'draw/draw_cliptest_tmp.h',
29 'draw/draw_context.c',
30 'draw/draw_context.h',
31 'draw/draw_decompose_tmp.h',
37 'draw/draw_pipe_aaline.c',
38 'draw/draw_pipe_aapoint.c',
41 'draw/draw_pipe_clip.c',
42 'draw/draw_pipe_cull.c',
43 'draw/draw_pipe_flatshade.c',
44 'draw/draw_pipe_offset.c',
45 'draw/draw_pipe_pstipple.c',
46 'draw/draw_pipe_stipple.c',
47 'draw/draw_pipe_twoside.c',
48 'draw/draw_pipe_unfilled.c',
49 'draw/draw_pipe_user_cull.c',
50 'draw/draw_pipe_util.c',
51 'draw/draw_pipe_validate.c',
52 'draw/draw_pipe_vbuf.c',
53 'draw/draw_pipe_wide_line.c',
54 'draw/draw_pipe_wide_point.c',
55 'draw/draw_prim_assembler.c',
56 'draw/draw_prim_assembler.h',
57 'draw/draw_prim_assembler_tmp.h',
58 'draw/draw_private.h',
60 'draw/draw_pt_decompose.h',
61 'draw/draw_pt_emit.c',
62 'draw/draw_pt_fetch.c',
63 'draw/draw_pt_fetch_emit.c',
64 'draw/draw_pt_fetch_shade_emit.c',
65 'draw/draw_pt_fetch_shade_pipeline.c',
67 'draw/draw_pt_post_vs.c',
68 'draw/draw_pt_so_emit.c',
69 'draw/draw_pt_util.c',
70 'draw/draw_pt_vsplit.c',
71 'draw/draw_pt_vsplit_tmp.h',
72 'draw/draw_so_emit_tmp.h',
73 'draw/draw_split_tmp.h',
80 'draw/draw_vs_exec.c',
82 'draw/draw_vs_variant.c',
83 'driver_ddebug/dd_context.c',
84 'driver_ddebug/dd_draw.c',
85 'driver_ddebug/dd_pipe.h',
86 'driver_ddebug/dd_public.h',
87 'driver_ddebug/dd_screen.c',
88 'driver_ddebug/dd_util.h',
89 'driver_noop/noop_pipe.c',
90 'driver_noop/noop_public.h',
91 'driver_noop/noop_state.c',
92 'driver_rbug/rbug_context.c',
93 'driver_rbug/rbug_context.h',
94 'driver_rbug/rbug_core.c',
95 'driver_rbug/rbug_objects.c',
96 'driver_rbug/rbug_objects.h',
97 'driver_rbug/rbug_public.h',
98 'driver_rbug/rbug_screen.c',
99 'driver_rbug/rbug_screen.h',
100 'driver_trace/tr_context.c',
101 'driver_trace/tr_context.h',
102 'driver_trace/tr_dump.c',
103 'driver_trace/tr_dump_defines.h',
104 'driver_trace/tr_dump.h',
105 'driver_trace/tr_dump_state.c',
106 'driver_trace/tr_dump_state.h',
107 'driver_trace/tr_public.h',
108 'driver_trace/tr_screen.c',
109 'driver_trace/tr_screen.h',
110 'driver_trace/tr_texture.c',
111 'driver_trace/tr_texture.h',
119 'hud/hud_diskstat.c',
120 'hud/hud_sensors_temp.c',
121 'hud/hud_driver_query.c',
124 'indices/u_indices.h',
125 'indices/u_indices_priv.h',
126 'indices/u_primconvert.c',
127 'indices/u_primconvert.h',
132 'pipebuffer/pb_buffer_fenced.c',
133 'pipebuffer/pb_buffer_fenced.h',
134 'pipebuffer/pb_buffer.h',
135 'pipebuffer/pb_bufmgr_cache.c',
136 'pipebuffer/pb_bufmgr_debug.c',
137 'pipebuffer/pb_bufmgr.h',
138 'pipebuffer/pb_bufmgr_mm.c',
139 'pipebuffer/pb_bufmgr_slab.c',
140 'pipebuffer/pb_cache.c',
141 'pipebuffer/pb_cache.h',
142 'pipebuffer/pb_slab.c',
143 'pipebuffer/pb_slab.h',
144 'pipebuffer/pb_validate.c',
145 'pipebuffer/pb_validate.h',
146 'postprocess/filters.h',
147 'postprocess/postprocess.h',
148 'postprocess/pp_celshade.c',
149 'postprocess/pp_celshade.h',
150 'postprocess/pp_colors.c',
151 'postprocess/pp_colors.h',
152 'postprocess/pp_filters.h',
153 'postprocess/pp_init.c',
154 'postprocess/pp_mlaa_areamap.h',
155 'postprocess/pp_mlaa.c',
156 'postprocess/pp_mlaa.h',
157 'postprocess/pp_private.h',
158 'postprocess/pp_program.c',
159 'postprocess/pp_run.c',
160 'rbug/rbug_connection.c',
161 'rbug/rbug_connection.h',
162 'rbug/rbug_context.c',
163 'rbug/rbug_context.h',
166 'rbug/rbug_demarshal.c',
168 'rbug/rbug_internal.h',
170 'rbug/rbug_shader.c',
171 'rbug/rbug_shader.h',
172 'rbug/rbug_texture.c',
173 'rbug/rbug_texture.h',
176 'rtasm/rtasm_execmem.c',
177 'rtasm/rtasm_execmem.h',
178 'rtasm/rtasm_x86sse.c',
179 'rtasm/rtasm_x86sse.h',
180 'tgsi/tgsi_aa_point.c',
181 'tgsi/tgsi_aa_point.h',
186 'tgsi/tgsi_dynamic_indexing.c',
189 'tgsi/tgsi_emulate.c',
190 'tgsi/tgsi_emulate.h',
191 'tgsi/tgsi_from_mesa.c',
192 'tgsi/tgsi_from_mesa.h',
195 'tgsi/tgsi_info_opcodes.h',
196 'tgsi/tgsi_iterate.c',
197 'tgsi/tgsi_iterate.h',
198 'tgsi/tgsi_lowering.c',
199 'tgsi/tgsi_lowering.h',
200 'tgsi/tgsi_opcode_tmp.h',
203 'tgsi/tgsi_point_sprite.c',
204 'tgsi/tgsi_point_sprite.h',
205 'tgsi/tgsi_sanity.c',
206 'tgsi/tgsi_sanity.h',
209 'tgsi/tgsi_strings.c',
210 'tgsi/tgsi_strings.h',
213 'tgsi/tgsi_transform.c',
214 'tgsi/tgsi_transform.h',
215 'tgsi/tgsi_two_side.c',
216 'tgsi/tgsi_two_side.h',
222 'translate/translate.c',
223 'translate/translate.h',
224 'translate/translate_cache.c',
225 'translate/translate_cache.h',
226 'translate/translate_generic.c',
227 'translate/translate_sse.c',
229 'util/u_async_debug.h',
230 'util/u_async_debug.c',
244 'util/u_debug_describe.c',
245 'util/u_debug_describe.h',
246 'util/u_debug_flush.c',
247 'util/u_debug_flush.h',
248 'util/u_debug_image.c',
249 'util/u_debug_image.h',
250 'util/u_debug_refcnt.c',
251 'util/u_debug_refcnt.h',
252 'util/u_dirty_flags.h',
253 'util/u_dirty_surfaces.h',
258 'util/u_draw_quad.c',
259 'util/u_draw_quad.h',
260 'util/u_dual_blend.h',
261 'util/u_dump_defines.c',
263 'util/u_dump_state.c',
265 'util/u_framebuffer.c',
266 'util/u_framebuffer.h',
267 'util/u_gen_mipmap.c',
268 'util/u_gen_mipmap.h',
270 'util/u_handle_table.c',
271 'util/u_handle_table.h',
272 'util/u_hash_table.c',
273 'util/u_hash_table.h',
278 'util/u_index_modify.c',
279 'util/u_index_modify.h',
283 'util/u_live_shader_cache.c',
284 'util/u_live_shader_cache.h',
289 'util/u_pack_color.h',
293 'util/u_prim_restart.c',
294 'util/u_prim_restart.h',
306 'util/u_simple_shaders.c',
307 'util/u_simple_shaders.h',
308 'util/u_split_draw.c',
309 'util/u_split_draw.h',
310 'util/u_split_prim.h',
324 'util/u_transfer_helper.c',
325 'util/u_transfer_helper.h',
326 'util/u_threaded_context.c',
327 'util/u_threaded_context.h',
328 'util/u_threaded_context_calls.h',
329 'util/u_upload_mgr.c',
330 'util/u_upload_mgr.h',
337 'nir/nir_draw_helpers.c',
338 'nir/nir_draw_helpers.h',
341 if dep_libdrm.found()
342 files_libgallium += files(
343 'renderonly/renderonly.c',
344 'renderonly/renderonly.h',
349 files_libgallium += files(
350 'gallivm/lp_bld_arit.c',
351 'gallivm/lp_bld_arit.h',
352 'gallivm/lp_bld_arit_overflow.c',
353 'gallivm/lp_bld_arit_overflow.h',
354 'gallivm/lp_bld_assert.c',
355 'gallivm/lp_bld_assert.h',
356 'gallivm/lp_bld_bitarit.c',
357 'gallivm/lp_bld_bitarit.h',
358 'gallivm/lp_bld_const.c',
359 'gallivm/lp_bld_const.h',
360 'gallivm/lp_bld_conv.c',
361 'gallivm/lp_bld_conv.h',
362 'gallivm/lp_bld_coro.c',
363 'gallivm/lp_bld_coro.h',
364 'gallivm/lp_bld_debug.cpp',
365 'gallivm/lp_bld_debug.h',
366 'gallivm/lp_bld_flow.c',
367 'gallivm/lp_bld_flow.h',
368 'gallivm/lp_bld_format_aos_array.c',
369 'gallivm/lp_bld_format_aos.c',
370 'gallivm/lp_bld_format_float.c',
371 'gallivm/lp_bld_format_s3tc.c',
372 'gallivm/lp_bld_format.c',
373 'gallivm/lp_bld_format.h',
374 'gallivm/lp_bld_format_soa.c',
375 'gallivm/lp_bld_format_srgb.c',
376 'gallivm/lp_bld_format_yuv.c',
377 'gallivm/lp_bld_gather.c',
378 'gallivm/lp_bld_gather.h',
380 'gallivm/lp_bld_init.c',
381 'gallivm/lp_bld_init.h',
382 'gallivm/lp_bld_intr.c',
383 'gallivm/lp_bld_intr.h',
384 'gallivm/lp_bld_ir_common.c',
385 'gallivm/lp_bld_ir_common.h',
386 'gallivm/lp_bld_limits.h',
387 'gallivm/lp_bld_logic.c',
388 'gallivm/lp_bld_logic.h',
389 'gallivm/lp_bld_misc.cpp',
390 'gallivm/lp_bld_misc.h',
391 'gallivm/lp_bld_nir.h',
392 'gallivm/lp_bld_nir.c',
393 'gallivm/lp_bld_nir_soa.c',
394 'gallivm/lp_bld_pack.c',
395 'gallivm/lp_bld_pack.h',
396 'gallivm/lp_bld_printf.c',
397 'gallivm/lp_bld_printf.h',
398 'gallivm/lp_bld_quad.c',
399 'gallivm/lp_bld_quad.h',
400 'gallivm/lp_bld_sample_aos.c',
401 'gallivm/lp_bld_sample_aos.h',
402 'gallivm/lp_bld_sample.c',
403 'gallivm/lp_bld_sample.h',
404 'gallivm/lp_bld_sample_soa.c',
405 'gallivm/lp_bld_struct.c',
406 'gallivm/lp_bld_struct.h',
407 'gallivm/lp_bld_swizzle.c',
408 'gallivm/lp_bld_swizzle.h',
409 'gallivm/lp_bld_tgsi_action.c',
410 'gallivm/lp_bld_tgsi_action.h',
411 'gallivm/lp_bld_tgsi_aos.c',
412 'gallivm/lp_bld_tgsi.c',
413 'gallivm/lp_bld_tgsi.h',
414 'gallivm/lp_bld_tgsi_info.c',
415 'gallivm/lp_bld_tgsi_soa.c',
416 'gallivm/lp_bld_type.c',
417 'gallivm/lp_bld_type.h',
420 'draw/draw_llvm_sample.c',
421 'draw/draw_pt_fetch_shade_pipeline_llvm.c',
422 'draw/draw_vs_llvm.c',
423 'tessellator/tessellator.cpp',
424 'tessellator/tessellator.hpp',
425 'tessellator/p_tessellator.cpp',
426 'tessellator/p_tessellator.h',
427 'nir/nir_to_tgsi_info.c',
428 'nir/nir_to_tgsi_info.h',
432 files_libgalliumvl = files(
433 'vl/vl_bicubic_filter.c',
434 'vl/vl_bicubic_filter.h',
435 'vl/vl_compositor.c',
436 'vl/vl_compositor.h',
437 'vl/vl_compositor_gfx.c',
438 'vl/vl_compositor_gfx.h',
439 'vl/vl_compositor_cs.c',
440 'vl/vl_compositor_cs.h',
446 'vl/vl_deint_filter.c',
447 'vl/vl_deint_filter.h',
450 'vl/vl_matrix_filter.c',
451 'vl/vl_matrix_filter.h',
454 'vl/vl_median_filter.c',
455 'vl/vl_median_filter.h',
456 'vl/vl_mpeg12_bitstream.c',
457 'vl/vl_mpeg12_bitstream.h',
458 'vl/vl_mpeg12_decoder.c',
459 'vl/vl_mpeg12_decoder.h',
462 'vl/vl_vertex_buffers.c',
463 'vl/vl_vertex_buffers.h',
464 'vl/vl_video_buffer.c',
465 'vl/vl_video_buffer.h',
469 'vl/vl_probs_table.h',
473 files_libgalliumvlwinsys = files('vl/vl_winsys.h',
474 'vl/vl_winsys_drm.c')
475 if with_dri2 and with_platform_x11
476 files_libgalliumvlwinsys += files('vl/vl_winsys_dri.c')
479 dep_xcb_sync, dep_xcb_present, dep_xshmfence, dep_xcb_xfixes,
482 files_libgalliumvlwinsys += files('vl/vl_winsys_dri3.c')
486 u_indices_gen_c = custom_target(
488 input : 'indices/u_indices_gen.py',
489 output : 'u_indices_gen.c',
490 command : [prog_python, '@INPUT@'],
494 u_unfilled_gen_c = custom_target(
496 input : 'indices/u_unfilled_gen.py',
497 output : 'u_unfilled_gen.c',
498 command : [prog_python, '@INPUT@'],
502 libgallium = static_library(
504 [files_libgallium, u_indices_gen_c, u_unfilled_gen_c],
505 include_directories : [
506 inc_loader, inc_gallium, inc_src, inc_include, include_directories('util')
508 c_args : [c_msvc_compat_args],
509 cpp_args : [cpp_msvc_compat_args],
510 gnu_symbol_visibility : 'hidden',
512 dep_libdrm, dep_llvm, dep_dl, dep_m, dep_thread, dep_lmsensors,
513 idep_nir, idep_nir_headers, idep_mesautil,
515 build_by_default : false
518 libgalliumvl_stub = static_library(
521 c_args : [c_msvc_compat_args],
522 cpp_args : [cpp_msvc_compat_args],
523 gnu_symbol_visibility : 'hidden',
524 include_directories: [inc_gallium, inc_include, inc_src],
525 build_by_default : false,
528 libgalliumvl = static_library(
531 c_args : [c_msvc_compat_args],
532 cpp_args : [cpp_msvc_compat_args],
533 gnu_symbol_visibility : 'hidden',
534 include_directories : [inc_gallium, inc_include, inc_src],
535 build_by_default : false,
538 # XXX: The dependencies here may be off...
539 libgalliumvlwinsys = static_library(
541 files_libgalliumvlwinsys,
542 include_directories : [inc_gallium, inc_include, inc_loader, inc_src],
543 dependencies : [dep_libdrm, vlwinsys_deps],
544 build_by_default : false,