• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © 2017 Dylan Baker
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_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',
32  'draw/draw_fs.c',
33  'draw/draw_fs.h',
34  'draw/draw_gs.c',
35  'draw/draw_gs.h',
36  'draw/draw_gs_tmp.h',
37  'draw/draw_pipe_aaline.c',
38  'draw/draw_pipe_aapoint.c',
39  'draw/draw_pipe.c',
40  'draw/draw_pipe.h',
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',
59  'draw/draw_pt.c',
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',
65  'draw/draw_pt.h',
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',
73  'draw/draw_tess.c',
74  'draw/draw_tess.h',
75  'draw/draw_vbuf.h',
76  'draw/draw_vertex.c',
77  'draw/draw_vertex.h',
78  'draw/draw_vs.c',
79  'draw/draw_vs_exec.c',
80  'draw/draw_vs.h',
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',
111  'hud/font.c',
112  'hud/font.h',
113  'hud/hud_context.c',
114  'hud/hud_context.h',
115  'hud/hud_cpu.c',
116  'hud/hud_nic.c',
117  'hud/hud_cpufreq.c',
118  'hud/hud_diskstat.c',
119  'hud/hud_sensors_temp.c',
120  'hud/hud_driver_query.c',
121  'hud/hud_fps.c',
122  'hud/hud_private.h',
123  'os/os_mman.h',
124  'os/os_process.c',
125  'os/os_process.h',
126  'os/os_thread.h',
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',
159  'rbug/rbug_core.c',
160  'rbug/rbug_core.h',
161  'rbug/rbug_demarshal.c',
162  'rbug/rbug.h',
163  'rbug/rbug_internal.h',
164  'rbug/rbug_proto.h',
165  'rbug/rbug_shader.c',
166  'rbug/rbug_shader.h',
167  'rbug/rbug_texture.c',
168  'rbug/rbug_texture.h',
169  'rtasm/rtasm_cpu.c',
170  'rtasm/rtasm_cpu.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',
177  'tgsi/tgsi_build.c',
178  'tgsi/tgsi_build.h',
179  'tgsi/tgsi_dump.c',
180  'tgsi/tgsi_dump.h',
181  'tgsi/tgsi_dynamic_indexing.c',
182  'tgsi/tgsi_exec.c',
183  'tgsi/tgsi_exec.h',
184  'tgsi/tgsi_from_mesa.c',
185  'tgsi/tgsi_from_mesa.h',
186  'tgsi/tgsi_info.c',
187  'tgsi/tgsi_info.h',
188  'tgsi/tgsi_info_opcodes.h',
189  'tgsi/tgsi_iterate.c',
190  'tgsi/tgsi_iterate.h',
191  'tgsi/tgsi_lowering.c',
192  'tgsi/tgsi_lowering.h',
193  'tgsi/tgsi_opcode_tmp.h',
194  'tgsi/tgsi_parse.c',
195  'tgsi/tgsi_parse.h',
196  'tgsi/tgsi_point_sprite.c',
197  'tgsi/tgsi_point_sprite.h',
198  'tgsi/tgsi_sanity.c',
199  'tgsi/tgsi_sanity.h',
200  'tgsi/tgsi_scan.c',
201  'tgsi/tgsi_scan.h',
202  'tgsi/tgsi_strings.c',
203  'tgsi/tgsi_strings.h',
204  'tgsi/tgsi_text.c',
205  'tgsi/tgsi_text.h',
206  'tgsi/tgsi_transform.c',
207  'tgsi/tgsi_transform.h',
208  'tgsi/tgsi_two_side.c',
209  'tgsi/tgsi_two_side.h',
210  'tgsi/tgsi_ureg.c',
211  'tgsi/tgsi_ureg.h',
212  'tgsi/tgsi_util.c',
213  'tgsi/tgsi_util.h',
214  'tgsi/tgsi_vpos.c',
215  'translate/translate.c',
216  'translate/translate.h',
217  'translate/translate_cache.c',
218  'translate/translate_cache.h',
219  'translate/translate_generic.c',
220  'translate/translate_sse.c',
221  'util/dbghelp.h',
222  'util/u_async_debug.h',
223  'util/u_async_debug.c',
224  'util/u_bitcast.h',
225  'util/u_bitmask.c',
226  'util/u_bitmask.h',
227  'util/u_blend.h',
228  'util/u_blitter.c',
229  'util/u_blitter.h',
230  'util/u_box.h',
231  'util/u_cache.c',
232  'util/u_cache.h',
233  'util/u_compute.c',
234  'util/u_compute.h',
235  'util/u_debug_flush.c',
236  'util/u_debug_flush.h',
237  'util/u_debug_image.c',
238  'util/u_debug_image.h',
239  'util/u_dirty_flags.h',
240  'util/u_dirty_surfaces.h',
241  'util/u_draw.c',
242  'util/u_draw.h',
243  'util/u_draw_quad.c',
244  'util/u_draw_quad.h',
245  'util/u_driconf.c',
246  'util/u_driconf.h',
247  'util/u_dual_blend.h',
248  'util/u_dump_defines.c',
249  'util/u_dump.h',
250  'util/u_dump_state.c',
251  'util/u_framebuffer.c',
252  'util/u_framebuffer.h',
253  'util/u_gen_mipmap.c',
254  'util/u_gen_mipmap.h',
255  'util/u_handle_table.c',
256  'util/u_handle_table.h',
257  'util/u_helpers.c',
258  'util/u_helpers.h',
259  'util/u_index_modify.c',
260  'util/u_index_modify.h',
261  'util/u_inlines.h',
262  'util/u_linear.c',
263  'util/u_linear.h',
264  'util/u_live_shader_cache.c',
265  'util/u_live_shader_cache.h',
266  'util/u_log.c',
267  'util/u_log.h',
268  'util/u_network.c',
269  'util/u_network.h',
270  'util/u_pack_color.h',
271  'util/u_prim.h',
272  'util/u_prim.c',
273  'util/u_prim_restart.c',
274  'util/u_prim_restart.h',
275  'util/u_pstipple.c',
276  'util/u_pstipple.h',
277  'util/u_pwr8.h',
278  'util/u_range.h',
279  'util/u_rect.h',
280  'util/u_resource.c',
281  'util/u_resource.h',
282  'util/u_sampler.c',
283  'util/u_sampler.h',
284  'util/u_screen.c',
285  'util/u_screen.h',
286  'util/u_simple_shaders.c',
287  'util/u_simple_shaders.h',
288  'util/u_split_draw.c',
289  'util/u_split_draw.h',
290  'util/u_split_prim.h',
291  'util/u_sse.h',
292  'util/u_suballoc.c',
293  'util/u_suballoc.h',
294  'util/u_surface.c',
295  'util/u_surface.h',
296  'util/u_tests.c',
297  'util/u_tests.h',
298  'util/u_texture.c',
299  'util/u_texture.h',
300  'util/u_tile.c',
301  'util/u_tile.h',
302  'util/u_transfer.c',
303  'util/u_transfer.h',
304  'util/u_transfer_helper.c',
305  'util/u_transfer_helper.h',
306  'util/u_threaded_context.c',
307  'util/u_threaded_context.h',
308  'util/u_threaded_context_calls.h',
309  'util/u_trace_gallium.c',
310  'util/u_trace_gallium.h',
311  'util/u_upload_mgr.c',
312  'util/u_upload_mgr.h',
313  'util/u_vbuf.c',
314  'util/u_vbuf.h',
315  'util/u_vertex_state_cache.c',
316  'util/u_vertex_state_cache.h',
317  'util/u_video.h',
318  'util/u_viewport.h',
319  'nir/tgsi_to_nir.c',
320  'nir/tgsi_to_nir.h',
321  'nir/nir_to_tgsi.c',
322  'nir/nir_to_tgsi.h',
323  'nir/nir_draw_helpers.c',
324  'nir/nir_draw_helpers.h',
325  'nir/nir_helpers.c',
326  'nir/nir_helpers.h',
327)
328
329if dep_libdrm.found()
330  files_libgallium += files(
331    'renderonly/renderonly.c',
332    'renderonly/renderonly.h',
333  )
334endif
335
336if draw_with_llvm
337  files_libgallium += files(
338    'gallivm/lp_bld_arit.c',
339    'gallivm/lp_bld_arit.h',
340    'gallivm/lp_bld_arit_overflow.c',
341    'gallivm/lp_bld_arit_overflow.h',
342    'gallivm/lp_bld_assert.c',
343    'gallivm/lp_bld_assert.h',
344    'gallivm/lp_bld_bitarit.c',
345    'gallivm/lp_bld_bitarit.h',
346    'gallivm/lp_bld_const.c',
347    'gallivm/lp_bld_const.h',
348    'gallivm/lp_bld_conv.c',
349    'gallivm/lp_bld_conv.h',
350    'gallivm/lp_bld_coro.c',
351    'gallivm/lp_bld_coro.h',
352    'gallivm/lp_bld_debug.cpp',
353    'gallivm/lp_bld_debug.h',
354    'gallivm/lp_bld_flow.c',
355    'gallivm/lp_bld_flow.h',
356    'gallivm/lp_bld_format_aos_array.c',
357    'gallivm/lp_bld_format_aos.c',
358    'gallivm/lp_bld_format_float.c',
359    'gallivm/lp_bld_format_s3tc.c',
360    'gallivm/lp_bld_format.c',
361    'gallivm/lp_bld_format.h',
362    'gallivm/lp_bld_format_soa.c',
363    'gallivm/lp_bld_format_srgb.c',
364    'gallivm/lp_bld_format_yuv.c',
365    'gallivm/lp_bld_gather.c',
366    'gallivm/lp_bld_gather.h',
367    'gallivm/lp_bld.h',
368    'gallivm/lp_bld_init.c',
369    'gallivm/lp_bld_init.h',
370    'gallivm/lp_bld_intr.c',
371    'gallivm/lp_bld_intr.h',
372    'gallivm/lp_bld_ir_common.c',
373    'gallivm/lp_bld_ir_common.h',
374    'gallivm/lp_bld_limits.h',
375    'gallivm/lp_bld_logic.c',
376    'gallivm/lp_bld_logic.h',
377    'gallivm/lp_bld_misc.cpp',
378    'gallivm/lp_bld_misc.h',
379    'gallivm/lp_bld_nir.h',
380    'gallivm/lp_bld_nir.c',
381    'gallivm/lp_bld_nir_aos.c',
382    'gallivm/lp_bld_nir_soa.c',
383    'gallivm/lp_bld_pack.c',
384    'gallivm/lp_bld_pack.h',
385    'gallivm/lp_bld_printf.c',
386    'gallivm/lp_bld_printf.h',
387    'gallivm/lp_bld_quad.c',
388    'gallivm/lp_bld_quad.h',
389    'gallivm/lp_bld_sample_aos.c',
390    'gallivm/lp_bld_sample_aos.h',
391    'gallivm/lp_bld_sample.c',
392    'gallivm/lp_bld_sample.h',
393    'gallivm/lp_bld_sample_soa.c',
394    'gallivm/lp_bld_struct.c',
395    'gallivm/lp_bld_struct.h',
396    'gallivm/lp_bld_swizzle.c',
397    'gallivm/lp_bld_swizzle.h',
398    'gallivm/lp_bld_tgsi_action.c',
399    'gallivm/lp_bld_tgsi_action.h',
400    'gallivm/lp_bld_tgsi_aos.c',
401    'gallivm/lp_bld_tgsi.c',
402    'gallivm/lp_bld_tgsi.h',
403    'gallivm/lp_bld_tgsi_info.c',
404    'gallivm/lp_bld_tgsi_soa.c',
405    'gallivm/lp_bld_type.c',
406    'gallivm/lp_bld_type.h',
407    'draw/draw_llvm.c',
408    'draw/draw_llvm.h',
409    'draw/draw_llvm_sample.c',
410    'draw/draw_pt_fetch_shade_pipeline_llvm.c',
411    'draw/draw_vs_llvm.c',
412    'tessellator/tessellator.cpp',
413    'tessellator/tessellator.hpp',
414    'tessellator/p_tessellator.cpp',
415    'tessellator/p_tessellator.h',
416    'nir/nir_to_tgsi_info.c',
417    'nir/nir_to_tgsi_info.h',
418  )
419endif
420
421files_libgalliumvl = files(
422  'vl/vl_bicubic_filter.c',
423  'vl/vl_bicubic_filter.h',
424  'vl/vl_codec.c',
425  'vl/vl_codec.h',
426  'vl/vl_compositor.c',
427  'vl/vl_compositor.h',
428  'vl/vl_compositor_gfx.c',
429  'vl/vl_compositor_gfx.h',
430  'vl/vl_compositor_cs.c',
431  'vl/vl_compositor_cs.h',
432  'vl/vl_csc.c',
433  'vl/vl_csc.h',
434  'vl/vl_decoder.c',
435  'vl/vl_decoder.h',
436  'vl/vl_defines.h',
437  'vl/vl_deint_filter.c',
438  'vl/vl_deint_filter.h',
439  'vl/vl_idct.c',
440  'vl/vl_idct.h',
441  'vl/vl_matrix_filter.c',
442  'vl/vl_matrix_filter.h',
443  'vl/vl_mc.c',
444  'vl/vl_mc.h',
445  'vl/vl_median_filter.c',
446  'vl/vl_median_filter.h',
447  'vl/vl_mpeg12_bitstream.c',
448  'vl/vl_mpeg12_bitstream.h',
449  'vl/vl_mpeg12_decoder.c',
450  'vl/vl_mpeg12_decoder.h',
451  'vl/vl_types.h',
452  'vl/vl_vertex_buffers.c',
453  'vl/vl_vertex_buffers.h',
454  'vl/vl_video_buffer.c',
455  'vl/vl_video_buffer.h',
456  'vl/vl_zscan.c',
457  'vl/vl_zscan.h',
458  'vl/vl_probs_table.h',
459)
460
461vlwinsys_deps = []
462files_libgalliumvlwinsys = files('vl/vl_winsys.h',
463                                 'vl/vl_winsys_drm.c')
464if with_dri2 and with_platform_x11
465  files_libgalliumvlwinsys += files('vl/vl_winsys_dri.c')
466  if with_dri3
467    vlwinsys_deps += [
468      dep_xcb_sync, dep_xcb_present, dep_xshmfence, dep_xcb_xfixes,
469      dep_xcb_dri3,
470    ]
471    files_libgalliumvlwinsys += files('vl/vl_winsys_dri3.c')
472  endif
473endif
474
475if with_glx == 'xlib' or with_glx == 'gallium-xlib'
476  files_libgalliumvlwinsys += files('vl/vl_winsys_xlib_swrast.c')
477elif with_gallium_drisw_kms
478  files_libgalliumvlwinsys += files('vl/vl_winsys_dri_vgem.c')
479endif
480
481prog_enums2names = files('driver_trace/enums2names.py')
482files_libgallium += custom_target(
483  'tr_util.[ch]',
484  input: '../include/pipe/p_defines.h',
485  output: ['tr_util.c', 'tr_util.h'],
486  command: [prog_python, prog_enums2names, '@INPUT@', '-C', '@OUTPUT0@', '-H', '@OUTPUT1@', '-I', 'tr_util.h'],
487  depend_files: prog_enums2names,
488)
489
490files_libgallium += custom_target(
491  'u_tracepoints.c',
492  input: 'util/u_tracepoints.py',
493  output: 'u_tracepoints.c',
494  command: [
495    prog_python, '@INPUT@',
496    '-p', join_paths(meson.source_root(), 'src/util/perf/'),
497    '-C', '@OUTPUT@',
498  ],
499  depend_files: u_trace_py,
500)
501
502files_u_tracepoints = custom_target(
503  'u_tracepoints.h',
504  input: 'util/u_tracepoints.py',
505  output: 'u_tracepoints.h',
506  command: [
507    prog_python, '@INPUT@',
508    '-p', join_paths(meson.source_root(), 'src/util/perf/'),
509    '-H', '@OUTPUT@',
510  ],
511  depend_files: u_trace_py,
512)
513
514files_libgallium += files_u_tracepoints
515
516idep_u_tracepoints = declare_dependency(
517  sources: files_u_tracepoints,
518)
519
520libgallium_extra_c_args = []
521libgallium = static_library(
522  'gallium',
523  [files_libgallium],
524  include_directories : [
525    inc_loader, inc_gallium, inc_src, inc_include, include_directories('util')
526  ],
527  c_args : [c_msvc_compat_args, libgallium_extra_c_args],
528  cpp_args : [cpp_msvc_compat_args],
529  gnu_symbol_visibility : 'hidden',
530  dependencies : [
531    dep_libdrm, dep_llvm, dep_dl, dep_m, dep_thread, dep_lmsensors, dep_ws2_32,
532    idep_nir, idep_nir_headers, idep_mesautil,
533  ],
534  build_by_default : false
535)
536
537libgalliumvl_stub = static_library(
538  'galliumvl_stub',
539  'vl/vl_stubs.c',
540  c_args : [c_msvc_compat_args],
541  cpp_args : [cpp_msvc_compat_args],
542  gnu_symbol_visibility : 'hidden',
543  include_directories: [inc_gallium, inc_include, inc_src],
544  dependencies : idep_mesautil,
545  build_by_default : false,
546)
547
548libgalliumvl = static_library(
549  'galliumvl',
550  files_libgalliumvl,
551  c_args : [c_msvc_compat_args],
552  cpp_args : [cpp_msvc_compat_args],
553  gnu_symbol_visibility : 'hidden',
554  include_directories : [inc_gallium, inc_include, inc_src],
555  dependencies : idep_mesautil,
556  build_by_default : false,
557)
558
559# XXX: The dependencies here may be off...
560libgalliumvlwinsys = static_library(
561  'galliumvlwinsys',
562  files_libgalliumvlwinsys,
563  include_directories : [inc_gallium, inc_include, inc_loader, inc_src],
564  dependencies : [dep_libdrm, vlwinsys_deps, idep_mesautil],
565  build_by_default : false,
566)
567