glthread: move buffer functions into glthread_bufferobj.c
[mesa.git] / src / mesa / meson.build
1 # Copyright © 2017 Intel Corporation
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
21 subdir('program')
22 subdir('main')
23
24 # files shared between classic mesa and gallium mesa
25 files_libmesa_common = files(
26 'program/arbprogparse.c',
27 'program/arbprogparse.h',
28 'program/ir_to_mesa.cpp',
29 'program/ir_to_mesa.h',
30 'program/prog_cache.c',
31 'program/prog_cache.h',
32 'program/prog_execute.c',
33 'program/prog_execute.h',
34 'program/prog_instruction.c',
35 'program/prog_instruction.h',
36 'program/prog_noise.c',
37 'program/prog_noise.h',
38 'program/prog_opt_constant_fold.c',
39 'program/prog_optimize.c',
40 'program/prog_optimize.h',
41 'program/prog_parameter.c',
42 'program/prog_parameter.h',
43 'program/prog_parameter_layout.c',
44 'program/prog_parameter_layout.h',
45 'program/prog_print.c',
46 'program/prog_print.h',
47 'program/program.c',
48 'program/program.h',
49 'program/programopt.c',
50 'program/programopt.h',
51 'program/program_parse_extra.c',
52 'program/program_parser.h',
53 'program/prog_statevars.c',
54 'program/prog_statevars.h',
55 'program/symbol_table.c',
56 'program/symbol_table.h',
57 'program/prog_to_nir.c',
58 'program/prog_to_nir.h',
59 'main/accum.c',
60 'main/accum.h',
61 'main/api_arrayelt.c',
62 'main/api_arrayelt.h',
63 'main/api_exec.h',
64 'main/api_loopback.c',
65 'main/api_loopback.h',
66 'main/arbprogram.c',
67 'main/arbprogram.h',
68 'main/arrayobj.c',
69 'main/arrayobj.h',
70 'main/atifragshader.c',
71 'main/atifragshader.h',
72 'main/attrib.c',
73 'main/attrib.h',
74 'main/barrier.c',
75 'main/barrier.h',
76 'main/bbox.c',
77 'main/bbox.h',
78 'main/blend.c',
79 'main/blend.h',
80 'main/blit.c',
81 'main/blit.h',
82 'main/bufferobj.c',
83 'main/bufferobj.h',
84 'main/buffers.c',
85 'main/buffers.h',
86 'main/clear.c',
87 'main/clear.h',
88 'main/clip.c',
89 'main/clip.h',
90 'main/colormac.h',
91 'main/colortab.c',
92 'main/colortab.h',
93 'main/compute.c',
94 'main/compute.h',
95 'main/compiler.h',
96 'main/condrender.c',
97 'main/condrender.h',
98 'main/config.h',
99 'main/conservativeraster.c',
100 'main/conservativeraster.h',
101 'main/context.c',
102 'main/context.h',
103 'main/convolve.c',
104 'main/convolve.h',
105 'main/copyimage.c',
106 'main/copyimage.h',
107 'main/cpuinfo.c',
108 'main/cpuinfo.h',
109 'main/dd.h',
110 'main/debug.c',
111 'main/debug.h',
112 'main/debug_output.c',
113 'main/debug_output.h',
114 'main/depth.c',
115 'main/depth.h',
116 'main/dlist.c',
117 'main/dlist.h',
118 'main/draw.c',
119 'main/draw.h',
120 'main/drawpix.c',
121 'main/drawpix.h',
122 'main/drawtex.c',
123 'main/drawtex.h',
124 'main/draw_validate.c',
125 'main/draw_validate.h',
126 'main/enable.c',
127 'main/enable.h',
128 'main/enums.h',
129 'main/errors.c',
130 'main/errors.h',
131 'main/eval.c',
132 'main/eval.h',
133 'main/execmem.c',
134 'main/extensions.c',
135 'main/extensions.h',
136 'main/extensions_table.c',
137 'main/extensions_table.h',
138 'main/externalobjects.c',
139 'main/externalobjects.h',
140 'main/fbobject.c',
141 'main/fbobject.h',
142 'main/feedback.c',
143 'main/feedback.h',
144 'main/ff_fragment_shader.cpp',
145 'main/ffvertex_prog.c',
146 'main/ffvertex_prog.h',
147 'main/fog.c',
148 'main/fog.h',
149 'main/format_pack.h',
150 'main/format_unpack.h',
151 'main/formatquery.c',
152 'main/formatquery.h',
153 'main/formats.c',
154 'main/formats.h',
155 'main/format_utils.c',
156 'main/format_utils.h',
157 'main/framebuffer.c',
158 'main/framebuffer.h',
159 'main/get.c',
160 'main/get.h',
161 'main/genmipmap.c',
162 'main/genmipmap.h',
163 'main/getstring.c',
164 'main/glformats.c',
165 'main/glformats.h',
166 'main/glspirv.c',
167 'main/glspirv.h',
168 'main/glthread.c',
169 'main/glthread.h',
170 'main/glthread_bufferobj.c',
171 'main/glthread_varray.c',
172 'main/glheader.h',
173 'main/hash.c',
174 'main/hash.h',
175 'main/hint.c',
176 'main/hint.h',
177 'main/histogram.c',
178 'main/histogram.h',
179 'main/image.c',
180 'main/image.h',
181 'main/imports.c',
182 'main/imports.h',
183 'main/light.c',
184 'main/light.h',
185 'main/lines.c',
186 'main/lines.h',
187 'main/macros.h',
188 'main/marshal.c',
189 'main/marshal.h',
190 'main/matrix.c',
191 'main/matrix.h',
192 'main/mipmap.c',
193 'main/mipmap.h',
194 'main/menums.h',
195 'main/mtypes.h',
196 'main/multisample.c',
197 'main/multisample.h',
198 'main/objectlabel.c',
199 'main/objectlabel.h',
200 'main/objectpurge.c',
201 'main/objectpurge.h',
202 'main/pack.c',
203 'main/pack.h',
204 'main/pbo.c',
205 'main/pbo.h',
206 'main/performance_monitor.c',
207 'main/performance_monitor.h',
208 'main/performance_query.c',
209 'main/performance_query.h',
210 'main/pipelineobj.c',
211 'main/pipelineobj.h',
212 'main/pixel.c',
213 'main/pixel.h',
214 'main/pixelstore.c',
215 'main/pixelstore.h',
216 'main/pixeltransfer.c',
217 'main/pixeltransfer.h',
218 'main/points.c',
219 'main/points.h',
220 'main/polygon.c',
221 'main/polygon.h',
222 'main/program_binary.c',
223 'main/program_binary.h',
224 'main/program_resource.c',
225 'main/program_resource.h',
226 'main/querymatrix.c',
227 'main/querymatrix.h',
228 'main/queryobj.c',
229 'main/queryobj.h',
230 'main/rastpos.c',
231 'main/rastpos.h',
232 'main/readpix.c',
233 'main/readpix.h',
234 'main/remap.c',
235 'main/remap.h',
236 'main/renderbuffer.c',
237 'main/renderbuffer.h',
238 'main/robustness.c',
239 'main/samplerobj.c',
240 'main/samplerobj.h',
241 'main/scissor.c',
242 'main/scissor.h',
243 'main/shaderapi.c',
244 'main/shaderapi.h',
245 'main/shaderimage.c',
246 'main/shaderimage.h',
247 'main/shaderobj.c',
248 'main/shaderobj.h',
249 'main/shader_query.cpp',
250 'main/shared.c',
251 'main/shared.h',
252 'main/spirv_extensions.c',
253 'main/spirv_extensions.h',
254 'main/state.c',
255 'main/state.h',
256 'main/stencil.c',
257 'main/stencil.h',
258 'main/syncobj.c',
259 'main/syncobj.h',
260 'main/texcompress.c',
261 'main/texcompress_astc.cpp',
262 'main/texcompress_astc.h',
263 'main/texcompress_bptc.c',
264 'main/texcompress_bptc.h',
265 'main/texcompress_cpal.c',
266 'main/texcompress_cpal.h',
267 'main/texcompress_etc.c',
268 'main/texcompress_etc.h',
269 'main/texcompress_etc_tmp.h',
270 'main/texcompress_fxt1.c',
271 'main/texcompress_fxt1.h',
272 'main/texcompress.h',
273 'main/texcompress_rgtc.c',
274 'main/texcompress_rgtc.h',
275 'main/texcompress_s3tc.c',
276 'main/texcompress_s3tc.h',
277 'main/texenv.c',
278 'main/texenv.h',
279 'main/texenvprogram.h',
280 'main/texformat.c',
281 'main/texformat.h',
282 'main/texgen.c',
283 'main/texgen.h',
284 'main/texgetimage.c',
285 'main/texgetimage.h',
286 'main/teximage.c',
287 'main/teximage.h',
288 'main/texobj.c',
289 'main/texobj.h',
290 'main/texparam.c',
291 'main/texparam.h',
292 'main/texstate.c',
293 'main/texstate.h',
294 'main/texstorage.c',
295 'main/texstorage.h',
296 'main/texstore.c',
297 'main/texstore.h',
298 'main/texturebindless.c',
299 'main/texturebindless.h',
300 'main/textureview.c',
301 'main/textureview.h',
302 'main/transformfeedback.c',
303 'main/transformfeedback.h',
304 'main/uniform_query.cpp',
305 'main/uniforms.c',
306 'main/uniforms.h',
307 'main/varray.c',
308 'main/varray.h',
309 'main/vdpau.c',
310 'main/vdpau.h',
311 'main/version.c',
312 'main/version.h',
313 'main/viewport.c',
314 'main/viewport.h',
315 'main/vtxfmt.c',
316 'main/vtxfmt.h',
317 'main/es1_conversion.c',
318 'main/es1_conversion.h',
319 'math/m_debug.h',
320 'math/m_debug_clip.c',
321 'math/m_debug_norm.c',
322 'math/m_debug_util.h',
323 'math/m_debug_xform.c',
324 'math/m_eval.c',
325 'math/m_eval.h',
326 'math/m_matrix.c',
327 'math/m_matrix.h',
328 'math/m_trans_tmp.h',
329 'math/m_translate.c',
330 'math/m_translate.h',
331 'math/m_vector.c',
332 'math/m_vector.h',
333 'vbo/vbo_attrib.h',
334 'vbo/vbo_attrib_tmp.h',
335 'vbo/vbo_context.c',
336 'vbo/vbo_exec_api.c',
337 'vbo/vbo_exec.c',
338 'vbo/vbo_exec_draw.c',
339 'vbo/vbo_exec_eval.c',
340 'vbo/vbo_exec.h',
341 'vbo/vbo.h',
342 'vbo/vbo_init_tmp.h',
343 'vbo/vbo_minmax_index.c',
344 'vbo/vbo_noop.c',
345 'vbo/vbo_noop.h',
346 'vbo/vbo_primitive_restart.c',
347 'vbo/vbo_save_api.c',
348 'vbo/vbo_save.c',
349 'vbo/vbo_save_draw.c',
350 'vbo/vbo_save.h',
351 'vbo/vbo_save_loopback.c',
352 'vbo/vbo_util.h',
353 'x86/common_x86.c',
354 )
355
356 # mesa files
357 files_libmesa_classic = files(
358 'math/m_clip_tmp.h',
359 'math/m_copy_tmp.h',
360 'math/m_dotprod_tmp.h',
361 'math/m_norm_tmp.h',
362 'math/m_xform.c',
363 'math/m_xform.h',
364 'math/m_xform_tmp.h',
365 'tnl/t_context.c',
366 'tnl/t_context.h',
367 'tnl/t_draw.c',
368 'tnl/tnl.h',
369 'tnl/t_pipeline.c',
370 'tnl/t_pipeline.h',
371 'tnl/t_rebase.c',
372 'tnl/t_split.c',
373 'tnl/t_split_copy.c',
374 'tnl/t_split.h',
375 'tnl/t_split_inplace.c',
376 'tnl/t_vb_cliptmp.h',
377 'tnl/t_vb_fog.c',
378 'tnl/t_vb_light.c',
379 'tnl/t_vb_lighttmp.h',
380 'tnl/t_vb_normals.c',
381 'tnl/t_vb_points.c',
382 'tnl/t_vb_program.c',
383 'tnl/t_vb_render.c',
384 'tnl/t_vb_rendertmp.h',
385 'tnl/t_vb_texgen.c',
386 'tnl/t_vb_texmat.c',
387 'tnl/t_vb_vertex.c',
388 'tnl/t_vertex.c',
389 'tnl/t_vertex_generic.c',
390 'tnl/t_vertex.h',
391 'tnl/t_vertex_sse.c',
392 'tnl/t_vp_build.c',
393 'tnl/t_vp_build.h',
394 'swrast/s_aaline.c',
395 'swrast/s_aaline.h',
396 'swrast/s_aalinetemp.h',
397 'swrast/s_aatriangle.c',
398 'swrast/s_aatriangle.h',
399 'swrast/s_aatritemp.h',
400 'swrast/s_alpha.c',
401 'swrast/s_alpha.h',
402 'swrast/s_atifragshader.c',
403 'swrast/s_atifragshader.h',
404 'swrast/s_bitmap.c',
405 'swrast/s_blend.c',
406 'swrast/s_blend.h',
407 'swrast/s_blit.c',
408 'swrast/s_chan.h',
409 'swrast/s_clear.c',
410 'swrast/s_context.c',
411 'swrast/s_context.h',
412 'swrast/s_copypix.c',
413 'swrast/s_depth.c',
414 'swrast/s_depth.h',
415 'swrast/s_drawpix.c',
416 'swrast_setup/ss_tritmp.h',
417 'swrast_setup/ss_vb.h',
418 'swrast_setup/swrast_setup.h',
419 'swrast/s_feedback.c',
420 'swrast/s_feedback.h',
421 'swrast/s_fog.c',
422 'swrast/s_fog.h',
423 'swrast/s_fragprog.c',
424 'swrast/s_fragprog.h',
425 'swrast/s_lines.c',
426 'swrast/s_lines.h',
427 'swrast/s_linetemp.h',
428 'swrast/s_logic.c',
429 'swrast/s_logic.h',
430 'swrast/s_masking.c',
431 'swrast/s_masking.h',
432 'swrast/s_points.c',
433 'swrast/s_points.h',
434 'swrast/s_renderbuffer.c',
435 'swrast/s_renderbuffer.h',
436 'swrast/s_span.c',
437 'swrast/s_span.h',
438 'swrast/s_stencil.c',
439 'swrast/s_stencil.h',
440 'swrast/s_texcombine.c',
441 'swrast/s_texcombine.h',
442 'swrast/s_texfetch.c',
443 'swrast/s_texfetch.h',
444 'swrast/s_texfetch_tmp.h',
445 'swrast/s_texfilter.c',
446 'swrast/s_texfilter.h',
447 'swrast/s_texrender.c',
448 'swrast/s_texture.c',
449 'swrast/s_triangle.c',
450 'swrast/s_triangle.h',
451 'swrast/s_tritemp.h',
452 'swrast/swrast.h',
453 'swrast/s_zoom.c',
454 'swrast/s_zoom.h',
455 'swrast_setup/ss_context.c',
456 'swrast_setup/ss_context.h',
457 'swrast_setup/ss_triangle.c',
458 'swrast_setup/ss_triangle.h',
459 'drivers/common/driverfuncs.c',
460 'drivers/common/driverfuncs.h',
461 'drivers/common/meta_blit.c',
462 'drivers/common/meta_generate_mipmap.c',
463 'drivers/common/meta.c',
464 'drivers/common/meta.h',
465 'x86/x86_xform.c',
466 'x86/3dnow.c',
467 'x86/sse.c',
468 'x86/rtasm/x86sse.c',
469 'x86/rtasm/x86sse.h',
470 'sparc/sparc.c',
471 'x86-64/x86-64.c',
472 )
473
474 files_libmesa_gallium = files(
475 'state_tracker/st_atifs_to_tgsi.c',
476 'state_tracker/st_atifs_to_tgsi.h',
477 'state_tracker/st_atom_array.c',
478 'state_tracker/st_atom_atomicbuf.c',
479 'state_tracker/st_atom_blend.c',
480 'state_tracker/st_atom.c',
481 'state_tracker/st_atom_clip.c',
482 'state_tracker/st_atom_constbuf.c',
483 'state_tracker/st_atom_constbuf.h',
484 'state_tracker/st_atom_depth.c',
485 'state_tracker/st_atom_framebuffer.c',
486 'state_tracker/st_atom.h',
487 'state_tracker/st_atom_list.h',
488 'state_tracker/st_atom_image.c',
489 'state_tracker/st_atom_msaa.c',
490 'state_tracker/st_atom_pixeltransfer.c',
491 'state_tracker/st_atom_rasterizer.c',
492 'state_tracker/st_atom_sampler.c',
493 'state_tracker/st_atom_scissor.c',
494 'state_tracker/st_atom_shader.c',
495 'state_tracker/st_atom_stipple.c',
496 'state_tracker/st_atom_storagebuf.c',
497 'state_tracker/st_atom_tess.c',
498 'state_tracker/st_atom_texture.c',
499 'state_tracker/st_atom_viewport.c',
500 'state_tracker/st_cb_bitmap.c',
501 'state_tracker/st_cb_bitmap.h',
502 'state_tracker/st_cb_bitmap_shader.c',
503 'state_tracker/st_cb_blit.c',
504 'state_tracker/st_cb_blit.h',
505 'state_tracker/st_cb_bufferobjects.c',
506 'state_tracker/st_cb_bufferobjects.h',
507 'state_tracker/st_cb_clear.c',
508 'state_tracker/st_cb_clear.h',
509 'state_tracker/st_cb_compute.c',
510 'state_tracker/st_cb_compute.h',
511 'state_tracker/st_cb_condrender.c',
512 'state_tracker/st_cb_condrender.h',
513 'state_tracker/st_cb_copyimage.c',
514 'state_tracker/st_cb_copyimage.h',
515 'state_tracker/st_cb_drawpixels.c',
516 'state_tracker/st_cb_drawpixels.h',
517 'state_tracker/st_cb_drawpixels_shader.c',
518 'state_tracker/st_cb_drawtex.c',
519 'state_tracker/st_cb_drawtex.h',
520 'state_tracker/st_cb_eglimage.c',
521 'state_tracker/st_cb_eglimage.h',
522 'state_tracker/st_cb_fbo.c',
523 'state_tracker/st_cb_fbo.h',
524 'state_tracker/st_cb_feedback.c',
525 'state_tracker/st_cb_feedback.h',
526 'state_tracker/st_cb_flush.c',
527 'state_tracker/st_cb_flush.h',
528 'state_tracker/st_cb_memoryobjects.c',
529 'state_tracker/st_cb_memoryobjects.h',
530 'state_tracker/st_cb_msaa.c',
531 'state_tracker/st_cb_msaa.h',
532 'state_tracker/st_cb_perfmon.c',
533 'state_tracker/st_cb_perfmon.h',
534 'state_tracker/st_cb_perfquery.c',
535 'state_tracker/st_cb_perfquery.h',
536 'state_tracker/st_cb_program.c',
537 'state_tracker/st_cb_program.h',
538 'state_tracker/st_cb_queryobj.c',
539 'state_tracker/st_cb_queryobj.h',
540 'state_tracker/st_cb_rasterpos.c',
541 'state_tracker/st_cb_rasterpos.h',
542 'state_tracker/st_cb_readpixels.c',
543 'state_tracker/st_cb_readpixels.h',
544 'state_tracker/st_cb_strings.c',
545 'state_tracker/st_cb_strings.h',
546 'state_tracker/st_cb_semaphoreobjects.c',
547 'state_tracker/st_cb_semaphoreobjects.h',
548 'state_tracker/st_cb_syncobj.c',
549 'state_tracker/st_cb_syncobj.h',
550 'state_tracker/st_cb_texturebarrier.c',
551 'state_tracker/st_cb_texturebarrier.h',
552 'state_tracker/st_cb_texture.c',
553 'state_tracker/st_cb_texture.h',
554 'state_tracker/st_cb_viewport.c',
555 'state_tracker/st_cb_viewport.h',
556 'state_tracker/st_cb_xformfb.c',
557 'state_tracker/st_cb_xformfb.h',
558 'state_tracker/st_context.c',
559 'state_tracker/st_context.h',
560 'state_tracker/st_copytex.c',
561 'state_tracker/st_copytex.h',
562 'state_tracker/st_debug.c',
563 'state_tracker/st_debug.h',
564 'state_tracker/st_draw.c',
565 'state_tracker/st_draw_feedback.c',
566 'state_tracker/st_draw.h',
567 'state_tracker/st_extensions.c',
568 'state_tracker/st_extensions.h',
569 'state_tracker/st_format.c',
570 'state_tracker/st_format.h',
571 'state_tracker/st_gen_mipmap.c',
572 'state_tracker/st_gen_mipmap.h',
573 'state_tracker/st_gl_api.h',
574 'state_tracker/st_glsl_to_ir.cpp',
575 'state_tracker/st_glsl_to_ir.h',
576 'state_tracker/st_glsl_to_nir.cpp',
577 'state_tracker/st_glsl_to_tgsi.cpp',
578 'state_tracker/st_glsl_to_tgsi.h',
579 'state_tracker/st_glsl_to_tgsi_array_merge.cpp',
580 'state_tracker/st_glsl_to_tgsi_array_merge.h',
581 'state_tracker/st_glsl_to_tgsi_private.cpp',
582 'state_tracker/st_glsl_to_tgsi_private.h',
583 'state_tracker/st_glsl_to_tgsi_temprename.cpp',
584 'state_tracker/st_glsl_to_tgsi_temprename.h',
585 'state_tracker/st_manager.c',
586 'state_tracker/st_manager.h',
587 'state_tracker/st_mesa_to_tgsi.c',
588 'state_tracker/st_mesa_to_tgsi.h',
589 'state_tracker/st_nir.h',
590 'state_tracker/st_nir_builtins.c',
591 'state_tracker/st_nir_lower_builtin.c',
592 'state_tracker/st_nir_lower_tex_src_plane.c',
593 'state_tracker/st_pbo.c',
594 'state_tracker/st_pbo.h',
595 'state_tracker/st_program.c',
596 'state_tracker/st_program.h',
597 'state_tracker/st_sampler_view.c',
598 'state_tracker/st_sampler_view.h',
599 'state_tracker/st_scissor.c',
600 'state_tracker/st_scissor.h',
601 'state_tracker/st_shader_cache.c',
602 'state_tracker/st_shader_cache.h',
603 'state_tracker/st_texture.c',
604 'state_tracker/st_texture.h',
605 'state_tracker/st_tgsi_lower_depth_clamp.c',
606 'state_tracker/st_tgsi_lower_depth_clamp.h',
607 'state_tracker/st_tgsi_lower_yuv.c',
608 'state_tracker/st_tgsi_lower_yuv.h',
609 'state_tracker/st_util.h',
610 'state_tracker/st_vdpau.c',
611 'state_tracker/st_vdpau.h',
612 )
613
614 inc_libmesa_asm = []
615 if with_asm_arch == 'x86'
616 files_libmesa_common += files(
617 'x86/assyntax.h',
618 'x86/clip_args.h',
619 'x86/norm_args.h',
620 'x86/xform_args.h',
621 'x86/common_x86_asm.S',
622 'x86/common_x86_asm.h',
623 'x86/common_x86_features.h',
624 'x86/x86_xform.h',
625 'x86/x86_xform2.S',
626 'x86/x86_xform3.S',
627 'x86/x86_xform4.S',
628 'x86/x86_cliptest.S',
629 'x86/mmx.h',
630 'x86/mmx_blend.S',
631 'x86/mmx_blendtmp.h',
632 'x86/3dnow.h',
633 'x86/3dnow_xform1.S',
634 'x86/3dnow_xform2.S',
635 'x86/3dnow_xform3.S',
636 'x86/3dnow_xform4.S',
637 'x86/sse.h',
638 'x86/sse_xform1.S',
639 'x86/sse_xform2.S',
640 'x86/sse_xform3.S',
641 'x86/sse_xform4.S',
642 'x86/sse_normal.S',
643 'x86/read_rgba_span_x86.S',
644 )
645 inc_libmesa_asm = include_directories('x86')
646 elif with_asm_arch == 'x86_64'
647 files_libmesa_common += files('x86-64/x86-64.h', 'x86-64/xform4.S')
648 inc_libmesa_asm = include_directories('x86-64')
649 elif with_asm_arch == 'sparc'
650 files_libmesa_common += files(
651 'sparc/sparc_clip.S',
652 'sparc/norm.S',
653 'sparc/xform.S',
654 )
655 inc_libmesa_asm = include_directories('sparc')
656 endif
657
658 format_fallback_c = custom_target(
659 'format_fallback.c',
660 input : ['main/format_fallback.py', 'main/formats.csv'],
661 output : 'format_fallback.c',
662 command : [prog_python, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
663 depend_files : files('main/format_parser.py'),
664 )
665
666 get_hash_h = custom_target(
667 'get_hash.h',
668 input : ['main/get_hash_generator.py', gl_and_es_api_files],
669 output : 'get_hash.h',
670 command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
671 depend_files : files('main/get_hash_params.py'),
672 capture : true,
673 )
674
675 foreach x : [['format_info.h', 'format_info.py'],
676 ['format_pack.c', 'format_pack.py'],
677 ['format_unpack.c', 'format_unpack.py']]
678 files_libmesa_common += custom_target(
679 x[0],
680 input : ['main/@0@'.format(x[1]), 'main/formats.csv'],
681 output : x[0],
682 command : [prog_python, '@INPUT0@', '@INPUT1@'],
683 depend_files : files('main/format_parser.py'),
684 capture : true,
685 )
686 endforeach
687
688 files_libmesa_common += [
689 mesa_lex,
690 program_parse_tab,
691 main_api_exec_c,
692 main_enums_c,
693 format_fallback_c,
694 get_hash_h,
695 main_marshal_generated_c,
696 main_marshal_generated_h,
697 main_dispatch_h,
698 ir_expression_operation_h,
699 main_remap_helper_h,
700 sha1_h,
701 ]
702 files_libmesa_gallium += [
703 ir_expression_operation_h,
704 sha1_h,
705 ]
706
707 if with_sse41
708 libmesa_sse41 = static_library(
709 'mesa_sse41',
710 files('main/streaming-load-memcpy.c', 'main/sse_minmax.c'),
711 c_args : [c_vis_args, c_msvc_compat_args, sse41_args],
712 include_directories : inc_common,
713 )
714 else
715 libmesa_sse41 = []
716 endif
717
718 _mesa_windows_args = []
719 if with_platform_windows
720 _mesa_windows_args += [
721 '-D_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers
722 '-DBUILD_GL32' # declare gl* as __declspec(dllexport) in Mesa headers
723 ]
724 if not with_shared_glapi
725 # prevent _glapi_* from being declared __declspec(dllimport)
726 _mesa_windows_args += '-D_GLAPI_NO_EXPORTS'
727 endif
728 endif
729
730 libmesa_common = static_library(
731 'mesa_common',
732 files_libmesa_common,
733 c_args : [c_vis_args, c_msvc_compat_args, _mesa_windows_args],
734 cpp_args : [cpp_vis_args, cpp_msvc_compat_args, _mesa_windows_args],
735 include_directories : [inc_common, inc_libmesa_asm, include_directories('main')],
736 dependencies : idep_nir_headers,
737 build_by_default : false,
738 )
739
740 libmesa_classic = static_library(
741 'mesa_classic',
742 files_libmesa_classic,
743 c_args : [c_vis_args, c_msvc_compat_args],
744 cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
745 include_directories : [inc_common, inc_libmesa_asm, include_directories('main')],
746 link_with : [libmesa_common, libglsl, libmesa_sse41],
747 dependencies : idep_nir_headers,
748 build_by_default : false,
749 )
750
751 libmesa_gallium = static_library(
752 'mesa_gallium',
753 files_libmesa_gallium,
754 c_args : [c_vis_args, c_msvc_compat_args, _mesa_windows_args],
755 cpp_args : [cpp_vis_args, cpp_msvc_compat_args, _mesa_windows_args],
756 include_directories : [inc_common, inc_libmesa_asm, include_directories('main')],
757 link_with : [libmesa_common, libglsl, libmesa_sse41],
758 dependencies : [idep_nir_headers, dep_vdpau],
759 build_by_default : false,
760 )
761
762 subdir('drivers/dri')
763 if with_osmesa == 'classic'
764 subdir('drivers/osmesa')
765 endif
766 if with_glx == 'xlib'
767 subdir('drivers/x11')
768 endif
769 if with_tests and dri_drivers != []
770 subdir('main/tests')
771 endif