diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/common/meson.build | 39 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/meson.build | 178 | ||||
-rw-r--r-- | src/mesa/drivers/dri/meson.build | 55 | ||||
-rw-r--r-- | src/mesa/main/meson.build | 46 | ||||
-rw-r--r-- | src/mesa/meson.build | 582 | ||||
-rw-r--r-- | src/mesa/program/meson.build | 33 |
6 files changed, 933 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/meson.build b/src/mesa/drivers/dri/common/meson.build new file mode 100644 index 00000000000..d9a9abdfb7a --- /dev/null +++ b/src/mesa/drivers/dri/common/meson.build @@ -0,0 +1,39 @@ +# Copyright © 2017 Intel Corporation + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +inc_dri_common = include_directories('.') + +libdricommon = static_library( + 'dricommon', + ['utils.c', 'utils.h', 'dri_util.c', 'dri_util.h', xmlpool_options_h], + include_directories : [inc_common, inc_util], + c_args : c_vis_args, + dependencies : dep_libdrm, + build_by_default : false, +) + +libmegadriver_stub = static_library( + 'megadriver_stub', + 'megadriver_stub.c', + include_directories : inc_common, + c_args : c_vis_args, + dependencies : dep_libdrm, + build_by_default : false, +) diff --git a/src/mesa/drivers/dri/i965/meson.build b/src/mesa/drivers/dri/i965/meson.build new file mode 100644 index 00000000000..0fbad4181a2 --- /dev/null +++ b/src/mesa/drivers/dri/i965/meson.build @@ -0,0 +1,178 @@ +# Copyright © 2017 Intel Corporation + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +files_i965 = files( + 'brw_binding_tables.c', + 'brw_blorp.c', + 'brw_blorp.h', + 'brw_bufmgr.c', + 'brw_bufmgr.h', + 'brw_clear.c', + 'brw_clip.c', + 'brw_compute.c', + 'brw_conditional_render.c', + 'brw_context.c', + 'brw_context.h', + 'brw_cs.c', + 'brw_cs.h', + 'brw_curbe.c', + 'brw_defines.h', + 'brw_draw.c', + 'brw_draw.h', + 'brw_draw_upload.c', + 'brw_ff_gs.c', + 'brw_ff_gs_emit.c', + 'brw_ff_gs.h', + 'brw_formatquery.c', + 'brw_gs.c', + 'brw_gs.h', + 'brw_gs_surface_state.c', + 'brw_link.cpp', + 'brw_meta_util.c', + 'brw_meta_util.h', + 'brw_misc_state.c', + 'brw_multisample_state.h', + 'brw_nir_uniforms.cpp', + 'brw_object_purgeable.c', + 'brw_pipe_control.c', + 'brw_performance_query.h', + 'brw_performance_query.c', + 'brw_program.c', + 'brw_program.h', + 'brw_program_cache.c', + 'brw_primitive_restart.c', + 'brw_queryobj.c', + 'brw_reset.c', + 'brw_sf.c', + 'brw_state.h', + 'brw_state_upload.c', + 'brw_structs.h', + 'brw_surface_formats.c', + 'brw_sync.c', + 'brw_tcs.c', + 'brw_tcs_surface_state.c', + 'brw_tes.c', + 'brw_tes_surface_state.c', + 'brw_urb.c', + 'brw_util.c', + 'brw_util.h', + 'brw_vs.c', + 'brw_vs.h', + 'brw_vs_surface_state.c', + 'brw_wm.c', + 'brw_wm.h', + 'brw_wm_surface_state.c', + 'gen4_blorp_exec.h', + 'gen6_clip_state.c', + 'gen6_constant_state.c', + 'gen6_depth_state.c', + 'gen6_multisample_state.c', + 'gen6_queryobj.c', + 'gen6_sampler_state.c', + 'gen6_sol.c', + 'gen6_urb.c', + 'gen7_cs_state.c', + 'gen7_l3_state.c', + 'gen7_misc_state.c', + 'gen7_sol_state.c', + 'gen7_urb.c', + 'gen8_depth_state.c', + 'gen8_multisample_state.c', + 'hsw_queryobj.c', + 'hsw_sol.c', + 'intel_batchbuffer.c', + 'intel_batchbuffer.h', + 'intel_blit.c', + 'intel_blit.h', + 'intel_buffer_objects.c', + 'intel_buffer_objects.h', + 'intel_buffers.c', + 'intel_buffers.h', + 'intel_copy_image.c', + 'intel_extensions.c', + 'intel_fbo.c', + 'intel_fbo.h', + 'intel_image.h', + 'intel_mipmap_tree.c', + 'intel_mipmap_tree.h', + 'intel_pixel_bitmap.c', + 'intel_pixel.c', + 'intel_pixel_copy.c', + 'intel_pixel_draw.c', + 'intel_pixel.h', + 'intel_pixel_read.c', + 'intel_screen.c', + 'intel_screen.h', + 'intel_state.c', + 'intel_tex.c', + 'intel_tex_copy.c', + 'intel_tex.h', + 'intel_tex_image.c', + 'intel_tex_obj.h', + 'intel_tex_validate.c', + 'intel_tiled_memcpy.c', + 'intel_tiled_memcpy.h', + 'intel_upload.c', + 'libdrm_macros.h', +) + +i965_gen_libs = [] +foreach v : ['40', '45', '50', '60', '70', '75', '80', '90', '100'] + _lib = static_library( + 'libi965_gen@0@'.format(v), + ['genX_blorp_exec.c', 'genX_state_upload.c', nir_opcodes_h, gen_xml_pack], + include_directories : [inc_common, inc_intel, inc_dri_common], + c_args : [c_vis_args, no_override_init_args, '-msse2', + '-DGEN_VERSIONx10=@0@'.format(v)], + dependencies : [dep_libdrm], + ) + i965_gen_libs += _lib +endforeach + +oa_generator = generator( + prog_python2, + arguments : ['@CURRENT_SOURCE_DIR@/brw_oa.py', '@INPUT@', + '--chipset', '@EXTRA_ARGS@', '--code', '@OUTPUT0@', + '--header', '@OUTPUT1@'], + output : ['@[email protected]', '@[email protected]'], +) + +i965_oa_sources = [] +foreach hw : ['hsw', 'bdw', 'chv', 'sklgt2', 'sklgt3', 'sklgt4', 'bxt', + 'kblgt2', 'kblgt3', 'glk'] + _xml = 'brw_oa_@[email protected]'.format(hw) + i965_oa_sources += oa_generator.process(_xml, extra_args : hw) +endforeach + +libi965 = static_library( + 'i965', + [files_i965, i965_oa_sources, nir_opcodes_h, ir_expression_operation_h, + xmlpool_options_h], + include_directories : [inc_common, inc_intel, inc_dri_common, inc_util, + inc_drm_uapi, inc_nir], + c_args : [c_vis_args, no_override_init_args, '-msse2'], + cpp_args : [cpp_vis_args, '-msse2'], + link_with : [i965_gen_libs, libintel_common, libisl, libintel_compiler, + libblorp], + dependencies : [dep_libdrm, dep_valgrind], +) + +dri_drivers += libi965 +dri_link += 'i965_dri.so' diff --git a/src/mesa/drivers/dri/meson.build b/src/mesa/drivers/dri/meson.build new file mode 100644 index 00000000000..fc851e8a6b4 --- /dev/null +++ b/src/mesa/drivers/dri/meson.build @@ -0,0 +1,55 @@ +# Copyright © 2017 Intel Corporation + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +subdir('common') + +dri_drivers = [] +dri_link = [] +if with_dri_i965 + subdir('i965') +endif + +if with_dri + libmesa_dri_drivers = shared_library( + 'mesa_dri_drivers', + dummy_cpp, # see meson #2180 + link_whole : dri_drivers, + link_with : [libmegadriver_stub, libdricommon, libxmlconfig, libglapi, + libmesa_util, libnir, libmesa_classic], + dependencies : [dep_selinux, dep_libdrm, dep_expat, dep_m, dep_thread, + dep_dl], + link_args : [ld_args_bsymbolic, ld_args_gc_sections], + ) + + pkg.generate( + name : 'dri', + filebase : 'dri', + description : 'Direct Rendering Infrastructure', + version : meson.project_version(), + requires_private : ['libdrm >= 2.4.75'], # FIXME: don't hardcode this + ) + + meson.add_install_script( + join_paths(meson.source_root(), 'bin/install_megadrivers.py'), + libmesa_dri_drivers.full_path(), + join_paths(get_option('libdir'), 'dri'), + dri_link, + ) +endif diff --git a/src/mesa/main/meson.build b/src/mesa/main/meson.build new file mode 100644 index 00000000000..57487fe4da5 --- /dev/null +++ b/src/mesa/main/meson.build @@ -0,0 +1,46 @@ +# Copyright © 2017 Intel Corporation + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +main_dispatch_h = custom_target( + 'dispatch.h', + input : [files('../../mapi/glapi/gen/gl_table.py'), gl_and_es_api_files], + output : 'dispatch.h', + command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@', '-m', 'remap_table'], + depend_files : glapi_gen_depends, + capture : true, +) + +main_marshal_generated_h = custom_target( + 'marshal_generated.h', + input : [files('../../mapi/glapi/gen/gl_marshal_h.py'), gl_and_es_api_files], + output : 'marshal_generated.h', + command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'], + depend_files : files('../../mapi/glapi/gen/marshal_XML.py') + glapi_gen_depends, + capture : true, +) + +main_remap_helper_h = custom_target( + 'remap_helper.h', + input : [files('../../mapi/glapi/gen/remap_helper.py'), gl_and_es_api_files], + output : 'remap_helper.h', + command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'], + depend_files : glapi_gen_depends, + capture : true, +) diff --git a/src/mesa/meson.build b/src/mesa/meson.build new file mode 100644 index 00000000000..665b35e5339 --- /dev/null +++ b/src/mesa/meson.build @@ -0,0 +1,582 @@ +# Copyright © 2017 Intel Corporation + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +# TODO: main/tests +# TODO: xlib_glx +# TODO: osmesa +# TODO: asm_offsets + +subdir('program') +subdir('main') + +# program files +# program nir files +# files shared between classic mesa and gallium mesa +files_libmesa_common = files( + 'program/arbprogparse.c', + 'program/arbprogparse.h', + 'program/ir_to_mesa.cpp', + 'program/ir_to_mesa.h', + 'program/prog_cache.c', + 'program/prog_cache.h', + 'program/prog_execute.c', + 'program/prog_execute.h', + 'program/prog_instruction.c', + 'program/prog_instruction.h', + 'program/prog_noise.c', + 'program/prog_noise.h', + 'program/prog_opt_constant_fold.c', + 'program/prog_optimize.c', + 'program/prog_optimize.h', + 'program/prog_parameter.c', + 'program/prog_parameter.h', + 'program/prog_parameter_layout.c', + 'program/prog_parameter_layout.h', + 'program/prog_print.c', + 'program/prog_print.h', + 'program/program.c', + 'program/program.h', + 'program/programopt.c', + 'program/programopt.h', + 'program/program_parse_extra.c', + 'program/program_parser.h', + 'program/prog_statevars.c', + 'program/prog_statevars.h', + 'program/symbol_table.c', + 'program/symbol_table.h', + 'program/prog_to_nir.c', + 'program/prog_to_nir.h', + 'main/accum.c', + 'main/accum.h', + 'main/api_arrayelt.c', + 'main/api_arrayelt.h', + 'main/api_exec.h', + 'main/api_loopback.c', + 'main/api_loopback.h', + 'main/api_validate.c', + 'main/api_validate.h', + 'main/arbprogram.c', + 'main/arbprogram.h', + 'main/arrayobj.c', + 'main/arrayobj.h', + 'main/atifragshader.c', + 'main/atifragshader.h', + 'main/attrib.c', + 'main/attrib.h', + 'main/barrier.c', + 'main/barrier.h', + 'main/bbox.c', + 'main/bbox.h', + 'main/blend.c', + 'main/blend.h', + 'main/blit.c', + 'main/blit.h', + 'main/bufferobj.c', + 'main/bufferobj.h', + 'main/buffers.c', + 'main/buffers.h', + 'main/clear.c', + 'main/clear.h', + 'main/clip.c', + 'main/clip.h', + 'main/colormac.h', + 'main/colortab.c', + 'main/colortab.h', + 'main/compute.c', + 'main/compute.h', + 'main/compiler.h', + 'main/condrender.c', + 'main/condrender.h', + 'main/config.h', + 'main/context.c', + 'main/context.h', + 'main/convolve.c', + 'main/convolve.h', + 'main/copyimage.c', + 'main/copyimage.h', + 'main/core.h', + 'main/cpuinfo.c', + 'main/cpuinfo.h', + 'main/dd.h', + 'main/debug.c', + 'main/debug.h', + 'main/debug_output.c', + 'main/debug_output.h', + 'main/depth.c', + 'main/depth.h', + 'main/dlist.c', + 'main/dlist.h', + 'main/drawpix.c', + 'main/drawpix.h', + 'main/drawtex.c', + 'main/drawtex.h', + 'main/enable.c', + 'main/enable.h', + 'main/enums.h', + 'main/errors.c', + 'main/errors.h', + 'main/eval.c', + 'main/eval.h', + 'main/execmem.c', + 'main/extensions.c', + 'main/extensions.h', + 'main/extensions_table.c', + 'main/extensions_table.h', + 'main/externalobjects.c', + 'main/externalobjects.h', + 'main/fbobject.c', + 'main/fbobject.h', + 'main/feedback.c', + 'main/feedback.h', + 'main/ff_fragment_shader.cpp', + 'main/ffvertex_prog.c', + 'main/ffvertex_prog.h', + 'main/fog.c', + 'main/fog.h', + 'main/format_pack.h', + 'main/format_unpack.h', + 'main/formatquery.c', + 'main/formatquery.h', + 'main/formats.c', + 'main/formats.h', + 'main/format_utils.c', + 'main/format_utils.h', + 'main/framebuffer.c', + 'main/framebuffer.h', + 'main/get.c', + 'main/get.h', + 'main/genmipmap.c', + 'main/genmipmap.h', + 'main/getstring.c', + 'main/glformats.c', + 'main/glformats.h', + 'main/glthread.c', + 'main/glthread.h', + 'main/glheader.h', + 'main/hash.c', + 'main/hash.h', + 'main/hint.c', + 'main/hint.h', + 'main/histogram.c', + 'main/histogram.h', + 'main/image.c', + 'main/image.h', + 'main/imports.c', + 'main/imports.h', + 'main/light.c', + 'main/light.h', + 'main/lines.c', + 'main/lines.h', + 'main/macros.h', + 'main/marshal.c', + 'main/marshal.h', + 'main/matrix.c', + 'main/matrix.h', + 'main/mipmap.c', + 'main/mipmap.h', + 'main/mm.c', + 'main/mm.h', + 'main/mtypes.h', + 'main/multisample.c', + 'main/multisample.h', + 'main/objectlabel.c', + 'main/objectlabel.h', + 'main/objectpurge.c', + 'main/objectpurge.h', + 'main/pack.c', + 'main/pack.h', + 'main/pbo.c', + 'main/pbo.h', + 'main/performance_monitor.c', + 'main/performance_monitor.h', + 'main/performance_query.c', + 'main/performance_query.h', + 'main/pipelineobj.c', + 'main/pipelineobj.h', + 'main/pixel.c', + 'main/pixel.h', + 'main/pixelstore.c', + 'main/pixelstore.h', + 'main/pixeltransfer.c', + 'main/pixeltransfer.h', + 'main/points.c', + 'main/points.h', + 'main/polygon.c', + 'main/polygon.h', + 'main/program_resource.c', + 'main/program_resource.h', + 'main/querymatrix.c', + 'main/querymatrix.h', + 'main/queryobj.c', + 'main/queryobj.h', + 'main/rastpos.c', + 'main/rastpos.h', + 'main/readpix.c', + 'main/readpix.h', + 'main/remap.c', + 'main/remap.h', + 'main/renderbuffer.c', + 'main/renderbuffer.h', + 'main/robustness.c', + 'main/samplerobj.c', + 'main/samplerobj.h', + 'main/scissor.c', + 'main/scissor.h', + 'main/shaderapi.c', + 'main/shaderapi.h', + 'main/shaderimage.c', + 'main/shaderimage.h', + 'main/shaderobj.c', + 'main/shaderobj.h', + 'main/shader_query.cpp', + 'main/shared.c', + 'main/shared.h', + 'main/state.c', + 'main/state.h', + 'main/stencil.c', + 'main/stencil.h', + 'main/syncobj.c', + 'main/syncobj.h', + 'main/texcompress.c', + 'main/texcompress_bptc.c', + 'main/texcompress_bptc.h', + 'main/texcompress_cpal.c', + 'main/texcompress_cpal.h', + 'main/texcompress_etc.c', + 'main/texcompress_etc.h', + 'main/texcompress_etc_tmp.h', + 'main/texcompress_fxt1.c', + 'main/texcompress_fxt1.h', + 'main/texcompress.h', + 'main/texcompress_rgtc.c', + 'main/texcompress_rgtc.h', + 'main/texcompress_s3tc.c', + 'main/texcompress_s3tc.h', + 'main/texenv.c', + 'main/texenv.h', + 'main/texenvprogram.h', + 'main/texformat.c', + 'main/texformat.h', + 'main/texgen.c', + 'main/texgen.h', + 'main/texgetimage.c', + 'main/texgetimage.h', + 'main/teximage.c', + 'main/teximage.h', + 'main/texobj.c', + 'main/texobj.h', + 'main/texparam.c', + 'main/texparam.h', + 'main/texstate.c', + 'main/texstate.h', + 'main/texstorage.c', + 'main/texstorage.h', + 'main/texstore.c', + 'main/texstore.h', + 'main/texturebindless.c', + 'main/texturebindless.h', + 'main/textureview.c', + 'main/textureview.h', + 'main/transformfeedback.c', + 'main/transformfeedback.h', + 'main/uniform_query.cpp', + 'main/uniforms.c', + 'main/uniforms.h', + 'main/varray.c', + 'main/varray.h', + 'main/vdpau.c', + 'main/vdpau.h', + 'main/version.c', + 'main/version.h', + 'main/viewport.c', + 'main/viewport.h', + 'main/vtxfmt.c', + 'main/vtxfmt.h', + 'main/es1_conversion.c', + 'main/es1_conversion.h', + 'math/m_debug.h', + 'math/m_debug_clip.c', + 'math/m_debug_norm.c', + 'math/m_debug_util.h', + 'math/m_debug_xform.c', + 'math/m_eval.c', + 'math/m_eval.h', + 'math/m_matrix.c', + 'math/m_matrix.h', + 'math/m_trans_tmp.h', + 'math/m_translate.c', + 'math/m_translate.h', + 'math/m_vector.c', + 'math/m_vector.h', + 'vbo/vbo_attrib.h', + 'vbo/vbo_attrib_tmp.h', + 'vbo/vbo_context.c', + 'vbo/vbo_context.h', + 'vbo/vbo_exec_api.c', + 'vbo/vbo_exec_array.c', + 'vbo/vbo_exec.c', + 'vbo/vbo_exec_draw.c', + 'vbo/vbo_exec_eval.c', + 'vbo/vbo_exec.h', + 'vbo/vbo.h', + 'vbo/vbo_minmax_index.c', + 'vbo/vbo_noop.c', + 'vbo/vbo_noop.h', + 'vbo/vbo_primitive_restart.c', + 'vbo/vbo_rebase.c', + 'vbo/vbo_save_api.c', + 'vbo/vbo_save.c', + 'vbo/vbo_save_draw.c', + 'vbo/vbo_save.h', + 'vbo/vbo_save_loopback.c', + 'vbo/vbo_split.c', + 'vbo/vbo_split_copy.c', + 'vbo/vbo_split.h', + 'vbo/vbo_split_inplace.c', +) + +# mesa files +files_libmesa_classic = files( + 'math/m_clip_tmp.h', + 'math/m_copy_tmp.h', + 'math/m_dotprod_tmp.h', + 'math/m_norm_tmp.h', + 'math/m_xform.c', + 'math/m_xform.h', + 'math/m_xform_tmp.h', + 'tnl/t_context.c', + 'tnl/t_context.h', + 'tnl/t_draw.c', + 'tnl/tnl.h', + 'tnl/t_pipeline.c', + 'tnl/t_pipeline.h', + 'tnl/t_vb_cliptmp.h', + 'tnl/t_vb_fog.c', + 'tnl/t_vb_light.c', + 'tnl/t_vb_lighttmp.h', + 'tnl/t_vb_normals.c', + 'tnl/t_vb_points.c', + 'tnl/t_vb_program.c', + 'tnl/t_vb_render.c', + 'tnl/t_vb_rendertmp.h', + 'tnl/t_vb_texgen.c', + 'tnl/t_vb_texmat.c', + 'tnl/t_vb_vertex.c', + 'tnl/t_vertex.c', + 'tnl/t_vertex_generic.c', + 'tnl/t_vertex.h', + 'tnl/t_vertex_sse.c', + 'tnl/t_vp_build.c', + 'tnl/t_vp_build.h', + 'swrast/s_aaline.c', + 'swrast/s_aaline.h', + 'swrast/s_aalinetemp.h', + 'swrast/s_aatriangle.c', + 'swrast/s_aatriangle.h', + 'swrast/s_aatritemp.h', + 'swrast/s_alpha.c', + 'swrast/s_alpha.h', + 'swrast/s_atifragshader.c', + 'swrast/s_atifragshader.h', + 'swrast/s_bitmap.c', + 'swrast/s_blend.c', + 'swrast/s_blend.h', + 'swrast/s_blit.c', + 'swrast/s_chan.h', + 'swrast/s_clear.c', + 'swrast/s_context.c', + 'swrast/s_context.h', + 'swrast/s_copypix.c', + 'swrast/s_depth.c', + 'swrast/s_depth.h', + 'swrast/s_drawpix.c', + 'swrast_setup/ss_tritmp.h', + 'swrast_setup/ss_vb.h', + 'swrast_setup/swrast_setup.h', + 'swrast/s_feedback.c', + 'swrast/s_feedback.h', + 'swrast/s_fog.c', + 'swrast/s_fog.h', + 'swrast/s_fragprog.c', + 'swrast/s_fragprog.h', + 'swrast/s_lines.c', + 'swrast/s_lines.h', + 'swrast/s_linetemp.h', + 'swrast/s_logic.c', + 'swrast/s_logic.h', + 'swrast/s_masking.c', + 'swrast/s_masking.h', + 'swrast/s_points.c', + 'swrast/s_points.h', + 'swrast/s_renderbuffer.c', + 'swrast/s_renderbuffer.h', + 'swrast/s_span.c', + 'swrast/s_span.h', + 'swrast/s_stencil.c', + 'swrast/s_stencil.h', + 'swrast/s_texcombine.c', + 'swrast/s_texcombine.h', + 'swrast/s_texfetch.c', + 'swrast/s_texfetch.h', + 'swrast/s_texfetch_tmp.h', + 'swrast/s_texfilter.c', + 'swrast/s_texfilter.h', + 'swrast/s_texrender.c', + 'swrast/s_texture.c', + 'swrast/s_triangle.c', + 'swrast/s_triangle.h', + 'swrast/s_tritemp.h', + 'swrast/swrast.h', + 'swrast/s_zoom.c', + 'swrast/s_zoom.h', + 'swrast_setup/ss_context.c', + 'swrast_setup/ss_context.h', + 'swrast_setup/ss_triangle.c', + 'swrast_setup/ss_triangle.h', + 'drivers/common/driverfuncs.c', + 'drivers/common/driverfuncs.h', + 'drivers/common/meta_blit.c', + 'drivers/common/meta_generate_mipmap.c', + 'drivers/common/meta_tex_subimage.c', + 'drivers/common/meta.c', + 'drivers/common/meta.h', + 'x86/common_x86.c', + 'x86/x86_xform.c', + 'x86/3dnow.c', + 'x86/sse.c', + 'x86/rtasm/x86sse.c', + 'x86/rtasm/x86sse.h', + 'sparc/sparc.c', + 'x86-64/x86-64.c', +) + +# TODO: sse41 +libmesa_sse41 = [] + +matypes_h = [] +if with_asm_arch == 'x86' or with_asm_arch == 'x86_64' + gen_matypes = executable( + 'gen_matypes', + 'x86/gen_matypes.c', + c_args : [c_vis_args, c_msvc_compat_args], + include_directories : inc_common, + ) + matypes_h = custom_target( + 'matypes.h', + output : 'matypes.h', + command : [gen_matypes], + capture : true, + ) +endif +if with_asm_arch == 'x86' + files_libmesa_common += files( + 'x86/assyntax.h', + 'x86/clip_args.h', + 'x86/norm_args.h', + 'x86/xform_args.h', + 'x86/common_x86_asm.S', + 'x86/common_x86_asm.h', + 'x86/common_x86_features.h', + 'x86/x86_xform.h', + 'x86/x86_xform2.S', + 'x86/x86_xform3.S', + 'x86/x86_xform4.S', + 'x86/x86_cliptest.S', + 'x86/mmx.h', + 'x86/mmx_blend.S', + 'x86/mmx_blendtmp.h', + 'x86/3dnow.h', + 'x86/3dnow_xform1.S', + 'x86/3dnow_xform2.S', + 'x86/3dnow_xform3.S', + 'x86/3dnow_xform4.S', + 'x86/sse.h', + 'x86/sse_xform1.S', + 'x86/sse_xform2.S', + 'x86/sse_xform3.S', + 'x86/sse_xform4.S', + 'x86/sse_normal.S', + 'x86/read_rgba_span_x86.S', + ) +elif with_asm_arch == 'x86_64' + files_libmesa_common += files('x86-64/x86-64.h', 'x86-64/xform4.S') +endif +# TODO: sparc + +format_fallback_c = custom_target( + 'format_fallback.c', + input : ['main/format_fallback.py', 'main/formats.csv'], + output : 'format_fallback.c', + command : [prog_python2, '@INPUT0@', '@INPUT1@', '@OUTPUT@'], + depend_files : files('main/format_parser.py'), +) + +get_hash_h = custom_target( + 'get_hash.h', + input : ['main/get_hash_generator.py', gl_and_es_api_files], + output : 'get_hash.h', + command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'], + depend_files : files('main/get_hash_params.py'), + capture : true, +) + +foreach x : [['format_info.h', 'format_info.py'], + ['format_pack.c', 'format_pack.py'], + ['format_unpack.c', 'format_unpack.py']] + files_libmesa_common += custom_target( + x[0], + input : ['main/@0@'.format(x[1]), 'main/formats.csv'], + output : x[0], + command : [prog_python2, '@INPUT0@', '@INPUT1@'], + depend_files : files('main/format_parser.py'), + capture : true, + ) +endforeach + +files_libmesa_common += [ + mesa_lex, + program_parse_tab, + main_api_exec_c, + main_enums_c, + format_fallback_c, + get_hash_h, + main_marshal_generated_c, + main_marshal_generated_h, + main_dispatch_h, + ir_expression_operation_h, + nir_opcodes_h, + main_remap_helper_h, + matypes_h, + sha1_h, +] + +libmesa_classic = static_library( + 'mesa_classic', + [files_libmesa_common, files_libmesa_classic], + c_args : [c_vis_args, c_msvc_compat_args], + cpp_args : [cpp_vis_args, cpp_msvc_compat_args], + include_directories : [inc_common, include_directories('main')], + link_with : [libglsl, libmesa_sse41], + build_by_default : false, +) + +# TODO: gallium + +subdir('drivers/dri') diff --git a/src/mesa/program/meson.build b/src/mesa/program/meson.build new file mode 100644 index 00000000000..5f3325ff53c --- /dev/null +++ b/src/mesa/program/meson.build @@ -0,0 +1,33 @@ +# Copyright © 2017 Intel Corporation + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +mesa_lex = custom_target( + 'mesa_lex', + input : 'program_lexer.l', + output : 'lex.yy.c', + command : [prog_flex, '-o', '@OUTPUT@', '@INPUT@'], +) + +program_parse_tab = custom_target( + 'program_parse_tab.[ch]', + input : 'program_parse.y', + output : ['program_parse.tab.c', 'program_parse.tab.h'], + command : [prog_bison, '-o', '@OUTPUT0@', '--defines=@OUTPUT1@', '@INPUT@'], +) |