diff options
Diffstat (limited to 'src/mapi')
-rw-r--r-- | src/mapi/es1api/meson.build | 54 | ||||
-rw-r--r-- | src/mapi/es2api/meson.build | 54 | ||||
-rw-r--r-- | src/mapi/glapi/gen/meson.build | 249 | ||||
-rw-r--r-- | src/mapi/glapi/meson.build | 82 | ||||
-rw-r--r-- | src/mapi/meson.build | 37 | ||||
-rw-r--r-- | src/mapi/shared-glapi/meson.build | 61 |
6 files changed, 537 insertions, 0 deletions
diff --git a/src/mapi/es1api/meson.build b/src/mapi/es1api/meson.build new file mode 100644 index 00000000000..57cfb1e8d85 --- /dev/null +++ b/src/mapi/es1api/meson.build @@ -0,0 +1,54 @@ +# 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. + +es1_glapi_mapi_tmp_h = custom_target( + 'es1_glapi_mapi_tmp.h', + input : ['../mapi_abi.py', gl_and_es_api_files], + output : 'glapi_mapi_tmp.h', + command : [prog_python2, '@INPUT0@', '--printer', 'es1api', '@INPUT1@'], + depend_files : api_xml_files, + capture : true, +) + +libglesv1_cm = shared_library( + 'GLESv1_CM', + ['../entry.c', es1_glapi_mapi_tmp_h], + c_args : [c_msvc_compat_args, c_vis_args, '-DMAPI_MODE_BRIDGE', + '-DMAPI_ABI_HEADER="@0@"'.format(es1_glapi_mapi_tmp_h.full_path())], + link_args : [ld_args_gc_sections], + include_directories : [inc_src, inc_include, inc_mapi], + link_with : libglapi, + dependencies : [dep_thread, dep_libdrm, dep_m, dep_dl], + version : '1.1', + install : true, +) + +pkg.generate( + name : 'glesv1_cm', + filebase : 'glesv1_cm', + description : 'Mesa OpenGL ES 1.1 CM library', + version : meson.project_version(), + libraries : libglesv1_cm, + libraries_private : '-lm -ldl -lpthread -pthread', +) + +if with_tests + test('es1-ABI-check', find_program('ABI-check')) +endif diff --git a/src/mapi/es2api/meson.build b/src/mapi/es2api/meson.build new file mode 100644 index 00000000000..f4922d755ad --- /dev/null +++ b/src/mapi/es2api/meson.build @@ -0,0 +1,54 @@ +# 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. + +es2_glapi_mapi_tmp_h = custom_target( + 'es2_glapi_mapi_tmp.h', + input : ['../mapi_abi.py', gl_and_es_api_files], + output : 'glapi_mapi_tmp.h', + command : [prog_python2, '@INPUT0@', '--printer', 'es2api', '@INPUT1@'], + depend_files : api_xml_files, + capture : true, +) + +libgles2 = shared_library( + 'GLESv2', + ['../entry.c', es2_glapi_mapi_tmp_h], + c_args : [c_msvc_compat_args, c_vis_args, '-DMAPI_MODE_BRIDGE', + '-DMAPI_ABI_HEADER="@0@"'.format(es2_glapi_mapi_tmp_h.full_path())], + link_args : [ld_args_gc_sections], + include_directories : [inc_src, inc_include, inc_mapi], + link_with : libglapi, + dependencies : [dep_thread, dep_libdrm, dep_m, dep_dl], + version : '2', + install : true, +) + +pkg.generate( + name : 'glesv2', + filebase : 'glesv2', + description : 'Mesa OpenGL ES 2.0 library', + version : meson.project_version(), + libraries : libgles2, + libraries_private : '-lm -ldl -lpthread -pthread', +) + +if with_tests + test('es2-ABI-check', find_program('ABI-check')) +endif diff --git a/src/mapi/glapi/gen/meson.build b/src/mapi/glapi/gen/meson.build index 3612f1f6416..79aa2accc2a 100644 --- a/src/mapi/glapi/gen/meson.build +++ b/src/mapi/glapi/gen/meson.build @@ -17,3 +17,252 @@ # 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. + +gl_and_es_api_files = files('gl_and_es_API.xml') + +api_xml_files = files( + 'gl_API.xml', + 'es_EXT.xml', + 'gl_and_es_API.xml', + 'gl_and_glX_API.xml', + 'ARB_base_instance.xml', + 'ARB_blend_func_extended.xml', + 'ARB_bindless_texture.xml', + 'ARB_clear_buffer_object.xml', + 'ARB_clear_texture.xml', + 'ARB_clip_control.xml', + 'ARB_color_buffer_float.xml', + 'ARB_compressed_texture_pixel_storage.xml', + 'ARB_compute_shader.xml', + 'ARB_compute_variable_group_size.xml', + 'ARB_copy_buffer.xml', + 'ARB_copy_image.xml', + 'ARB_debug_output.xml', + 'ARB_depth_buffer_float.xml', + 'ARB_depth_clamp.xml', + 'ARB_direct_state_access.xml', + 'ARB_draw_buffers.xml', + 'ARB_draw_buffers_blend.xml', + 'ARB_draw_elements_base_vertex.xml', + 'ARB_draw_indirect.xml', + 'ARB_draw_instanced.xml', + 'ARB_ES2_compatibility.xml', + 'ARB_ES3_compatibility.xml', + 'ARB_framebuffer_no_attachments.xml', + 'ARB_framebuffer_object.xml', + 'ARB_get_program_binary.xml', + 'ARB_get_texture_sub_image.xml', + 'ARB_gpu_shader_fp64.xml', + 'ARB_gpu_shader_int64.xml', + 'ARB_gpu_shader5.xml', + 'ARB_indirect_parameters.xml', + 'ARB_instanced_arrays.xml', + 'ARB_internalformat_query.xml', + 'ARB_internalformat_query2.xml', + 'ARB_invalidate_subdata.xml', + 'ARB_map_buffer_range.xml', + 'ARB_multi_bind.xml', + 'ARB_pipeline_statistics_query.xml', + 'ARB_program_interface_query.xml', + 'ARB_robustness.xml', + 'ARB_sample_shading.xml', + 'ARB_sampler_objects.xml', + 'ARB_seamless_cube_map.xml', + 'ARB_separate_shader_objects.xml', + 'ARB_shader_atomic_counters.xml', + 'ARB_shader_image_load_store.xml', + 'ARB_shader_subroutine.xml', + 'ARB_shader_storage_buffer_object.xml', + 'ARB_sparse_buffer.xml', + 'ARB_sync.xml', + 'ARB_tessellation_shader.xml', + 'ARB_texture_barrier.xml', + 'ARB_texture_buffer_object.xml', + 'ARB_texture_buffer_range.xml', + 'ARB_texture_compression_rgtc.xml', + 'ARB_texture_cube_map_array.xml', + 'ARB_texture_float.xml', + 'ARB_texture_gather.xml', + 'ARB_texture_multisample.xml', + 'ARB_texture_rgb10_a2ui.xml', + 'ARB_texture_rg.xml', + 'ARB_texture_storage_multisample.xml', + 'ARB_texture_storage.xml', + 'ARB_texture_view.xml', + 'ARB_uniform_buffer_object.xml', + 'ARB_vertex_array_object.xml', + 'ARB_vertex_attrib_64bit.xml', + 'ARB_vertex_attrib_binding.xml', + 'ARB_viewport_array.xml', + 'AMD_draw_buffers_blend.xml', + 'AMD_performance_monitor.xml', + 'ARB_vertex_type_2_10_10_10_rev.xml', + 'APPLE_object_purgeable.xml', + 'APPLE_vertex_array_object.xml', + 'EXT_draw_buffers2.xml', + 'EXT_external_objects.xml', + 'EXT_external_objects_fd.xml', + 'EXT_framebuffer_object.xml', + 'EXT_gpu_shader4.xml', + 'EXT_packed_depth_stencil.xml', + 'EXT_provoking_vertex.xml', + 'EXT_separate_shader_objects.xml', + 'EXT_texture_array.xml', + 'EXT_texture_integer.xml', + 'EXT_transform_feedback.xml', + 'EXT_window_rectangles.xml', + 'GREMEDY_string_marker.xml', + 'INTEL_performance_query.xml', + 'KHR_debug.xml', + 'KHR_context_flush_control.xml', + 'KHR_robustness.xml', + 'KHR_robustness_es.xml', + 'KHR_texture_compression_astc.xml', + 'NV_conditional_render.xml', + 'NV_primitive_restart.xml', + 'NV_texture_barrier.xml', + 'NV_vdpau_interop.xml', + 'OES_EGL_image.xml', + 'OES_fixed_point.xml', + 'OES_single_precision.xml', + 'OES_texture_compression_astc.xml', + 'GL3x.xml', + 'GL4x.xml', +) + +glapi_gen_depends = files( + 'gl_XML.py', + 'glX_XML.py', + 'license.py', + 'static_data.py', + 'typeexpr.py', +) + api_xml_files + +glx_gen_depends = files( + 'glX_API.xml', + 'glX_XML.py', + 'glX_proto_common.py', +) + api_xml_files + +glapi_mapi_tmp_h = custom_target( + 'glapi_mapi_tmp.h', + input : ['../../mapi_abi.py', 'gl_and_es_API.xml'], + output : 'glapi_mapi_tmp.h', + command : [prog_python2, '@INPUT0@', '--printer', 'glapi', '@INPUT1@'], + depend_files : glapi_gen_depends, + capture : true, +) + +gl_procs_h = custom_target( + 'gl_procs.h', + input : ['gl_procs.py', 'gl_and_es_API.xml'], + output : 'gl_procs.h', + command : [prog_python2, '@INPUT0@', '-c', '-f', '@INPUT1@'], + depend_files : glapi_gen_depends, + capture : true, +) + +glapitemp_h = custom_target( + 'glapitemp.h', + input : ['gl_apitemp.py', 'gl_and_es_API.xml'], + output : 'glapitemp.h', + command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'], + depend_files : glapi_gen_depends, + capture : true, +) + +glapitable_h = custom_target( + 'glapitable.h', + input : ['gl_table.py', 'gl_and_es_API.xml'], + output : 'glapitable.h', + command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'], + depend_files : glapi_gen_depends, + capture : true, +) + +glapi_gentable_c = custom_target( + 'glapi_gentable.c', + input : ['gl_gentable.py', 'gl_and_es_API.xml'], + output : 'glapi_gentable.c', + command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'], + depend_files : glapi_gen_depends, + capture : true, +) + +main_enums_c = custom_target( + 'enums.c', + input : ['gl_enums.py', files('../registry/gl.xml')], + output : 'enums.c', + command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'], + capture : true, +) + +main_api_exec_c = custom_target( + 'api_exec.c', + input : ['gl_genexec.py', 'gl_and_es_API.xml'], + output : 'api_exec.c', + command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'], + depend_files : files('apiexec.py') + glapi_gen_depends, + capture : true, +) + +main_marshal_generated_c = custom_target( + 'marshal_generated.c', + input : ['gl_marshal.py', 'gl_and_es_API.xml'], + output : 'marshal_generated.c', + command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'], + depend_files : files('marshal_XML.py') + glapi_gen_depends, + capture : true, +) + +glx_generated = [] + +foreach x : [['indirect.c', 'proto'], ['indirect.h', 'init_h'], ['indirect_init.c', 'init_c']] + glx_generated += custom_target( + x[0], + input : ['glX_proto_send.py', 'gl_API.xml'], + output : x[0], + command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@', '-m', x[1]], + depend_files : glx_gen_depends, + capture : true, + ) +endforeach + +foreach x : [['indirect_size.h', ['-m', 'size_h', '--header-tag', '_INDIRECT_SIZE_H_']], + ['indirect_size.c', ['-m', 'size_c']]] + glx_generated += custom_target( + x[0], + input : ['glX_proto_size.py', 'gl_API.xml'], + output : x[0], + command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@', '--only-set', x[1]], + depend_files : glx_gen_depends, + capture : true, + ) +endforeach + +glapi_x86_s = custom_target( + 'glapi_x86.S', + input : ['gl_x86_asm.py', gl_and_es_api_files], + output : 'glapi_x86.S', + command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'], + depend_files : glapi_gen_depends, + capture : true, +) + +glapi_x86_64_s = custom_target( + 'glapi_x86-64.S', + input : ['gl_x86-64_asm.py', gl_and_es_api_files], + output : 'glapi_x86-64.S', + command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'], + depend_files : glapi_gen_depends, + capture : true, +) + +glapi_sparc_s = custom_target( + 'glapi_sparc.S', + input : ['gl_SPARC_asm.py', gl_and_es_api_files], + output : 'glapi_sparc.S', + command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'], + depend_files : glapi_gen_depends, + capture : true, +) diff --git a/src/mapi/glapi/meson.build b/src/mapi/glapi/meson.build new file mode 100644 index 00000000000..d09cf94e36f --- /dev/null +++ b/src/mapi/glapi/meson.build @@ -0,0 +1,82 @@ +# 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. + +static_glapi_files = [] +static_glapi_args = [] + +if with_appledri or with_windowsdri + static_glapi_files += files('glapi_gentable.c') +endif + +if with_shared_glapi + static_glapi_files += files( + '../entry.c', + '../entry.h', + '../entry_x86-64_tls.h', + '../entry_x86_tls.h', + '../entry_x86_tsd.h', + '../entry_ppc64le_tls.h', + '../entry_ppc64le_tsd.h', + '../mapi_tmp.h', + ) + static_glapi_files += glapi_mapi_tmp_h + static_glapi_args += [ + '-DMAPI_MODE_BRIDGE', + '-DMAPI_ABI_HEADER="@0@"'.format(glapi_mapi_tmp_h.full_path()), + ] +else + static_glapi_args += '-DMAPI_MODE_UTIL' + static_glapi_files += files( + 'glapi_dispatch.c', + 'glapi_entrypoint.c', + 'glapi_getproc.c', + 'glapi_nop.c', + 'glapi.c', + 'glapi.h', + 'glapi_priv.h', + ) + static_glapi_files += files_mapi_util + if with_asm_arch == 'x86' + static_glapi_files += glapi_x86_s + elif with_asm_arch == 'x86_64' + static_glapi_files += glapi_x86_64_s + endif + # TODO: SPARC asm +endif + +libglapi_static = static_library( + 'glapi_static', + static_glapi_files, + include_directories : [inc_mesa, inc_include, inc_src], + c_args : [c_msvc_compat_args, static_glapi_args], + dependencies : [dep_thread, dep_selinux], + build_by_default : false, +) + +if not with_shared_glapi and with_tests + glapi_static_check_table = executable( + 'glapi_static_check_table', + 'tests/check_table.cpp', + link_with : [libglapi_static], + dependencies : [idep_gtest], + ) + + test('glapi_static_check_table', glapi_static_check_table) +endif diff --git a/src/mapi/meson.build b/src/mapi/meson.build new file mode 100644 index 00000000000..ce94ee4b27a --- /dev/null +++ b/src/mapi/meson.build @@ -0,0 +1,37 @@ +# 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_mapi_util = files( + 'u_current.c', + 'u_current.h', + 'u_execmem.c', + 'u_execmem.h', +) + +if with_shared_glapi + subdir('shared-glapi') +endif +subdir('glapi') +if with_gles1 + subdir('es1api') +endif +if with_gles2 + subdir('es2api') +endif diff --git a/src/mapi/shared-glapi/meson.build b/src/mapi/shared-glapi/meson.build new file mode 100644 index 00000000000..0d88de0545f --- /dev/null +++ b/src/mapi/shared-glapi/meson.build @@ -0,0 +1,61 @@ +# 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_mapi_glapi = files( + '../entry.c', + '../mapi_glapi.c', + '../stub.c', + '../stub.h', + '../table.c', + '../table.h', +) + +shared_glapi_mapi_tmp_h = custom_target( + 'shared_glapi_mapi_tmp.h', + input : ['../mapi_abi.py', gl_and_es_api_files], + output : 'glapi_mapi_tmp.h', + command : [prog_python2, '@INPUT0@', '--printer', 'shared-glapi', '@INPUT1@'], + depend_files : api_xml_files, + capture : true, +) + +libglapi = shared_library( + 'glapi', + [files_mapi_glapi, files_mapi_util, shared_glapi_mapi_tmp_h], + c_args : [c_msvc_compat_args, '-DMAPI_MODE_GLAPI', + '-DMAPI_ABI_HEADER="@0@"'.format(shared_glapi_mapi_tmp_h.full_path())], + link_args : [ld_args_gc_sections], + include_directories : [inc_src, inc_include, inc_mapi], + dependencies : [dep_thread, dep_selinux], + install : true, +) + +if with_tests + shared_glapi_test = executable( + ['shared-glapi-test', glapitable_h], + 'tests/check_table.cpp', + cpp_args : [cpp_msvc_compat_args], + include_directories : [inc_src, inc_include, inc_mapi], + link_with : [libglapi], + dependencies : [dep_thread, idep_gtest], + ) + + test('shared-glapi-test', shared_glapi_test) +endif |