summaryrefslogtreecommitdiffstats
path: root/src/mapi/glapi/gen
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2017-09-20 20:11:32 -0700
committerDylan Baker <[email protected]>2017-10-09 13:42:44 -0700
commit3218056e0eb375eeda470058d06add1532acd6d4 (patch)
treeb634c97a95770f05b640a41215b33efdb4ed69f3 /src/mapi/glapi/gen
parent86eb09a136c62748eafa2dc79e10dbd681797cbf (diff)
meson: Build i965 and dri stack
This gets pretty much the entire classic tree building, as well as i965, including the various glapis. There are some workarounds for bugs that are fixed in meson 0.43.0, which is due out on October 8th. I have tested this with piglit using glx. v2: - fix typo "vaule" -> "value" - use gtest dep instead of linking to libgtest (rebase error) - use gtest dep instead of linking against libgtest (rebase error) - copy the megadriver, then create hard links from that, then delete the megadriver. This matches the behavior of the autotools build. (Eric A) - Use host_machine instead of target_machine (Eric A) - Put a comment in the right place (Eric A) - Don't have two variables for the same information (Eric A) - Put pre_args at top of file in this patch (Eric A) - Fix glx generators in this patch instead of next (Eric A) - Remove -DMESON hack (Eric A) - add sha1_h to mesa in this patch (Eric A) - Put generators in loops when possible to reduce code in mapi/glapi/gen (Eric A) v3: - put HAVE_X11_PLATFORM in this patch Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mapi/glapi/gen')
-rw-r--r--src/mapi/glapi/gen/meson.build249
1 files changed, 249 insertions, 0 deletions
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,
+)