1 # Copyright © 2017 Intel Corporation
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
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',
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',
68 'main/api_arrayelt.c',
69 'main/api_arrayelt.h',
71 'main/api_loopback.c',
72 'main/api_loopback.h',
73 'main/api_validate.c',
74 'main/api_validate.h',
79 'main/atifragshader.c',
80 'main/atifragshader.h',
120 'main/debug_output.c',
121 'main/debug_output.h',
140 'main/extensions_table.c',
141 'main/extensions_table.h',
142 'main/externalobjects.c',
143 'main/externalobjects.h',
148 'main/ff_fragment_shader.cpp',
149 'main/ffvertex_prog.c',
150 'main/ffvertex_prog.h',
153 'main/format_pack.h',
154 'main/format_unpack.h',
155 'main/formatquery.c',
156 'main/formatquery.h',
159 'main/format_utils.c',
160 'main/format_utils.h',
161 'main/framebuffer.c',
162 'main/framebuffer.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',
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',
217 'main/pixeltransfer.c',
218 'main/pixeltransfer.h',
223 'main/program_resource.c',
224 'main/program_resource.h',
225 'main/querymatrix.c',
226 'main/querymatrix.h',
235 'main/renderbuffer.c',
236 'main/renderbuffer.h',
244 'main/shaderimage.c',
245 'main/shaderimage.h',
248 'main/shader_query.cpp',
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',
274 'main/texenvprogram.h',
279 'main/texgetimage.c',
280 'main/texgetimage.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',
312 'main/es1_conversion.c',
313 'main/es1_conversion.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',
323 'math/m_trans_tmp.h',
324 'math/m_translate.c',
325 'math/m_translate.h',
329 'vbo/vbo_attrib_tmp.h',
332 'vbo/vbo_exec_api.c',
333 'vbo/vbo_exec_array.c',
335 'vbo/vbo_exec_draw.c',
336 'vbo/vbo_exec_eval.c',
339 'vbo/vbo_minmax_index.c',
342 'vbo/vbo_primitive_restart.c',
344 'vbo/vbo_save_api.c',
346 'vbo/vbo_save_draw.c',
348 'vbo/vbo_save_loopback.c',
350 'vbo/vbo_split_copy.c',
352 'vbo/vbo_split_inplace.c',
356 files_libmesa_classic = files(
359 'math/m_dotprod_tmp.h',
363 'math/m_xform_tmp.h',
370 'tnl/t_vb_cliptmp.h',
373 'tnl/t_vb_lighttmp.h',
374 'tnl/t_vb_normals.c',
376 'tnl/t_vb_program.c',
378 'tnl/t_vb_rendertmp.h',
383 'tnl/t_vertex_generic.c',
385 'tnl/t_vertex_sse.c',
390 'swrast/s_aalinetemp.h',
391 'swrast/s_aatriangle.c',
392 'swrast/s_aatriangle.h',
393 'swrast/s_aatritemp.h',
396 'swrast/s_atifragshader.c',
397 'swrast/s_atifragshader.h',
404 'swrast/s_context.c',
405 'swrast/s_context.h',
406 'swrast/s_copypix.c',
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',
417 'swrast/s_fragprog.c',
418 'swrast/s_fragprog.h',
421 'swrast/s_linetemp.h',
424 'swrast/s_masking.c',
425 'swrast/s_masking.h',
428 'swrast/s_renderbuffer.c',
429 'swrast/s_renderbuffer.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',
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',
463 'x86/rtasm/x86sse.c',
464 'x86/rtasm/x86sse.h',
473 if with_asm_arch == 'x86' or with_asm_arch == 'x86_64'
474 gen_matypes = executable(
477 c_args : [c_vis_args, c_msvc_compat_args],
478 include_directories : inc_common,
480 matypes_h = custom_target(
482 output : 'matypes.h',
483 command : [gen_matypes],
487 if with_asm_arch == 'x86'
488 files_libmesa_common += files(
493 'x86/common_x86_asm.S',
494 'x86/common_x86_asm.h',
495 'x86/common_x86_features.h',
500 'x86/x86_cliptest.S',
503 'x86/mmx_blendtmp.h',
505 'x86/3dnow_xform1.S',
506 'x86/3dnow_xform2.S',
507 'x86/3dnow_xform3.S',
508 'x86/3dnow_xform4.S',
515 'x86/read_rgba_span_x86.S',
517 elif with_asm_arch == 'x86_64'
518 files_libmesa_common += files('x86-64/x86-64.h', 'x86-64/xform4.S')
522 format_fallback_c = custom_target(
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'),
530 get_hash_h = custom_target(
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'),
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(
544 input : ['main/@0@'.format(x[1]), 'main/formats.csv'],
546 command : [prog_python2, '@INPUT0@', '@INPUT1@'],
547 depend_files : files('main/format_parser.py'),
552 files_libmesa_common += [
559 main_marshal_generated_c,
560 main_marshal_generated_h,
562 ir_expression_operation_h,
569 libmesa_classic = static_library(
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,
581 subdir('drivers/dri')