meta: Delete the PBO texsubimage path for real
[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 # TODO: main/tests
22 # TODO: xlib_glx
23 # TODO: osmesa
24 # TODO: asm_offsets
25
26 subdir('program')
27 subdir('main')
28
29 # program files
30 # program nir files
31 # files shared between classic mesa and gallium mesa
32 files_libmesa_common = files(
33 'program/arbprogparse.c',
34 'program/arbprogparse.h',
35 'program/ir_to_mesa.cpp',
36 'program/ir_to_mesa.h',
37 'program/prog_cache.c',
38 'program/prog_cache.h',
39 'program/prog_execute.c',
40 'program/prog_execute.h',
41 'program/prog_instruction.c',
42 'program/prog_instruction.h',
43 'program/prog_noise.c',
44 'program/prog_noise.h',
45 'program/prog_opt_constant_fold.c',
46 'program/prog_optimize.c',
47 'program/prog_optimize.h',
48 'program/prog_parameter.c',
49 'program/prog_parameter.h',
50 'program/prog_parameter_layout.c',
51 'program/prog_parameter_layout.h',
52 'program/prog_print.c',
53 'program/prog_print.h',
54 'program/program.c',
55 'program/program.h',
56 'program/programopt.c',
57 'program/programopt.h',
58 'program/program_parse_extra.c',
59 'program/program_parser.h',
60 'program/prog_statevars.c',
61 'program/prog_statevars.h',
62 'program/symbol_table.c',
63 'program/symbol_table.h',
64 'program/prog_to_nir.c',
65 'program/prog_to_nir.h',
66 'main/accum.c',
67 'main/accum.h',
68 'main/api_arrayelt.c',
69 'main/api_arrayelt.h',
70 'main/api_exec.h',
71 'main/api_loopback.c',
72 'main/api_loopback.h',
73 'main/api_validate.c',
74 'main/api_validate.h',
75 'main/arbprogram.c',
76 'main/arbprogram.h',
77 'main/arrayobj.c',
78 'main/arrayobj.h',
79 'main/atifragshader.c',
80 'main/atifragshader.h',
81 'main/attrib.c',
82 'main/attrib.h',
83 'main/barrier.c',
84 'main/barrier.h',
85 'main/bbox.c',
86 'main/bbox.h',
87 'main/blend.c',
88 'main/blend.h',
89 'main/blit.c',
90 'main/blit.h',
91 'main/bufferobj.c',
92 'main/bufferobj.h',
93 'main/buffers.c',
94 'main/buffers.h',
95 'main/clear.c',
96 'main/clear.h',
97 'main/clip.c',
98 'main/clip.h',
99 'main/colormac.h',
100 'main/colortab.c',
101 'main/colortab.h',
102 'main/compute.c',
103 'main/compute.h',
104 'main/compiler.h',
105 'main/condrender.c',
106 'main/condrender.h',
107 'main/config.h',
108 'main/context.c',
109 'main/context.h',
110 'main/convolve.c',
111 'main/convolve.h',
112 'main/copyimage.c',
113 'main/copyimage.h',
114 'main/core.h',
115 'main/cpuinfo.c',
116 'main/cpuinfo.h',
117 'main/dd.h',
118 'main/debug.c',
119 'main/debug.h',
120 'main/debug_output.c',
121 'main/debug_output.h',
122 'main/depth.c',
123 'main/depth.h',
124 'main/dlist.c',
125 'main/dlist.h',
126 'main/drawpix.c',
127 'main/drawpix.h',
128 'main/drawtex.c',
129 'main/drawtex.h',
130 'main/enable.c',
131 'main/enable.h',
132 'main/enums.h',
133 'main/errors.c',
134 'main/errors.h',
135 'main/eval.c',
136 'main/eval.h',
137 'main/execmem.c',
138 'main/extensions.c',
139 'main/extensions.h',
140 'main/extensions_table.c',
141 'main/extensions_table.h',
142 'main/externalobjects.c',
143 'main/externalobjects.h',
144 'main/fbobject.c',
145 'main/fbobject.h',
146 'main/feedback.c',
147 'main/feedback.h',
148 'main/ff_fragment_shader.cpp',
149 'main/ffvertex_prog.c',
150 'main/ffvertex_prog.h',
151 'main/fog.c',
152 'main/fog.h',
153 'main/format_pack.h',
154 'main/format_unpack.h',
155 'main/formatquery.c',
156 'main/formatquery.h',
157 'main/formats.c',
158 'main/formats.h',
159 'main/format_utils.c',
160 'main/format_utils.h',
161 'main/framebuffer.c',
162 'main/framebuffer.h',
163 'main/get.c',
164 'main/get.h',
165 'main/genmipmap.c',
166 'main/genmipmap.h',
167 'main/getstring.c',
168 'main/glformats.c',
169 'main/glformats.h',
170 'main/glthread.c',
171 'main/glthread.h',
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/mm.c',
195 'main/mm.h',
196 'main/mtypes.h',
197 'main/multisample.c',
198 'main/multisample.h',
199 'main/objectlabel.c',
200 'main/objectlabel.h',
201 'main/objectpurge.c',
202 'main/objectpurge.h',
203 'main/pack.c',
204 'main/pack.h',
205 'main/pbo.c',
206 'main/pbo.h',
207 'main/performance_monitor.c',
208 'main/performance_monitor.h',
209 'main/performance_query.c',
210 'main/performance_query.h',
211 'main/pipelineobj.c',
212 'main/pipelineobj.h',
213 'main/pixel.c',
214 'main/pixel.h',
215 'main/pixelstore.c',
216 'main/pixelstore.h',
217 'main/pixeltransfer.c',
218 'main/pixeltransfer.h',
219 'main/points.c',
220 'main/points.h',
221 'main/polygon.c',
222 'main/polygon.h',
223 'main/program_resource.c',
224 'main/program_resource.h',
225 'main/querymatrix.c',
226 'main/querymatrix.h',
227 'main/queryobj.c',
228 'main/queryobj.h',
229 'main/rastpos.c',
230 'main/rastpos.h',
231 'main/readpix.c',
232 'main/readpix.h',
233 'main/remap.c',
234 'main/remap.h',
235 'main/renderbuffer.c',
236 'main/renderbuffer.h',
237 'main/robustness.c',
238 'main/samplerobj.c',
239 'main/samplerobj.h',
240 'main/scissor.c',
241 'main/scissor.h',
242 'main/shaderapi.c',
243 'main/shaderapi.h',
244 'main/shaderimage.c',
245 'main/shaderimage.h',
246 'main/shaderobj.c',
247 'main/shaderobj.h',
248 'main/shader_query.cpp',
249 'main/shared.c',
250 'main/shared.h',
251 'main/state.c',
252 'main/state.h',
253 'main/stencil.c',
254 'main/stencil.h',
255 'main/syncobj.c',
256 'main/syncobj.h',
257 'main/texcompress.c',
258 'main/texcompress_bptc.c',
259 'main/texcompress_bptc.h',
260 'main/texcompress_cpal.c',
261 'main/texcompress_cpal.h',
262 'main/texcompress_etc.c',
263 'main/texcompress_etc.h',
264 'main/texcompress_etc_tmp.h',
265 'main/texcompress_fxt1.c',
266 'main/texcompress_fxt1.h',
267 'main/texcompress.h',
268 'main/texcompress_rgtc.c',
269 'main/texcompress_rgtc.h',
270 'main/texcompress_s3tc.c',
271 'main/texcompress_s3tc.h',
272 'main/texenv.c',
273 'main/texenv.h',
274 'main/texenvprogram.h',
275 'main/texformat.c',
276 'main/texformat.h',
277 'main/texgen.c',
278 'main/texgen.h',
279 'main/texgetimage.c',
280 'main/texgetimage.h',
281 'main/teximage.c',
282 'main/teximage.h',
283 'main/texobj.c',
284 'main/texobj.h',
285 'main/texparam.c',
286 'main/texparam.h',
287 'main/texstate.c',
288 'main/texstate.h',
289 'main/texstorage.c',
290 'main/texstorage.h',
291 'main/texstore.c',
292 'main/texstore.h',
293 'main/texturebindless.c',
294 'main/texturebindless.h',
295 'main/textureview.c',
296 'main/textureview.h',
297 'main/transformfeedback.c',
298 'main/transformfeedback.h',
299 'main/uniform_query.cpp',
300 'main/uniforms.c',
301 'main/uniforms.h',
302 'main/varray.c',
303 'main/varray.h',
304 'main/vdpau.c',
305 'main/vdpau.h',
306 'main/version.c',
307 'main/version.h',
308 'main/viewport.c',
309 'main/viewport.h',
310 'main/vtxfmt.c',
311 'main/vtxfmt.h',
312 'main/es1_conversion.c',
313 'main/es1_conversion.h',
314 'math/m_debug.h',
315 'math/m_debug_clip.c',
316 'math/m_debug_norm.c',
317 'math/m_debug_util.h',
318 'math/m_debug_xform.c',
319 'math/m_eval.c',
320 'math/m_eval.h',
321 'math/m_matrix.c',
322 'math/m_matrix.h',
323 'math/m_trans_tmp.h',
324 'math/m_translate.c',
325 'math/m_translate.h',
326 'math/m_vector.c',
327 'math/m_vector.h',
328 'vbo/vbo_attrib.h',
329 'vbo/vbo_attrib_tmp.h',
330 'vbo/vbo_context.c',
331 'vbo/vbo_context.h',
332 'vbo/vbo_exec_api.c',
333 'vbo/vbo_exec_array.c',
334 'vbo/vbo_exec.c',
335 'vbo/vbo_exec_draw.c',
336 'vbo/vbo_exec_eval.c',
337 'vbo/vbo_exec.h',
338 'vbo/vbo.h',
339 'vbo/vbo_minmax_index.c',
340 'vbo/vbo_noop.c',
341 'vbo/vbo_noop.h',
342 'vbo/vbo_primitive_restart.c',
343 'vbo/vbo_rebase.c',
344 'vbo/vbo_save_api.c',
345 'vbo/vbo_save.c',
346 'vbo/vbo_save_draw.c',
347 'vbo/vbo_save.h',
348 'vbo/vbo_save_loopback.c',
349 'vbo/vbo_split.c',
350 'vbo/vbo_split_copy.c',
351 'vbo/vbo_split.h',
352 'vbo/vbo_split_inplace.c',
353 )
354
355 # mesa files
356 files_libmesa_classic = files(
357 'math/m_clip_tmp.h',
358 'math/m_copy_tmp.h',
359 'math/m_dotprod_tmp.h',
360 'math/m_norm_tmp.h',
361 'math/m_xform.c',
362 'math/m_xform.h',
363 'math/m_xform_tmp.h',
364 'tnl/t_context.c',
365 'tnl/t_context.h',
366 'tnl/t_draw.c',
367 'tnl/tnl.h',
368 'tnl/t_pipeline.c',
369 'tnl/t_pipeline.h',
370 'tnl/t_vb_cliptmp.h',
371 'tnl/t_vb_fog.c',
372 'tnl/t_vb_light.c',
373 'tnl/t_vb_lighttmp.h',
374 'tnl/t_vb_normals.c',
375 'tnl/t_vb_points.c',
376 'tnl/t_vb_program.c',
377 'tnl/t_vb_render.c',
378 'tnl/t_vb_rendertmp.h',
379 'tnl/t_vb_texgen.c',
380 'tnl/t_vb_texmat.c',
381 'tnl/t_vb_vertex.c',
382 'tnl/t_vertex.c',
383 'tnl/t_vertex_generic.c',
384 'tnl/t_vertex.h',
385 'tnl/t_vertex_sse.c',
386 'tnl/t_vp_build.c',
387 'tnl/t_vp_build.h',
388 'swrast/s_aaline.c',
389 'swrast/s_aaline.h',
390 'swrast/s_aalinetemp.h',
391 'swrast/s_aatriangle.c',
392 'swrast/s_aatriangle.h',
393 'swrast/s_aatritemp.h',
394 'swrast/s_alpha.c',
395 'swrast/s_alpha.h',
396 'swrast/s_atifragshader.c',
397 'swrast/s_atifragshader.h',
398 'swrast/s_bitmap.c',
399 'swrast/s_blend.c',
400 'swrast/s_blend.h',
401 'swrast/s_blit.c',
402 'swrast/s_chan.h',
403 'swrast/s_clear.c',
404 'swrast/s_context.c',
405 'swrast/s_context.h',
406 'swrast/s_copypix.c',
407 'swrast/s_depth.c',
408 'swrast/s_depth.h',
409 'swrast/s_drawpix.c',
410 'swrast_setup/ss_tritmp.h',
411 'swrast_setup/ss_vb.h',
412 'swrast_setup/swrast_setup.h',
413 'swrast/s_feedback.c',
414 'swrast/s_feedback.h',
415 'swrast/s_fog.c',
416 'swrast/s_fog.h',
417 'swrast/s_fragprog.c',
418 'swrast/s_fragprog.h',
419 'swrast/s_lines.c',
420 'swrast/s_lines.h',
421 'swrast/s_linetemp.h',
422 'swrast/s_logic.c',
423 'swrast/s_logic.h',
424 'swrast/s_masking.c',
425 'swrast/s_masking.h',
426 'swrast/s_points.c',
427 'swrast/s_points.h',
428 'swrast/s_renderbuffer.c',
429 'swrast/s_renderbuffer.h',
430 'swrast/s_span.c',
431 'swrast/s_span.h',
432 'swrast/s_stencil.c',
433 'swrast/s_stencil.h',
434 'swrast/s_texcombine.c',
435 'swrast/s_texcombine.h',
436 'swrast/s_texfetch.c',
437 'swrast/s_texfetch.h',
438 'swrast/s_texfetch_tmp.h',
439 'swrast/s_texfilter.c',
440 'swrast/s_texfilter.h',
441 'swrast/s_texrender.c',
442 'swrast/s_texture.c',
443 'swrast/s_triangle.c',
444 'swrast/s_triangle.h',
445 'swrast/s_tritemp.h',
446 'swrast/swrast.h',
447 'swrast/s_zoom.c',
448 'swrast/s_zoom.h',
449 'swrast_setup/ss_context.c',
450 'swrast_setup/ss_context.h',
451 'swrast_setup/ss_triangle.c',
452 'swrast_setup/ss_triangle.h',
453 'drivers/common/driverfuncs.c',
454 'drivers/common/driverfuncs.h',
455 'drivers/common/meta_blit.c',
456 'drivers/common/meta_generate_mipmap.c',
457 'drivers/common/meta.c',
458 'drivers/common/meta.h',
459 'x86/common_x86.c',
460 'x86/x86_xform.c',
461 'x86/3dnow.c',
462 'x86/sse.c',
463 'x86/rtasm/x86sse.c',
464 'x86/rtasm/x86sse.h',
465 'sparc/sparc.c',
466 'x86-64/x86-64.c',
467 )
468
469 # TODO: sse41
470 libmesa_sse41 = []
471
472 matypes_h = []
473 if with_asm_arch == 'x86' or with_asm_arch == 'x86_64'
474 gen_matypes = executable(
475 'gen_matypes',
476 'x86/gen_matypes.c',
477 c_args : [c_vis_args, c_msvc_compat_args],
478 include_directories : inc_common,
479 )
480 matypes_h = custom_target(
481 'matypes.h',
482 output : 'matypes.h',
483 command : [gen_matypes],
484 capture : true,
485 )
486 endif
487 if with_asm_arch == 'x86'
488 files_libmesa_common += files(
489 'x86/assyntax.h',
490 'x86/clip_args.h',
491 'x86/norm_args.h',
492 'x86/xform_args.h',
493 'x86/common_x86_asm.S',
494 'x86/common_x86_asm.h',
495 'x86/common_x86_features.h',
496 'x86/x86_xform.h',
497 'x86/x86_xform2.S',
498 'x86/x86_xform3.S',
499 'x86/x86_xform4.S',
500 'x86/x86_cliptest.S',
501 'x86/mmx.h',
502 'x86/mmx_blend.S',
503 'x86/mmx_blendtmp.h',
504 'x86/3dnow.h',
505 'x86/3dnow_xform1.S',
506 'x86/3dnow_xform2.S',
507 'x86/3dnow_xform3.S',
508 'x86/3dnow_xform4.S',
509 'x86/sse.h',
510 'x86/sse_xform1.S',
511 'x86/sse_xform2.S',
512 'x86/sse_xform3.S',
513 'x86/sse_xform4.S',
514 'x86/sse_normal.S',
515 'x86/read_rgba_span_x86.S',
516 )
517 elif with_asm_arch == 'x86_64'
518 files_libmesa_common += files('x86-64/x86-64.h', 'x86-64/xform4.S')
519 endif
520 # TODO: sparc
521
522 format_fallback_c = custom_target(
523 'format_fallback.c',
524 input : ['main/format_fallback.py', 'main/formats.csv'],
525 output : 'format_fallback.c',
526 command : [prog_python2, '@INPUT0@', '@INPUT1@', '@OUTPUT@'],
527 depend_files : files('main/format_parser.py'),
528 )
529
530 get_hash_h = custom_target(
531 'get_hash.h',
532 input : ['main/get_hash_generator.py', gl_and_es_api_files],
533 output : 'get_hash.h',
534 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
535 depend_files : files('main/get_hash_params.py'),
536 capture : true,
537 )
538
539 foreach x : [['format_info.h', 'format_info.py'],
540 ['format_pack.c', 'format_pack.py'],
541 ['format_unpack.c', 'format_unpack.py']]
542 files_libmesa_common += custom_target(
543 x[0],
544 input : ['main/@0@'.format(x[1]), 'main/formats.csv'],
545 output : x[0],
546 command : [prog_python2, '@INPUT0@', '@INPUT1@'],
547 depend_files : files('main/format_parser.py'),
548 capture : true,
549 )
550 endforeach
551
552 files_libmesa_common += [
553 mesa_lex,
554 program_parse_tab,
555 main_api_exec_c,
556 main_enums_c,
557 format_fallback_c,
558 get_hash_h,
559 main_marshal_generated_c,
560 main_marshal_generated_h,
561 main_dispatch_h,
562 ir_expression_operation_h,
563 nir_opcodes_h,
564 main_remap_helper_h,
565 matypes_h,
566 sha1_h,
567 ]
568
569 libmesa_classic = static_library(
570 'mesa_classic',
571 [files_libmesa_common, files_libmesa_classic],
572 c_args : [c_vis_args, c_msvc_compat_args],
573 cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
574 include_directories : [inc_common, include_directories('main')],
575 link_with : [libglsl, libmesa_sse41],
576 build_by_default : false,
577 )
578
579 # TODO: gallium
580
581 subdir('drivers/dri')