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_rbug/rbug_context.c',
92
'driver_rbug/rbug_context.h',
93
'driver_rbug/rbug_core.c',
94
'driver_rbug/rbug_objects.c',
95
'driver_rbug/rbug_objects.h',
96
'driver_rbug/rbug_public.h',
97
'driver_rbug/rbug_screen.c',
98
'driver_rbug/rbug_screen.h',
99
'driver_trace/tr_context.c',
100
'driver_trace/tr_context.h',
101
'driver_trace/tr_dump.c',
102
'driver_trace/tr_dump_defines.h',
103
'driver_trace/tr_dump.h',
104
'driver_trace/tr_dump_state.c',
105
'driver_trace/tr_dump_state.h',
106
'driver_trace/tr_public.h',
107
'driver_trace/tr_screen.c',
108
'driver_trace/tr_screen.h',
109
'driver_trace/tr_texture.c',
110
'driver_trace/tr_texture.h',
118
'hud/hud_diskstat.c',
119
'hud/hud_sensors_temp.c',
120
'hud/hud_driver_query.c',
127
'pipebuffer/pb_buffer_fenced.c',
128
'pipebuffer/pb_buffer_fenced.h',
129
'pipebuffer/pb_buffer.h',
130
'pipebuffer/pb_bufmgr_cache.c',
131
'pipebuffer/pb_bufmgr_debug.c',
132
'pipebuffer/pb_bufmgr.h',
133
'pipebuffer/pb_bufmgr_mm.c',
134
'pipebuffer/pb_bufmgr_slab.c',
135
'pipebuffer/pb_cache.c',
136
'pipebuffer/pb_cache.h',
137
'pipebuffer/pb_slab.c',
138
'pipebuffer/pb_slab.h',
139
'pipebuffer/pb_validate.c',
140
'pipebuffer/pb_validate.h',
141
'postprocess/filters.h',
142
'postprocess/postprocess.h',
143
'postprocess/pp_celshade.c',
144
'postprocess/pp_celshade.h',
145
'postprocess/pp_colors.c',
146
'postprocess/pp_colors.h',
147
'postprocess/pp_filters.h',
148
'postprocess/pp_init.c',
149
'postprocess/pp_mlaa_areamap.h',
150
'postprocess/pp_mlaa.c',
151
'postprocess/pp_mlaa.h',
152
'postprocess/pp_private.h',
153
'postprocess/pp_program.c',
154
'postprocess/pp_run.c',
155
'rbug/rbug_connection.c',
156
'rbug/rbug_connection.h',
157
'rbug/rbug_context.c',
158
'rbug/rbug_context.h',
161
'rbug/rbug_demarshal.c',
163
'rbug/rbug_internal.h',
165
'rbug/rbug_shader.c',
166
'rbug/rbug_shader.h',
167
'rbug/rbug_texture.c',
168
'rbug/rbug_texture.h',
171
'rtasm/rtasm_execmem.c',
172
'rtasm/rtasm_execmem.h',
173
'rtasm/rtasm_x86sse.c',
174
'rtasm/rtasm_x86sse.h',
175
'tgsi/tgsi_aa_point.c',
176
'tgsi/tgsi_aa_point.h',
181
'tgsi/tgsi_dynamic_indexing.c',
184
'tgsi/tgsi_emulate.c',
185
'tgsi/tgsi_emulate.h',
186
'tgsi/tgsi_from_mesa.c',
187
'tgsi/tgsi_from_mesa.h',
190
'tgsi/tgsi_info_opcodes.h',
191
'tgsi/tgsi_iterate.c',
192
'tgsi/tgsi_iterate.h',
193
'tgsi/tgsi_lowering.c',
194
'tgsi/tgsi_lowering.h',
195
'tgsi/tgsi_opcode_tmp.h',
198
'tgsi/tgsi_point_sprite.c',
199
'tgsi/tgsi_point_sprite.h',
200
'tgsi/tgsi_sanity.c',
201
'tgsi/tgsi_sanity.h',
204
'tgsi/tgsi_strings.c',
205
'tgsi/tgsi_strings.h',
208
'tgsi/tgsi_transform.c',
209
'tgsi/tgsi_transform.h',
210
'tgsi/tgsi_two_side.c',
211
'tgsi/tgsi_two_side.h',
217
'translate/translate.c',
218
'translate/translate.h',
219
'translate/translate_cache.c',
220
'translate/translate_cache.h',
221
'translate/translate_generic.c',
222
'translate/translate_sse.c',
224
'util/u_async_debug.h',
225
'util/u_async_debug.c',
237
'util/u_debug_flush.c',
238
'util/u_debug_flush.h',
239
'util/u_debug_image.c',
240
'util/u_debug_image.h',
241
'util/u_dirty_flags.h',
242
'util/u_dirty_surfaces.h',
247
'util/u_draw_quad.c',
248
'util/u_draw_quad.h',
251
'util/u_dual_blend.h',
252
'util/u_dump_defines.c',
254
'util/u_dump_state.c',
255
'util/u_framebuffer.c',
256
'util/u_framebuffer.h',
257
'util/u_gen_mipmap.c',
258
'util/u_gen_mipmap.h',
259
'util/u_handle_table.c',
260
'util/u_handle_table.h',
263
'util/u_index_modify.c',
264
'util/u_index_modify.h',
268
'util/u_live_shader_cache.c',
269
'util/u_live_shader_cache.h',
274
'util/u_pack_color.h',
278
'util/u_prim_restart.c',
279
'util/u_prim_restart.h',
291
'util/u_simple_shaders.c',
292
'util/u_simple_shaders.h',
293
'util/u_split_draw.c',
294
'util/u_split_draw.h',
295
'util/u_split_prim.h',
309
'util/u_transfer_helper.c',
310
'util/u_transfer_helper.h',
311
'util/u_threaded_context.c',
312
'util/u_threaded_context.h',
313
'util/u_threaded_context_calls.h',
314
'util/u_trace_gallium.c',
315
'util/u_trace_gallium.h',
316
'util/u_upload_mgr.c',
317
'util/u_upload_mgr.h',
320
'util/u_vertex_state_cache.c',
321
'util/u_vertex_state_cache.h',
328
'nir/nir_draw_helpers.c',
329
'nir/nir_draw_helpers.h',
334
if dep_libdrm.found()
335
files_libgallium += files(
336
'renderonly/renderonly.c',
337
'renderonly/renderonly.h',
342
files_libgallium += files(
343
'gallivm/lp_bld_arit.c',
344
'gallivm/lp_bld_arit.h',
345
'gallivm/lp_bld_arit_overflow.c',
346
'gallivm/lp_bld_arit_overflow.h',
347
'gallivm/lp_bld_assert.c',
348
'gallivm/lp_bld_assert.h',
349
'gallivm/lp_bld_bitarit.c',
350
'gallivm/lp_bld_bitarit.h',
351
'gallivm/lp_bld_const.c',
352
'gallivm/lp_bld_const.h',
353
'gallivm/lp_bld_conv.c',
354
'gallivm/lp_bld_conv.h',
355
'gallivm/lp_bld_coro.c',
356
'gallivm/lp_bld_coro.h',
357
'gallivm/lp_bld_debug.cpp',
358
'gallivm/lp_bld_debug.h',
359
'gallivm/lp_bld_flow.c',
360
'gallivm/lp_bld_flow.h',
361
'gallivm/lp_bld_format_aos_array.c',
362
'gallivm/lp_bld_format_aos.c',
363
'gallivm/lp_bld_format_float.c',
364
'gallivm/lp_bld_format_s3tc.c',
365
'gallivm/lp_bld_format.c',
366
'gallivm/lp_bld_format.h',
367
'gallivm/lp_bld_format_soa.c',
368
'gallivm/lp_bld_format_srgb.c',
369
'gallivm/lp_bld_format_yuv.c',
370
'gallivm/lp_bld_gather.c',
371
'gallivm/lp_bld_gather.h',
373
'gallivm/lp_bld_init.c',
374
'gallivm/lp_bld_init.h',
375
'gallivm/lp_bld_intr.c',
376
'gallivm/lp_bld_intr.h',
377
'gallivm/lp_bld_ir_common.c',
378
'gallivm/lp_bld_ir_common.h',
379
'gallivm/lp_bld_limits.h',
380
'gallivm/lp_bld_logic.c',
381
'gallivm/lp_bld_logic.h',
382
'gallivm/lp_bld_misc.cpp',
383
'gallivm/lp_bld_misc.h',
384
'gallivm/lp_bld_nir.h',
385
'gallivm/lp_bld_nir.c',
386
'gallivm/lp_bld_nir_aos.c',
387
'gallivm/lp_bld_nir_soa.c',
388
'gallivm/lp_bld_pack.c',
389
'gallivm/lp_bld_pack.h',
390
'gallivm/lp_bld_printf.c',
391
'gallivm/lp_bld_printf.h',
392
'gallivm/lp_bld_quad.c',
393
'gallivm/lp_bld_quad.h',
394
'gallivm/lp_bld_sample_aos.c',
395
'gallivm/lp_bld_sample_aos.h',
396
'gallivm/lp_bld_sample.c',
397
'gallivm/lp_bld_sample.h',
398
'gallivm/lp_bld_sample_soa.c',
399
'gallivm/lp_bld_struct.c',
400
'gallivm/lp_bld_struct.h',
401
'gallivm/lp_bld_swizzle.c',
402
'gallivm/lp_bld_swizzle.h',
403
'gallivm/lp_bld_tgsi_action.c',
404
'gallivm/lp_bld_tgsi_action.h',
405
'gallivm/lp_bld_tgsi_aos.c',
406
'gallivm/lp_bld_tgsi.c',
407
'gallivm/lp_bld_tgsi.h',
408
'gallivm/lp_bld_tgsi_info.c',
409
'gallivm/lp_bld_tgsi_soa.c',
410
'gallivm/lp_bld_type.c',
411
'gallivm/lp_bld_type.h',
414
'draw/draw_llvm_sample.c',
415
'draw/draw_pt_fetch_shade_pipeline_llvm.c',
416
'draw/draw_vs_llvm.c',
417
'tessellator/tessellator.cpp',
418
'tessellator/tessellator.hpp',
419
'tessellator/p_tessellator.cpp',
420
'tessellator/p_tessellator.h',
421
'nir/nir_to_tgsi_info.c',
422
'nir/nir_to_tgsi_info.h',
426
files_libgalliumvl = files(
427
'vl/vl_bicubic_filter.c',
428
'vl/vl_bicubic_filter.h',
429
'vl/vl_compositor.c',
430
'vl/vl_compositor.h',
431
'vl/vl_compositor_gfx.c',
432
'vl/vl_compositor_gfx.h',
433
'vl/vl_compositor_cs.c',
434
'vl/vl_compositor_cs.h',
440
'vl/vl_deint_filter.c',
441
'vl/vl_deint_filter.h',
444
'vl/vl_matrix_filter.c',
445
'vl/vl_matrix_filter.h',
448
'vl/vl_median_filter.c',
449
'vl/vl_median_filter.h',
450
'vl/vl_mpeg12_bitstream.c',
451
'vl/vl_mpeg12_bitstream.h',
452
'vl/vl_mpeg12_decoder.c',
453
'vl/vl_mpeg12_decoder.h',
455
'vl/vl_vertex_buffers.c',
456
'vl/vl_vertex_buffers.h',
457
'vl/vl_video_buffer.c',
458
'vl/vl_video_buffer.h',
461
'vl/vl_probs_table.h',
465
files_libgalliumvlwinsys = files('vl/vl_winsys.h',
466
'vl/vl_winsys_drm.c')
467
if with_dri2 and with_platform_x11
468
files_libgalliumvlwinsys += files('vl/vl_winsys_dri.c')
471
dep_xcb_sync, dep_xcb_present, dep_xshmfence, dep_xcb_xfixes,
474
files_libgalliumvlwinsys += files('vl/vl_winsys_dri3.c')
478
prog_enums2names = files('driver_trace/enums2names.py')
479
files_libgallium += custom_target(
481
input: '../include/pipe/p_defines.h',
482
output: ['tr_util.c', 'tr_util.h'],
483
command: [prog_python, prog_enums2names, '@INPUT@', '-C', '@OUTPUT0@', '-H', '@OUTPUT1@', '-I', 'tr_util.h'],
484
depend_files: prog_enums2names,
487
files_libgallium += custom_target(
489
input: 'util/u_tracepoints.py',
490
output: 'u_tracepoints.c',
492
prog_python, '@INPUT@',
493
'-p', join_paths(meson.source_root(), 'src/util/perf/'),
496
depend_files: u_trace_py,
499
files_u_tracepoints = custom_target(
501
input: 'util/u_tracepoints.py',
502
output: 'u_tracepoints.h',
504
prog_python, '@INPUT@',
505
'-p', join_paths(meson.source_root(), 'src/util/perf/'),
508
depend_files: u_trace_py,
511
files_libgallium += files_u_tracepoints
513
idep_u_tracepoints = declare_dependency(
514
sources: files_u_tracepoints,
517
libgallium_extra_c_args = []
518
libgallium = static_library(
521
include_directories : [
522
inc_loader, inc_gallium, inc_src, inc_include, include_directories('util')
524
c_args : [c_msvc_compat_args, libgallium_extra_c_args],
525
cpp_args : [cpp_msvc_compat_args],
526
gnu_symbol_visibility : 'hidden',
528
dep_libdrm, dep_llvm, dep_dl, dep_m, dep_thread, dep_lmsensors, dep_ws2_32,
529
idep_nir, idep_nir_headers, idep_mesautil,
531
build_by_default : false
534
libgalliumvl_stub = static_library(
537
c_args : [c_msvc_compat_args],
538
cpp_args : [cpp_msvc_compat_args],
539
gnu_symbol_visibility : 'hidden',
540
include_directories: [inc_gallium, inc_include, inc_src],
541
dependencies : idep_mesautil,
542
build_by_default : false,
545
libgalliumvl = static_library(
548
c_args : [c_msvc_compat_args],
549
cpp_args : [cpp_msvc_compat_args],
550
gnu_symbol_visibility : 'hidden',
551
include_directories : [inc_gallium, inc_include, inc_src],
552
dependencies : idep_mesautil,
553
build_by_default : false,
556
# XXX: The dependencies here may be off...
557
libgalliumvlwinsys = static_library(
559
files_libgalliumvlwinsys,
560
include_directories : [inc_gallium, inc_include, inc_loader, inc_src],
561
dependencies : [dep_libdrm, vlwinsys_deps, idep_mesautil],
562
build_by_default : false,