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_shade_emit.c',
64 'draw/draw_pt_fetch_shade_pipeline.c',
66 'draw/draw_pt_post_vs.c',
67 'draw/draw_pt_so_emit.c',
68 'draw/draw_pt_util.c',
69 'draw/draw_pt_vsplit.c',
70 'draw/draw_pt_vsplit_tmp.h',
71 'draw/draw_so_emit_tmp.h',
72 'draw/draw_split_tmp.h',
79 'draw/draw_vs_exec.c',
81 'draw/draw_vs_variant.c',
82 'driver_ddebug/dd_context.c',
83 'driver_ddebug/dd_draw.c',
84 'driver_ddebug/dd_pipe.h',
85 'driver_ddebug/dd_public.h',
86 'driver_ddebug/dd_screen.c',
87 'driver_ddebug/dd_util.h',
88 'driver_noop/noop_pipe.c',
89 'driver_noop/noop_public.h',
90 'driver_noop/noop_state.c',
91 'driver_trace/tr_context.c',
92 'driver_trace/tr_context.h',
93 'driver_trace/tr_dump.c',
94 'driver_trace/tr_dump_defines.h',
95 'driver_trace/tr_dump.h',
96 'driver_trace/tr_dump_state.c',
97 'driver_trace/tr_dump_state.h',
98 'driver_trace/tr_public.h',
99 'driver_trace/tr_screen.c',
100 'driver_trace/tr_screen.h',
101 'driver_trace/tr_texture.c',
102 'driver_trace/tr_texture.h',
110 'hud/hud_diskstat.c',
111 'hud/hud_sensors_temp.c',
112 'hud/hud_driver_query.c',
119 'pipebuffer/pb_buffer_fenced.c',
120 'pipebuffer/pb_buffer_fenced.h',
121 'pipebuffer/pb_buffer.h',
122 'pipebuffer/pb_bufmgr_cache.c',
123 'pipebuffer/pb_bufmgr_debug.c',
124 'pipebuffer/pb_bufmgr.h',
125 'pipebuffer/pb_bufmgr_mm.c',
126 'pipebuffer/pb_bufmgr_slab.c',
127 'pipebuffer/pb_cache.c',
128 'pipebuffer/pb_cache.h',
129 'pipebuffer/pb_slab.c',
130 'pipebuffer/pb_slab.h',
131 'pipebuffer/pb_validate.c',
132 'pipebuffer/pb_validate.h',
133 'postprocess/filters.h',
134 'postprocess/postprocess.h',
135 'postprocess/pp_celshade.c',
136 'postprocess/pp_celshade.h',
137 'postprocess/pp_colors.c',
138 'postprocess/pp_colors.h',
139 'postprocess/pp_filters.h',
140 'postprocess/pp_init.c',
141 'postprocess/pp_mlaa_areamap.h',
142 'postprocess/pp_mlaa.c',
143 'postprocess/pp_mlaa.h',
144 'postprocess/pp_private.h',
145 'postprocess/pp_program.c',
146 'postprocess/pp_run.c',
147 'rtasm/rtasm_execmem.c',
148 'rtasm/rtasm_execmem.h',
149 'rtasm/rtasm_x86sse.c',
150 'rtasm/rtasm_x86sse.h',
151 'tgsi/tgsi_aa_point.c',
152 'tgsi/tgsi_aa_point.h',
157 'tgsi/tgsi_dynamic_indexing.c',
160 'tgsi/tgsi_from_mesa.c',
161 'tgsi/tgsi_from_mesa.h',
164 'tgsi/tgsi_info_opcodes.h',
165 'tgsi/tgsi_iterate.c',
166 'tgsi/tgsi_iterate.h',
167 'tgsi/tgsi_lowering.c',
168 'tgsi/tgsi_lowering.h',
169 'tgsi/tgsi_opcode_tmp.h',
172 'tgsi/tgsi_point_sprite.c',
173 'tgsi/tgsi_point_sprite.h',
174 'tgsi/tgsi_sanity.c',
175 'tgsi/tgsi_sanity.h',
178 'tgsi/tgsi_strings.c',
179 'tgsi/tgsi_strings.h',
182 'tgsi/tgsi_transform.c',
183 'tgsi/tgsi_transform.h',
184 'tgsi/tgsi_two_side.c',
185 'tgsi/tgsi_two_side.h',
191 'translate/translate.c',
192 'translate/translate.h',
193 'translate/translate_cache.c',
194 'translate/translate_cache.h',
195 'translate/translate_generic.c',
196 'translate/translate_sse.c',
198 'util/u_async_debug.h',
199 'util/u_async_debug.c',
212 'util/u_debug_flush.c',
213 'util/u_debug_flush.h',
214 'util/u_debug_image.c',
215 'util/u_debug_image.h',
216 'util/u_dirty_flags.h',
217 'util/u_dirty_surfaces.h',
220 'util/u_draw_quad.c',
221 'util/u_draw_quad.h',
224 'util/u_dual_blend.h',
225 'util/u_dump_defines.c',
227 'util/u_dump_state.c',
228 'util/u_framebuffer.c',
229 'util/u_framebuffer.h',
230 'util/u_gen_mipmap.c',
231 'util/u_gen_mipmap.h',
232 'util/u_handle_table.c',
233 'util/u_handle_table.h',
236 'util/u_index_modify.c',
237 'util/u_index_modify.h',
241 'util/u_live_shader_cache.c',
242 'util/u_live_shader_cache.h',
245 'util/u_pack_color.h',
248 'util/u_prim_restart.c',
249 'util/u_prim_restart.h',
261 'util/u_simple_shaders.c',
262 'util/u_simple_shaders.h',
263 'util/u_split_draw.c',
264 'util/u_split_draw.h',
265 'util/u_split_prim.h',
279 'util/u_transfer_helper.c',
280 'util/u_transfer_helper.h',
281 'util/u_threaded_context.c',
282 'util/u_threaded_context.h',
283 'util/u_threaded_context_calls.h',
284 'util/u_trace_gallium.c',
285 'util/u_trace_gallium.h',
286 'util/u_upload_mgr.c',
287 'util/u_upload_mgr.h',
290 'util/u_vertex_state_cache.c',
291 'util/u_vertex_state_cache.h',
298 'nir/nir_draw_helpers.c',
299 'nir/nir_draw_helpers.h',
304 if dep_libdrm.found()
305 files_libgallium += files(
306 'renderonly/renderonly.c',
307 'renderonly/renderonly.h',
312 files_libgallium += files(
313 'gallivm/lp_bld_arit.c',
314 'gallivm/lp_bld_arit.h',
315 'gallivm/lp_bld_arit_overflow.c',
316 'gallivm/lp_bld_arit_overflow.h',
317 'gallivm/lp_bld_assert.c',
318 'gallivm/lp_bld_assert.h',
319 'gallivm/lp_bld_bitarit.c',
320 'gallivm/lp_bld_bitarit.h',
321 'gallivm/lp_bld_const.c',
322 'gallivm/lp_bld_const.h',
323 'gallivm/lp_bld_conv.c',
324 'gallivm/lp_bld_conv.h',
325 'gallivm/lp_bld_coro.c',
326 'gallivm/lp_bld_coro.h',
327 'gallivm/lp_bld_debug.cpp',
328 'gallivm/lp_bld_debug.h',
329 'gallivm/lp_bld_flow.c',
330 'gallivm/lp_bld_flow.h',
331 'gallivm/lp_bld_format_aos_array.c',
332 'gallivm/lp_bld_format_aos.c',
333 'gallivm/lp_bld_format_float.c',
334 'gallivm/lp_bld_format_s3tc.c',
335 'gallivm/lp_bld_format.c',
336 'gallivm/lp_bld_format.h',
337 'gallivm/lp_bld_format_soa.c',
338 'gallivm/lp_bld_format_srgb.c',
339 'gallivm/lp_bld_format_yuv.c',
340 'gallivm/lp_bld_gather.c',
341 'gallivm/lp_bld_gather.h',
343 'gallivm/lp_bld_init.c',
344 'gallivm/lp_bld_init.h',
345 'gallivm/lp_bld_intr.c',
346 'gallivm/lp_bld_intr.h',
347 'gallivm/lp_bld_ir_common.c',
348 'gallivm/lp_bld_ir_common.h',
349 'gallivm/lp_bld_jit_types.h',
350 'gallivm/lp_bld_jit_types.c',
351 'gallivm/lp_bld_limits.h',
352 'gallivm/lp_bld_logic.c',
353 'gallivm/lp_bld_logic.h',
354 'gallivm/lp_bld_misc.cpp',
355 'gallivm/lp_bld_misc.h',
356 'gallivm/lp_bld_nir.h',
357 'gallivm/lp_bld_nir.c',
358 'gallivm/lp_bld_nir_aos.c',
359 'gallivm/lp_bld_nir_soa.c',
360 'gallivm/lp_bld_pack.c',
361 'gallivm/lp_bld_pack.h',
362 'gallivm/lp_bld_printf.c',
363 'gallivm/lp_bld_printf.h',
364 'gallivm/lp_bld_quad.c',
365 'gallivm/lp_bld_quad.h',
366 'gallivm/lp_bld_sample_aos.c',
367 'gallivm/lp_bld_sample_aos.h',
368 'gallivm/lp_bld_sample.c',
369 'gallivm/lp_bld_sample.h',
370 'gallivm/lp_bld_sample_soa.c',
371 'gallivm/lp_bld_struct.c',
372 'gallivm/lp_bld_struct.h',
373 'gallivm/lp_bld_swizzle.c',
374 'gallivm/lp_bld_swizzle.h',
375 'gallivm/lp_bld_tgsi_action.c',
376 'gallivm/lp_bld_tgsi_action.h',
377 'gallivm/lp_bld_tgsi_aos.c',
378 'gallivm/lp_bld_tgsi.c',
379 'gallivm/lp_bld_tgsi.h',
380 'gallivm/lp_bld_tgsi_info.c',
381 'gallivm/lp_bld_tgsi_soa.c',
382 'gallivm/lp_bld_type.c',
383 'gallivm/lp_bld_type.h',
386 'draw/draw_llvm_sample.c',
387 'draw/draw_pt_fetch_shade_pipeline_llvm.c',
388 'draw/draw_vs_llvm.c',
389 'tessellator/tessellator.cpp',
390 'tessellator/tessellator.hpp',
391 'tessellator/p_tessellator.cpp',
392 'tessellator/p_tessellator.h',
393 'nir/nir_to_tgsi_info.c',
394 'nir/nir_to_tgsi_info.h',
398 files_libgalliumvl = files(
399 'vl/vl_bicubic_filter.c',
400 'vl/vl_bicubic_filter.h',
403 'vl/vl_compositor.c',
404 'vl/vl_compositor.h',
405 'vl/vl_compositor_gfx.c',
406 'vl/vl_compositor_gfx.h',
407 'vl/vl_compositor_cs.c',
408 'vl/vl_compositor_cs.h',
414 'vl/vl_deint_filter.c',
415 'vl/vl_deint_filter.h',
418 'vl/vl_matrix_filter.c',
419 'vl/vl_matrix_filter.h',
422 'vl/vl_median_filter.c',
423 'vl/vl_median_filter.h',
424 'vl/vl_mpeg12_bitstream.c',
425 'vl/vl_mpeg12_bitstream.h',
426 'vl/vl_mpeg12_decoder.c',
427 'vl/vl_mpeg12_decoder.h',
429 'vl/vl_vertex_buffers.c',
430 'vl/vl_vertex_buffers.h',
431 'vl/vl_video_buffer.c',
432 'vl/vl_video_buffer.h',
435 'vl/vl_probs_table.h',
439 files_libgalliumvlwinsys = files('vl/vl_winsys.h')
440 if host_machine.system() == 'windows'
441 files_libgalliumvlwinsys += files('vl/vl_winsys_win32.c')
443 files_libgalliumvlwinsys += files('vl/vl_winsys_drm.c')
445 if with_dri2 and with_platform_x11
446 files_libgalliumvlwinsys += files('vl/vl_winsys_dri.c')
449 dep_xcb_sync, dep_xcb_present, dep_xshmfence, dep_xcb_xfixes,
452 files_libgalliumvlwinsys += files('vl/vl_winsys_dri3.c')
456 if with_glx == 'xlib'
457 files_libgalliumvlwinsys += files('vl/vl_winsys_xlib_swrast.c')
458 elif with_gallium_drisw_kms
459 files_libgalliumvlwinsys += files('vl/vl_winsys_dri_vgem.c')
462 prog_enums2names = files('driver_trace/enums2names.py')
463 files_libgallium += custom_target(
465 input: '../include/pipe/p_defines.h',
466 output: ['tr_util.c', 'tr_util.h'],
467 command: [prog_python, prog_enums2names, '@INPUT@', '-C', '@OUTPUT0@', '-H', '@OUTPUT1@', '-I', 'tr_util.h'],
468 depend_files: prog_enums2names,
471 files_libgallium += custom_target(
473 input: 'util/u_tracepoints.py',
474 output: 'u_tracepoints.c',
476 prog_python, '@INPUT@',
477 '-p', join_paths(meson.source_root(), 'src/util/perf/'),
480 depend_files: u_trace_py,
483 files_u_tracepoints = custom_target(
485 input: 'util/u_tracepoints.py',
486 output: 'u_tracepoints.h',
488 prog_python, '@INPUT@',
489 '-p', join_paths(meson.source_root(), 'src/util/perf/'),
492 depend_files: u_trace_py,
495 files_libgallium += files_u_tracepoints
497 idep_u_tracepoints = declare_dependency(
498 sources: files_u_tracepoints,
501 libgallium_extra_c_args = []
502 libgallium = static_library(
505 include_directories : [
506 inc_loader, inc_gallium, inc_src, inc_include, include_directories('util')
508 c_args : [c_msvc_compat_args, libgallium_extra_c_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, dep_ws2_32,
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 dependencies : idep_mesautil,
526 build_by_default : false,
529 libgalliumvl = static_library(
532 c_args : [c_msvc_compat_args],
533 cpp_args : [cpp_msvc_compat_args],
534 gnu_symbol_visibility : 'hidden',
535 include_directories : [inc_gallium, inc_include, inc_src],
536 dependencies : idep_mesautil,
537 build_by_default : false,
540 # XXX: The dependencies here may be off...
541 libgalliumvlwinsys = static_library(
543 files_libgalliumvlwinsys,
544 include_directories : [inc_gallium, inc_include, inc_loader, inc_src],
545 dependencies : [dep_libdrm, vlwinsys_deps, idep_mesautil],
546 build_by_default : false,