From 06ff0e3cb062d523390639a8011307f9c153eec3 Mon Sep 17 00:00:00 2001 From: Faye Zhang Date: Mon, 6 Jun 2022 15:29:16 -0700 Subject: [PATCH] Implement GL_EXT_base_instance Added new extension GL_EXT_base_instance to registry_xml.py and auto-generated the entry point function calls for the following functions introduced by the extension: * GL_DrawElementsInstancedBaseVertexBaseInstanceEXT * GL_DrawElementsInstancedBaseInstanceEXT * GL_DrawArraysInstancedBaseInstanceEXT Bug: angleproject:6983 Change-Id: I36167faf3ca98e42acf787dbf09ee7052e15e358 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3691952 Reviewed-by: Amirali Abdolrashidi Commit-Queue: Faye Zhang Reviewed-by: Yuxin Hu --- doc/ExtensionSupport.md | 1 + .../Extension_files.json | 8 +- .../GL_EGL_WGL_loader.json | 10 +- .../GL_EGL_entry_points.json | 32 ++--- .../GLenum_value_to_string_map.json | 2 +- .../code_generation_hashes/proc_table.json | 4 +- scripts/generate_entry_points.py | 2 + scripts/registry_xml.py | 1 + src/common/entry_points_enum_autogen.cpp | 6 + src/common/entry_points_enum_autogen.h | 3 + src/libANGLE/Context.cpp | 31 +++++ src/libANGLE/Context_gl.cpp | 10 -- src/libANGLE/Context_gl_4_autogen.h | 3 - src/libANGLE/Context_gles_ext_autogen.h | 16 ++- .../capture/capture_gles_ext_autogen.cpp | 100 +++++++++++++++ .../capture/capture_gles_ext_autogen.h | 47 +++++++ .../capture/capture_gles_ext_params.cpp | 28 +++++ .../capture/frame_capture_replay_autogen.cpp | 10 ++ src/libANGLE/gles_extensions_autogen.cpp | 1 + src/libANGLE/gles_extensions_autogen.h | 3 + src/libANGLE/validationESEXT.cpp | 39 ++++++ src/libANGLE/validationESEXT_autogen.h | 26 ++++ .../entry_points_gles_ext_autogen.cpp | 118 +++++++++++++++++- src/libGLESv2/entry_points_gles_ext_autogen.h | 21 ++++ src/libGLESv2/libGLESv2_autogen.cpp | 33 +++++ src/libGLESv2/libGLESv2_autogen.def | 5 + .../libGLESv2_no_capture_autogen.def | 5 + .../libGLESv2_with_capture_autogen.def | 5 + src/libGLESv2/proc_table_egl_autogen.cpp | 6 +- util/capture/trace_gles_loader_autogen.cpp | 15 +++ util/capture/trace_gles_loader_autogen.h | 10 ++ util/gles_loader_autogen.cpp | 15 +++ util/gles_loader_autogen.h | 10 ++ 33 files changed, 578 insertions(+), 48 deletions(-) diff --git a/doc/ExtensionSupport.md b/doc/ExtensionSupport.md index f1da4afce..596745f17 100644 --- a/doc/ExtensionSupport.md +++ b/doc/ExtensionSupport.md @@ -23,6 +23,7 @@ using data from registry_xml.py and gl.xml. | Extension Name | NVIDIA 1660 Win10 | Intel 630 Win10 | NVIDIA 1660 Linux | Intel 630 Linux | SwiftShader Win10 | Pixel 4 Android 11 | Pixel 6 Android 13 | | -------------- | :---------------: | :-------------: | :---------------: | :-------------: | :---------------: | :----------------: | :----------------: | +| [GL_EXT_base_instance](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_base_instance.txt) | | | | | | | | | [GL_KHR_blend_equation_advanced](https://khronos.org/registry/OpenGL/extensions/KHR/KHR_blend_equation_advanced.txt) | ✔ | | ✔ | | ✔ | ✔ | ✔ | | [GL_EXT_blend_func_extended](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_blend_func_extended.txt) | ✔ | ✔ | ✔ | ✔ | | ✔ | | | [GL_EXT_blend_minmax](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_blend_minmax.txt) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | diff --git a/scripts/code_generation_hashes/Extension_files.json b/scripts/code_generation_hashes/Extension_files.json index 4e9029679..fbff443d6 100644 --- a/scripts/code_generation_hashes/Extension_files.json +++ b/scripts/code_generation_hashes/Extension_files.json @@ -1,6 +1,6 @@ { "doc/ExtensionSupport.md": - "7b8550bfc78a59de940855781e2c7c7d", + "45c2eccdb993a62076e6f85a0e40ab19", "scripts/cl.xml": "f923201d4ea3e1130763b19fa7faa7a2", "scripts/egl.xml": @@ -28,13 +28,13 @@ "scripts/gl_angle_ext.xml": "37eebedc1153cd9d208efa469a10a7b2", "scripts/registry_xml.py": - "bef0145151493df09aeb5239eb0a22f0", + "0b7d606157eb555604452589b3ac6b92", "scripts/wgl.xml": "c36001431919e1c435f1215a85f7e1db", "src/libANGLE/gen_extensions.py": "ad8414b5dd06bc7d7afdacd526fff6db", "src/libANGLE/gles_extensions_autogen.cpp": - "b976708b85cae170f402bb1f0d034530", + "abae19a3de2ed93ce2718c0b72c5557d", "src/libANGLE/gles_extensions_autogen.h": - "cf728525657b876d475440fa75c6c495" + "6c530ce46a5537b4584d7977c6ba1ffa" } \ No newline at end of file diff --git a/scripts/code_generation_hashes/GL_EGL_WGL_loader.json b/scripts/code_generation_hashes/GL_EGL_WGL_loader.json index 820293294..4974386bf 100644 --- a/scripts/code_generation_hashes/GL_EGL_WGL_loader.json +++ b/scripts/code_generation_hashes/GL_EGL_WGL_loader.json @@ -12,7 +12,7 @@ "scripts/gl_angle_ext.xml": "37eebedc1153cd9d208efa469a10a7b2", "scripts/registry_xml.py": - "bef0145151493df09aeb5239eb0a22f0", + "0b7d606157eb555604452589b3ac6b92", "scripts/wgl.xml": "c36001431919e1c435f1215a85f7e1db", "src/libEGL/egl_loader_autogen.cpp": @@ -24,17 +24,17 @@ "util/capture/trace_egl_loader_autogen.h": "08ec72ee2cf70c590a6683b5c6f07c8b", "util/capture/trace_gles_loader_autogen.cpp": - "fdc7f36a3d07cc65a4101bf858e26127", + "3c6cb1516a2835736b12bcb1a015a0f6", "util/capture/trace_gles_loader_autogen.h": - "dbf389cc82a9146ad64d9c3e857fb0fc", + "559ffddc2c0769a30af183f4b2a29d21", "util/egl_loader_autogen.cpp": "6afbbc553222705dd77c48e7510250dd", "util/egl_loader_autogen.h": "3e1e6ea983aa952601d1b6de83161a8a", "util/gles_loader_autogen.cpp": - "1df0ee076131e4c612bf0db0495c82bf", + "708e58a79a8f80d1957812d55e7e4839", "util/gles_loader_autogen.h": - "5684f9adb6da838c8fcdb87b9876084a", + "3ee7abcf7267e0c432d05c5bdd41e23e", "util/windows/wgl_loader_autogen.cpp": "158e6937dd7bd2879bb440983afd5a36", "util/windows/wgl_loader_autogen.h": diff --git a/scripts/code_generation_hashes/GL_EGL_entry_points.json b/scripts/code_generation_hashes/GL_EGL_entry_points.json index fd05fa78f..2827785ce 100644 --- a/scripts/code_generation_hashes/GL_EGL_entry_points.json +++ b/scripts/code_generation_hashes/GL_EGL_entry_points.json @@ -10,19 +10,19 @@ "scripts/entry_point_packed_gl_enums.json": "a1cdd1545d3095f977b9869df5513071", "scripts/generate_entry_points.py": - "009b7d42189ad073d289db853f3cac5d", + "c2c6d0ad0b060462a8b3d0f863e30849", "scripts/gl.xml": "e8f8d52f5a5b8bd5bdd4557fdc58d5dd", "scripts/gl_angle_ext.xml": "37eebedc1153cd9d208efa469a10a7b2", "scripts/registry_xml.py": - "bef0145151493df09aeb5239eb0a22f0", + "0b7d606157eb555604452589b3ac6b92", "scripts/wgl.xml": "c36001431919e1c435f1215a85f7e1db", "src/common/entry_points_enum_autogen.cpp": - "547fd2eae6a3e94109eb925ae534f3f3", + "c78602e4d4280c80bd72299291db1e81", "src/common/entry_points_enum_autogen.h": - "60e72190c84794dd17ebe4a43d8b07e4", + "11c150e2e12ebf5fc0dc81905733168c", "src/libANGLE/Context_gl_1_autogen.h": "115d224fd28b0bc2b2800354bb57fcf3", "src/libANGLE/Context_gl_2_autogen.h": @@ -30,7 +30,7 @@ "src/libANGLE/Context_gl_3_autogen.h": "cf9b149f033b1349409c0b4ee4042bdd", "src/libANGLE/Context_gl_4_autogen.h": - "e9a07c453ece862d046e2134afaef69b", + "90ef34d3aa1ed1bbd2664ad614f94873", "src/libANGLE/Context_gles_1_0_autogen.h": "51fce95acbf8de72d21255adbbe0e8cd", "src/libANGLE/Context_gles_2_0_autogen.h": @@ -42,7 +42,7 @@ "src/libANGLE/Context_gles_3_2_autogen.h": "48567dca16fd881dfe6d61fee0e3106f", "src/libANGLE/Context_gles_ext_autogen.h": - "cb8b4ebc5e70db363e5f060a9e3a2597", + "51af8aadc8655a48f9a548d3e6c5da8e", "src/libANGLE/capture/capture_gles_1_0_autogen.cpp": "7ec7ef8f779b809a45d74b97502c419b", "src/libANGLE/capture/capture_gles_1_0_autogen.h": @@ -64,11 +64,11 @@ "src/libANGLE/capture/capture_gles_3_2_autogen.h": "74ed7366af3a46c0661397cfa29ec6fc", "src/libANGLE/capture/capture_gles_ext_autogen.cpp": - "18a21759230aea9d3c9fedb8d1edc2ac", + "738f63b9067224ceeb09778285e1ca3b", "src/libANGLE/capture/capture_gles_ext_autogen.h": - "fb8e823b9d9d657ad300e9b589eccef2", + "04d5722c5aae30d3279a394d8b9695b9", "src/libANGLE/capture/frame_capture_replay_autogen.cpp": - "6ae3d4cadc39e2c320f3cd97883e2c9f", + "482cebc219adfd77c868ff825b5ff1d2", "src/libANGLE/capture/frame_capture_utils_autogen.cpp": "90caecf105e7f7a500561d4c5447844b", "src/libANGLE/capture/frame_capture_utils_autogen.h": @@ -88,7 +88,7 @@ "src/libANGLE/validationES3_autogen.h": "0147506ce91c68d8ccbca9688c7251ba", "src/libANGLE/validationESEXT_autogen.h": - "37c67fed673d842e5fb596282d6d5090", + "69e63461a3d05f1f4c768134eee25810", "src/libANGLE/validationGL1_autogen.h": "a247dddc40418180d4b2dbefeb75f233", "src/libANGLE/validationGL2_autogen.h": @@ -162,17 +162,17 @@ "src/libGLESv2/entry_points_gles_3_2_autogen.h": "647f932a299cdb4726b60bbba059f0d2", "src/libGLESv2/entry_points_gles_ext_autogen.cpp": - "b07dc81985e77a6d9ee3a86bdd4fcc68", + "e3a9afa74936e1519c9973a75c6477a8", "src/libGLESv2/entry_points_gles_ext_autogen.h": - "e4919cb73e28310ecf15cd6dbaa941ac", + "b3e6ff8b6e90238694395f3c8e13e805", "src/libGLESv2/libGLESv2_autogen.cpp": - "759920f21a460f539aa1511e2de3af66", + "794b214fe1aae67f9d334875d8193d6e", "src/libGLESv2/libGLESv2_autogen.def": - "761a5f382b9d5cf2447538e2b68cc851", + "b5ea5c18870cdeb042d69a18c4ebe5e5", "src/libGLESv2/libGLESv2_no_capture_autogen.def": - "f9b97ca8df1e9871e5ecca18321d9045", + "9a485f3ff1f980a4ebb25e5d91e8bd02", "src/libGLESv2/libGLESv2_with_capture_autogen.def": - "33b59e6842cf2217320398d0233cf545", + "72613ce94b75c27ef35dac78ec203fc0", "src/libOpenCL/libOpenCL_autogen.cpp": "10849978c910dc1af5dd4f0c815d1581" } \ No newline at end of file diff --git a/scripts/code_generation_hashes/GLenum_value_to_string_map.json b/scripts/code_generation_hashes/GLenum_value_to_string_map.json index 4cc5e3928..0dea7d83e 100644 --- a/scripts/code_generation_hashes/GLenum_value_to_string_map.json +++ b/scripts/code_generation_hashes/GLenum_value_to_string_map.json @@ -6,7 +6,7 @@ "scripts/gl_angle_ext.xml": "37eebedc1153cd9d208efa469a10a7b2", "scripts/registry_xml.py": - "bef0145151493df09aeb5239eb0a22f0", + "0b7d606157eb555604452589b3ac6b92", "src/libANGLE/capture/gl_enum_utils_autogen.cpp": "6e6b08183c720c9f5521df6fdc7f2b70", "src/libANGLE/capture/gl_enum_utils_autogen.h": diff --git a/scripts/code_generation_hashes/proc_table.json b/scripts/code_generation_hashes/proc_table.json index 43b8238c5..298a0a6b9 100644 --- a/scripts/code_generation_hashes/proc_table.json +++ b/scripts/code_generation_hashes/proc_table.json @@ -12,7 +12,7 @@ "scripts/gl_angle_ext.xml": "37eebedc1153cd9d208efa469a10a7b2", "scripts/registry_xml.py": - "bef0145151493df09aeb5239eb0a22f0", + "0b7d606157eb555604452589b3ac6b92", "scripts/wgl.xml": "c36001431919e1c435f1215a85f7e1db", "src/libGL/proc_table_wgl_autogen.cpp": @@ -20,7 +20,7 @@ "src/libGLESv2/proc_table_cl_autogen.cpp": "ed003b0f041aaaa35b67d3fe07e61f91", "src/libGLESv2/proc_table_egl_autogen.cpp": - "e94e6f51ed6bde891d299540e61da44d", + "eca316595ac3c286f134d4388be232eb", "src/libOpenCL/libOpenCL_autogen.map": "bc5f5cf48227149ed321258a16eff1d7" } \ No newline at end of file diff --git a/scripts/generate_entry_points.py b/scripts/generate_entry_points.py index dd56517fa..3bb4bc15d 100755 --- a/scripts/generate_entry_points.py +++ b/scripts/generate_entry_points.py @@ -37,6 +37,8 @@ NO_EVENT_MARKER_EXCEPTIONS_LIST = sorted([ ALIASING_EXCEPTIONS = [ 'glRenderbufferStorageMultisampleEXT', 'renderbufferStorageMultisampleEXT', + 'drawArraysInstancedBaseInstanceANGLE', + 'drawElementsInstancedBaseVertexBaseInstanceANGLE', ] # These are the entry points which potentially are used first by an application diff --git a/scripts/registry_xml.py b/scripts/registry_xml.py index 71a1c8821..53e39fdef 100644 --- a/scripts/registry_xml.py +++ b/scripts/registry_xml.py @@ -76,6 +76,7 @@ gles_requestable_extensions = [ "GL_ANGLE_texture_usage", "GL_APPLE_clip_distance", "GL_ARB_sync", + "GL_EXT_base_instance", "GL_EXT_blend_func_extended", "GL_EXT_blend_minmax", "GL_EXT_buffer_storage", diff --git a/src/common/entry_points_enum_autogen.cpp b/src/common/entry_points_enum_autogen.cpp index 2ac99230b..49b4b88bd 100644 --- a/src/common/entry_points_enum_autogen.cpp +++ b/src/common/entry_points_enum_autogen.cpp @@ -986,6 +986,8 @@ const char *GetEntryPointName(EntryPoint ep) return "glDrawArraysInstancedBaseInstance"; case EntryPoint::GLDrawArraysInstancedBaseInstanceANGLE: return "glDrawArraysInstancedBaseInstanceANGLE"; + case EntryPoint::GLDrawArraysInstancedBaseInstanceEXT: + return "glDrawArraysInstancedBaseInstanceEXT"; case EntryPoint::GLDrawArraysInstancedEXT: return "glDrawArraysInstancedEXT"; case EntryPoint::GLDrawBuffer: @@ -1010,12 +1012,16 @@ const char *GetEntryPointName(EntryPoint ep) return "glDrawElementsInstancedANGLE"; case EntryPoint::GLDrawElementsInstancedBaseInstance: return "glDrawElementsInstancedBaseInstance"; + case EntryPoint::GLDrawElementsInstancedBaseInstanceEXT: + return "glDrawElementsInstancedBaseInstanceEXT"; case EntryPoint::GLDrawElementsInstancedBaseVertex: return "glDrawElementsInstancedBaseVertex"; case EntryPoint::GLDrawElementsInstancedBaseVertexBaseInstance: return "glDrawElementsInstancedBaseVertexBaseInstance"; case EntryPoint::GLDrawElementsInstancedBaseVertexBaseInstanceANGLE: return "glDrawElementsInstancedBaseVertexBaseInstanceANGLE"; + case EntryPoint::GLDrawElementsInstancedBaseVertexBaseInstanceEXT: + return "glDrawElementsInstancedBaseVertexBaseInstanceEXT"; case EntryPoint::GLDrawElementsInstancedBaseVertexEXT: return "glDrawElementsInstancedBaseVertexEXT"; case EntryPoint::GLDrawElementsInstancedBaseVertexOES: diff --git a/src/common/entry_points_enum_autogen.h b/src/common/entry_points_enum_autogen.h index 9a79f925c..1fe76d37d 100644 --- a/src/common/entry_points_enum_autogen.h +++ b/src/common/entry_points_enum_autogen.h @@ -499,6 +499,7 @@ enum class EntryPoint GLDrawArraysInstancedANGLE, GLDrawArraysInstancedBaseInstance, GLDrawArraysInstancedBaseInstanceANGLE, + GLDrawArraysInstancedBaseInstanceEXT, GLDrawArraysInstancedEXT, GLDrawBuffer, GLDrawBuffers, @@ -511,9 +512,11 @@ enum class EntryPoint GLDrawElementsInstanced, GLDrawElementsInstancedANGLE, GLDrawElementsInstancedBaseInstance, + GLDrawElementsInstancedBaseInstanceEXT, GLDrawElementsInstancedBaseVertex, GLDrawElementsInstancedBaseVertexBaseInstance, GLDrawElementsInstancedBaseVertexBaseInstanceANGLE, + GLDrawElementsInstancedBaseVertexBaseInstanceEXT, GLDrawElementsInstancedBaseVertexEXT, GLDrawElementsInstancedBaseVertexOES, GLDrawElementsInstancedEXT, diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp index 3b1fe27f5..1d81aafa4 100644 --- a/src/libANGLE/Context.cpp +++ b/src/libANGLE/Context.cpp @@ -6760,6 +6760,25 @@ void Context::drawArraysInstancedBaseInstance(PrimitiveMode mode, MarkTransformFeedbackBufferUsage(this, count, 1); } +void Context::drawArraysInstancedBaseInstanceANGLE(PrimitiveMode mode, + GLint first, + GLsizei count, + GLsizei instanceCount, + GLuint baseInstance) +{ + drawArraysInstancedBaseInstance(mode, first, count, instanceCount, baseInstance); +} + +void Context::drawElementsInstancedBaseInstance(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLuint baseinstance) +{ + UNIMPLEMENTED(); +} + void Context::drawElementsInstancedBaseVertexBaseInstance(PrimitiveMode mode, GLsizei count, DrawElementsType type, @@ -6795,6 +6814,18 @@ void Context::drawElementsInstancedBaseVertexBaseInstance(PrimitiveMode mode, this, mode, count, type, indices, instanceCount, baseVertex, baseInstance)); } +void Context::drawElementsInstancedBaseVertexBaseInstanceANGLE(PrimitiveMode mode, + GLsizei count, + DrawElementsType type, + const GLvoid *indices, + GLsizei instanceCount, + GLint baseVertex, + GLuint baseInstance) +{ + drawElementsInstancedBaseVertexBaseInstance(mode, count, type, indices, instanceCount, + baseVertex, baseInstance); +} + void Context::multiDrawArraysInstancedBaseInstance(PrimitiveMode mode, const GLint *firsts, const GLsizei *counts, diff --git a/src/libANGLE/Context_gl.cpp b/src/libANGLE/Context_gl.cpp index cfe32d842..28f3685a2 100644 --- a/src/libANGLE/Context_gl.cpp +++ b/src/libANGLE/Context_gl.cpp @@ -2654,16 +2654,6 @@ void Context::viewportIndexedfv(GLuint index, const GLfloat *v) UNIMPLEMENTED(); } -void Context::drawElementsInstancedBaseInstance(GLenum mode, - GLsizei count, - GLenum type, - const void *indices, - GLsizei instancecount, - GLuint baseinstance) -{ - UNIMPLEMENTED(); -} - void Context::drawTransformFeedbackInstanced(GLenum mode, TransformFeedbackID id, GLsizei instancecount) diff --git a/src/libANGLE/Context_gl_4_autogen.h b/src/libANGLE/Context_gl_4_autogen.h index 6dc29d7a8..536763b42 100644 --- a/src/libANGLE/Context_gl_4_autogen.h +++ b/src/libANGLE/Context_gl_4_autogen.h @@ -116,9 +116,6 @@ void viewportArrayv(GLuint first, GLsizei count, const GLfloat *v); \ void viewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); \ void viewportIndexedfv(GLuint index, const GLfloat *v); \ - void drawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum type, \ - const void *indices, GLsizei instancecount, \ - GLuint baseinstance); \ void drawTransformFeedbackInstanced(GLenum mode, TransformFeedbackID idPacked, \ GLsizei instancecount); \ void drawTransformFeedbackStreamInstanced(GLenum mode, TransformFeedbackID idPacked, \ diff --git a/src/libANGLE/Context_gles_ext_autogen.h b/src/libANGLE/Context_gles_ext_autogen.h index 38f4af8ba..66e02ec8d 100644 --- a/src/libANGLE/Context_gles_ext_autogen.h +++ b/src/libANGLE/Context_gles_ext_autogen.h @@ -82,6 +82,15 @@ void eGLImageTargetTextureStorage(GLuint texture, GLeglImageOES image, \ const GLint *attrib_list); \ /* GL_EXT_YUV_target */ \ + /* GL_EXT_base_instance */ \ + void drawArraysInstancedBaseInstance(PrimitiveMode modePacked, GLint first, GLsizei count, \ + GLsizei instancecount, GLuint baseinstance); \ + void drawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum type, \ + const void *indices, GLsizei instancecount, \ + GLuint baseinstance); \ + void drawElementsInstancedBaseVertexBaseInstance( \ + PrimitiveMode modePacked, GLsizei count, DrawElementsType typePacked, const void *indices, \ + GLsizei instancecount, GLint basevertex, GLuint baseinstance); \ /* GL_EXT_blend_func_extended */ \ void bindFragDataLocation(ShaderProgramID programPacked, GLuint color, const GLchar *name); \ void bindFragDataLocationIndexed(ShaderProgramID programPacked, GLuint colorNumber, \ @@ -325,9 +334,10 @@ /* ANGLE Extensions */ \ \ /* GL_ANGLE_base_vertex_base_instance */ \ - void drawArraysInstancedBaseInstance(PrimitiveMode modePacked, GLint first, GLsizei count, \ - GLsizei instanceCount, GLuint baseInstance); \ - void drawElementsInstancedBaseVertexBaseInstance( \ + void drawArraysInstancedBaseInstanceANGLE(PrimitiveMode modePacked, GLint first, \ + GLsizei count, GLsizei instanceCount, \ + GLuint baseInstance); \ + void drawElementsInstancedBaseVertexBaseInstanceANGLE( \ PrimitiveMode modePacked, GLsizei count, DrawElementsType typePacked, \ const GLvoid *indices, GLsizei instanceCount, GLint baseVertex, GLuint baseInstance); \ void multiDrawArraysInstancedBaseInstance( \ diff --git a/src/libANGLE/capture/capture_gles_ext_autogen.cpp b/src/libANGLE/capture/capture_gles_ext_autogen.cpp index d1a43e4d6..f0afb475d 100644 --- a/src/libANGLE/capture/capture_gles_ext_autogen.cpp +++ b/src/libANGLE/capture/capture_gles_ext_autogen.cpp @@ -5078,6 +5078,106 @@ CallCapture CaptureEGLImageTargetTextureStorageEXT(const State &glState, std::move(paramBuffer)); } +CallCapture CaptureDrawArraysInstancedBaseInstanceEXT(const State &glState, + bool isCallValid, + PrimitiveMode modePacked, + GLint first, + GLsizei count, + GLsizei instancecount, + GLuint baseinstance) +{ + ParamBuffer paramBuffer; + + paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked); + paramBuffer.addValueParam("first", ParamType::TGLint, first); + paramBuffer.addValueParam("count", ParamType::TGLsizei, count); + paramBuffer.addValueParam("instancecount", ParamType::TGLsizei, instancecount); + paramBuffer.addValueParam("baseinstance", ParamType::TGLuint, baseinstance); + + return CallCapture(angle::EntryPoint::GLDrawArraysInstancedBaseInstanceEXT, + std::move(paramBuffer)); +} + +CallCapture CaptureDrawElementsInstancedBaseInstanceEXT(const State &glState, + bool isCallValid, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLuint baseinstance) +{ + ParamBuffer paramBuffer; + + paramBuffer.addEnumParam("mode", GLenumGroup::PrimitiveType, ParamType::TGLenum, mode); + paramBuffer.addValueParam("count", ParamType::TGLsizei, count); + paramBuffer.addEnumParam("type", GLenumGroup::PrimitiveType, ParamType::TGLenum, type); + + if (isCallValid) + { + ParamCapture indicesParam("indices", ParamType::TvoidConstPointer); + InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value); + CaptureDrawElementsInstancedBaseInstanceEXT_indices(glState, isCallValid, mode, count, type, + indices, instancecount, baseinstance, + &indicesParam); + paramBuffer.addParam(std::move(indicesParam)); + } + else + { + ParamCapture indicesParam("indices", ParamType::TvoidConstPointer); + InitParamValue(ParamType::TvoidConstPointer, static_cast(nullptr), + &indicesParam.value); + paramBuffer.addParam(std::move(indicesParam)); + } + + paramBuffer.addValueParam("instancecount", ParamType::TGLsizei, instancecount); + paramBuffer.addValueParam("baseinstance", ParamType::TGLuint, baseinstance); + + return CallCapture(angle::EntryPoint::GLDrawElementsInstancedBaseInstanceEXT, + std::move(paramBuffer)); +} + +CallCapture CaptureDrawElementsInstancedBaseVertexBaseInstanceEXT(const State &glState, + bool isCallValid, + PrimitiveMode modePacked, + GLsizei count, + DrawElementsType typePacked, + const void *indices, + GLsizei instancecount, + GLint basevertex, + GLuint baseinstance) +{ + ParamBuffer paramBuffer; + + paramBuffer.addValueParam("modePacked", ParamType::TPrimitiveMode, modePacked); + paramBuffer.addValueParam("count", ParamType::TGLsizei, count); + paramBuffer.addValueParam("typePacked", ParamType::TDrawElementsType, typePacked); + + if (isCallValid) + { + ParamCapture indicesParam("indices", ParamType::TvoidConstPointer); + InitParamValue(ParamType::TvoidConstPointer, indices, &indicesParam.value); + CaptureDrawElementsInstancedBaseVertexBaseInstanceEXT_indices( + glState, isCallValid, modePacked, count, typePacked, indices, instancecount, basevertex, + baseinstance, &indicesParam); + paramBuffer.addParam(std::move(indicesParam)); + } + else + { + ParamCapture indicesParam("indices", ParamType::TvoidConstPointer); + InitParamValue(ParamType::TvoidConstPointer, static_cast(nullptr), + &indicesParam.value); + paramBuffer.addParam(std::move(indicesParam)); + } + + paramBuffer.addValueParam("instancecount", ParamType::TGLsizei, instancecount); + paramBuffer.addValueParam("basevertex", ParamType::TGLint, basevertex); + paramBuffer.addValueParam("baseinstance", ParamType::TGLuint, baseinstance); + + return CallCapture(angle::EntryPoint::GLDrawElementsInstancedBaseVertexBaseInstanceEXT, + std::move(paramBuffer)); +} + CallCapture CaptureBindFragDataLocationEXT(const State &glState, bool isCallValid, ShaderProgramID programPacked, diff --git a/src/libANGLE/capture/capture_gles_ext_autogen.h b/src/libANGLE/capture/capture_gles_ext_autogen.h index b7f27f363..53b4dd6b8 100644 --- a/src/libANGLE/capture/capture_gles_ext_autogen.h +++ b/src/libANGLE/capture/capture_gles_ext_autogen.h @@ -981,6 +981,33 @@ angle::CallCapture CaptureEGLImageTargetTextureStorageEXT(const State &glState, // GL_EXT_YUV_target +// GL_EXT_base_instance +angle::CallCapture CaptureDrawArraysInstancedBaseInstanceEXT(const State &glState, + bool isCallValid, + PrimitiveMode modePacked, + GLint first, + GLsizei count, + GLsizei instancecount, + GLuint baseinstance); +angle::CallCapture CaptureDrawElementsInstancedBaseInstanceEXT(const State &glState, + bool isCallValid, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLuint baseinstance); +angle::CallCapture CaptureDrawElementsInstancedBaseVertexBaseInstanceEXT( + const State &glState, + bool isCallValid, + PrimitiveMode modePacked, + GLsizei count, + DrawElementsType typePacked, + const void *indices, + GLsizei instancecount, + GLint basevertex, + GLuint baseinstance); + // GL_EXT_blend_func_extended angle::CallCapture CaptureBindFragDataLocationEXT(const State &glState, bool isCallValid, @@ -4097,6 +4124,26 @@ void CaptureEGLImageTargetTextureStorageEXT_attrib_list(const State &glState, GLeglImageOES image, const GLint *attrib_list, angle::ParamCapture *paramCapture); +void CaptureDrawElementsInstancedBaseInstanceEXT_indices(const State &glState, + bool isCallValid, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLuint baseinstance, + angle::ParamCapture *paramCapture); +void CaptureDrawElementsInstancedBaseVertexBaseInstanceEXT_indices( + const State &glState, + bool isCallValid, + PrimitiveMode modePacked, + GLsizei count, + DrawElementsType typePacked, + const void *indices, + GLsizei instancecount, + GLint basevertex, + GLuint baseinstance, + angle::ParamCapture *paramCapture); void CaptureBindFragDataLocationEXT_name(const State &glState, bool isCallValid, ShaderProgramID programPacked, diff --git a/src/libANGLE/capture/capture_gles_ext_params.cpp b/src/libANGLE/capture/capture_gles_ext_params.cpp index f87761f44..f8e4c6ece 100644 --- a/src/libANGLE/capture/capture_gles_ext_params.cpp +++ b/src/libANGLE/capture/capture_gles_ext_params.cpp @@ -178,6 +178,34 @@ void CaptureDrawElementsInstancedANGLE_indices(const State &glState, paramCapture); } +void CaptureDrawElementsInstancedBaseInstanceEXT_indices(const State &glState, + bool isCallValid, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLuint baseinstance, + angle::ParamCapture *indicesParam) +{ + UNIMPLEMENTED(); +} + +void CaptureDrawElementsInstancedBaseVertexBaseInstanceEXT_indices( + const State &glState, + bool isCallValid, + PrimitiveMode modePacked, + GLsizei count, + DrawElementsType typePacked, + const void *indices, + GLsizei instancecount, + GLint basevertex, + GLuint baseInstance, + angle::ParamCapture *indicesParam) +{ + UNIMPLEMENTED(); +} + void CaptureDrawElementsBaseVertexEXT_indices(const State &glState, bool isCallValid, PrimitiveMode modePacked, diff --git a/src/libANGLE/capture/frame_capture_replay_autogen.cpp b/src/libANGLE/capture/frame_capture_replay_autogen.cpp index 33acaa07e..f8742d9f7 100644 --- a/src/libANGLE/capture/frame_capture_replay_autogen.cpp +++ b/src/libANGLE/capture/frame_capture_replay_autogen.cpp @@ -747,6 +747,16 @@ void FrameCaptureShared::ReplayCall(gl::Context *context, params.getParam("indices", ParamType::TvoidConstPointer, 3)), params.getParam("instancecount", ParamType::TGLsizei, 4).value.GLsizeiVal); break; + case angle::EntryPoint::GLDrawElementsInstancedBaseInstance: + context->drawElementsInstancedBaseInstance( + params.getParam("mode", ParamType::TGLenum, 0).value.GLenumVal, + params.getParam("count", ParamType::TGLsizei, 1).value.GLsizeiVal, + params.getParam("type", ParamType::TGLenum, 2).value.GLenumVal, + replayContext->getAsConstPointer( + params.getParam("indices", ParamType::TvoidConstPointer, 3)), + params.getParam("instancecount", ParamType::TGLsizei, 4).value.GLsizeiVal, + params.getParam("baseinstance", ParamType::TGLuint, 5).value.GLuintVal); + break; case angle::EntryPoint::GLDrawElementsInstancedBaseVertex: context->drawElementsInstancedBaseVertex( params.getParam("modePacked", ParamType::TPrimitiveMode, 0).value.PrimitiveModeVal, diff --git a/src/libANGLE/gles_extensions_autogen.cpp b/src/libANGLE/gles_extensions_autogen.cpp index bb296d65e..9a80feb12 100644 --- a/src/libANGLE/gles_extensions_autogen.cpp +++ b/src/libANGLE/gles_extensions_autogen.cpp @@ -39,6 +39,7 @@ const ExtensionInfoMap &GetExtensionInfoMap() // GLES 2.0 extension strings // -------------------------- + map["GL_EXT_base_instance"] = enableableExtension(&Extensions::baseInstanceEXT); map["GL_KHR_blend_equation_advanced"] = esOnlyExtension(&Extensions::blendEquationAdvancedKHR); map["GL_EXT_blend_func_extended"] = enableableExtension(&Extensions::blendFuncExtendedEXT); map["GL_EXT_blend_minmax"] = enableableExtension(&Extensions::blendMinmaxEXT); diff --git a/src/libANGLE/gles_extensions_autogen.h b/src/libANGLE/gles_extensions_autogen.h index 4c8da3eb5..3694462cf 100644 --- a/src/libANGLE/gles_extensions_autogen.h +++ b/src/libANGLE/gles_extensions_autogen.h @@ -74,6 +74,9 @@ struct Extensions // GLES 2.0+ extensions // -------------------- + // GL_EXT_base_instance + bool baseInstanceEXT = false; + // GL_KHR_blend_equation_advanced bool blendEquationAdvancedKHR = false; diff --git a/src/libANGLE/validationESEXT.cpp b/src/libANGLE/validationESEXT.cpp index 553c04e06..86100ae12 100644 --- a/src/libANGLE/validationESEXT.cpp +++ b/src/libANGLE/validationESEXT.cpp @@ -536,6 +536,45 @@ bool ValidateMultiDrawElementsIndirectEXT(const Context *context, return true; } +bool ValidateDrawArraysInstancedBaseInstanceEXT(const Context *context, + angle::EntryPoint entryPoint, + PrimitiveMode mode, + GLint first, + GLsizei count, + GLsizei instanceCount, + GLuint baseInstance) +{ + UNIMPLEMENTED(); + return false; +} + +bool ValidateDrawElementsInstancedBaseInstanceEXT(const Context *context, + angle::EntryPoint entryPoint, + GLuint mode, + GLsizei count, + GLuint type, + void const *indices, + GLsizei instancecount, + GLuint baseinstance) +{ + UNIMPLEMENTED(); + return false; +} + +bool ValidateDrawElementsInstancedBaseVertexBaseInstanceEXT(const Context *context, + angle::EntryPoint entryPoint, + PrimitiveMode mode, + GLsizei count, + DrawElementsType typePacked, + const void *indices, + GLsizei instancecount, + GLint basevertex, + GLuint baseinstance) +{ + UNIMPLEMENTED(); + return false; +} + bool ValidateDrawElementsBaseVertexOES(const Context *context, angle::EntryPoint entryPoint, PrimitiveMode mode, diff --git a/src/libANGLE/validationESEXT_autogen.h b/src/libANGLE/validationESEXT_autogen.h index 70aea8a4d..6c9ddc7af 100644 --- a/src/libANGLE/validationESEXT_autogen.h +++ b/src/libANGLE/validationESEXT_autogen.h @@ -979,6 +979,32 @@ bool ValidateEGLImageTargetTextureStorageEXT(const Context *context, // GL_EXT_YUV_target +// GL_EXT_base_instance +bool ValidateDrawArraysInstancedBaseInstanceEXT(const Context *context, + angle::EntryPoint entryPoint, + PrimitiveMode modePacked, + GLint first, + GLsizei count, + GLsizei instancecount, + GLuint baseinstance); +bool ValidateDrawElementsInstancedBaseInstanceEXT(const Context *context, + angle::EntryPoint entryPoint, + GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLuint baseinstance); +bool ValidateDrawElementsInstancedBaseVertexBaseInstanceEXT(const Context *context, + angle::EntryPoint entryPoint, + PrimitiveMode modePacked, + GLsizei count, + DrawElementsType typePacked, + const void *indices, + GLsizei instancecount, + GLint basevertex, + GLuint baseinstance); + // GL_EXT_blend_func_extended bool ValidateBindFragDataLocationEXT(const Context *context, angle::EntryPoint entryPoint, diff --git a/src/libGLESv2/entry_points_gles_ext_autogen.cpp b/src/libGLESv2/entry_points_gles_ext_autogen.cpp index 7d19420a0..1710222f4 100644 --- a/src/libGLESv2/entry_points_gles_ext_autogen.cpp +++ b/src/libGLESv2/entry_points_gles_ext_autogen.cpp @@ -378,8 +378,8 @@ void GL_APIENTRY GL_DrawArraysInstancedBaseInstanceANGLE(GLenum mode, modePacked, first, count, instanceCount, baseInstance)); if (isCallValid) { - context->drawArraysInstancedBaseInstance(modePacked, first, count, instanceCount, - baseInstance); + context->drawArraysInstancedBaseInstanceANGLE(modePacked, first, count, instanceCount, + baseInstance); } ANGLE_CAPTURE_GL(DrawArraysInstancedBaseInstanceANGLE, isCallValid, context, modePacked, first, count, instanceCount, baseInstance); @@ -418,7 +418,7 @@ void GL_APIENTRY GL_DrawElementsInstancedBaseVertexBaseInstanceANGLE(GLenum mode modePacked, count, typePacked, indices, instanceCount, baseVertex, baseInstance)); if (isCallValid) { - context->drawElementsInstancedBaseVertexBaseInstance( + context->drawElementsInstancedBaseVertexBaseInstanceANGLE( modePacked, count, typePacked, indices, instanceCount, baseVertex, baseInstance); } ANGLE_CAPTURE_GL(DrawElementsInstancedBaseVertexBaseInstanceANGLE, isCallValid, context, @@ -4256,6 +4256,118 @@ void GL_APIENTRY GL_EGLImageTargetTextureStorageEXT(GLuint texture, // GL_EXT_YUV_target +// GL_EXT_base_instance +void GL_APIENTRY GL_DrawArraysInstancedBaseInstanceEXT(GLenum mode, + GLint first, + GLsizei count, + GLsizei instancecount, + GLuint baseinstance) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawArraysInstancedBaseInstanceEXT, + "context = %d, mode = %s, first = %d, count = %d, instancecount = %d, baseinstance = %u", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), first, count, + instancecount, baseinstance); + + if (context) + { + PrimitiveMode modePacked = PackParam(mode); + std::unique_lock shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawArraysInstancedBaseInstanceEXT( + context, angle::EntryPoint::GLDrawArraysInstancedBaseInstanceEXT, + modePacked, first, count, instancecount, baseinstance)); + if (isCallValid) + { + context->drawArraysInstancedBaseInstance(modePacked, first, count, instancecount, + baseinstance); + } + ANGLE_CAPTURE_GL(DrawArraysInstancedBaseInstanceEXT, isCallValid, context, modePacked, + first, count, instancecount, baseinstance); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawElementsInstancedBaseInstanceEXT(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLuint baseinstance) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawElementsInstancedBaseInstanceEXT, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", instancecount = %d, baseinstance = %u", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::PrimitiveType, type), (uintptr_t)indices, instancecount, + baseinstance); + + if (context) + { + std::unique_lock shareContextLock = GetContextLock(context); + bool isCallValid = (context->skipValidation() || + ValidateDrawElementsInstancedBaseInstanceEXT( + context, angle::EntryPoint::GLDrawElementsInstancedBaseInstanceEXT, + mode, count, type, indices, instancecount, baseinstance)); + if (isCallValid) + { + context->drawElementsInstancedBaseInstance(mode, count, type, indices, instancecount, + baseinstance); + } + ANGLE_CAPTURE_GL(DrawElementsInstancedBaseInstanceEXT, isCallValid, context, mode, count, + type, indices, instancecount, baseinstance); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + +void GL_APIENTRY GL_DrawElementsInstancedBaseVertexBaseInstanceEXT(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex, + GLuint baseinstance) +{ + Context *context = GetValidGlobalContext(); + EVENT(context, GLDrawElementsInstancedBaseVertexBaseInstanceEXT, + "context = %d, mode = %s, count = %d, type = %s, indices = 0x%016" PRIxPTR + ", instancecount = %d, basevertex = %d, baseinstance = %u", + CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count, + GLenumToString(GLenumGroup::PrimitiveType, type), (uintptr_t)indices, instancecount, + basevertex, baseinstance); + + if (context) + { + PrimitiveMode modePacked = PackParam(mode); + DrawElementsType typePacked = PackParam(type); + std::unique_lock shareContextLock = GetContextLock(context); + bool isCallValid = + (context->skipValidation() || + ValidateDrawElementsInstancedBaseVertexBaseInstanceEXT( + context, angle::EntryPoint::GLDrawElementsInstancedBaseVertexBaseInstanceEXT, + modePacked, count, typePacked, indices, instancecount, basevertex, baseinstance)); + if (isCallValid) + { + context->drawElementsInstancedBaseVertexBaseInstance( + modePacked, count, typePacked, indices, instancecount, basevertex, baseinstance); + } + ANGLE_CAPTURE_GL(DrawElementsInstancedBaseVertexBaseInstanceEXT, isCallValid, context, + modePacked, count, typePacked, indices, instancecount, basevertex, + baseinstance); + } + else + { + GenerateContextLostErrorOnCurrentGlobalContext(); + } +} + // GL_EXT_blend_func_extended void GL_APIENTRY GL_BindFragDataLocationEXT(GLuint program, GLuint color, const GLchar *name) { diff --git a/src/libGLESv2/entry_points_gles_ext_autogen.h b/src/libGLESv2/entry_points_gles_ext_autogen.h index c705f3122..ba7ec58aa 100644 --- a/src/libGLESv2/entry_points_gles_ext_autogen.h +++ b/src/libGLESv2/entry_points_gles_ext_autogen.h @@ -735,6 +735,27 @@ ANGLE_EXPORT void GL_APIENTRY GL_EGLImageTargetTextureStorageEXT(GLuint texture, // GL_EXT_YUV_target +// GL_EXT_base_instance +ANGLE_EXPORT void GL_APIENTRY GL_DrawArraysInstancedBaseInstanceEXT(GLenum mode, + GLint first, + GLsizei count, + GLsizei instancecount, + GLuint baseinstance); +ANGLE_EXPORT void GL_APIENTRY GL_DrawElementsInstancedBaseInstanceEXT(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLuint baseinstance); +ANGLE_EXPORT void GL_APIENTRY +GL_DrawElementsInstancedBaseVertexBaseInstanceEXT(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex, + GLuint baseinstance); + // GL_EXT_blend_func_extended ANGLE_EXPORT void GL_APIENTRY GL_BindFragDataLocationEXT(GLuint program, GLuint color, diff --git a/src/libGLESv2/libGLESv2_autogen.cpp b/src/libGLESv2/libGLESv2_autogen.cpp index 2c4046cd1..1a5975bd7 100644 --- a/src/libGLESv2/libGLESv2_autogen.cpp +++ b/src/libGLESv2/libGLESv2_autogen.cpp @@ -3908,6 +3908,39 @@ void GL_APIENTRY glEGLImageTargetTextureStorageEXT(GLuint texture, // GL_EXT_YUV_target +// GL_EXT_base_instance +void GL_APIENTRY glDrawArraysInstancedBaseInstanceEXT(GLenum mode, + GLint first, + GLsizei count, + GLsizei instancecount, + GLuint baseinstance) +{ + return GL_DrawArraysInstancedBaseInstanceEXT(mode, first, count, instancecount, baseinstance); +} + +void GL_APIENTRY glDrawElementsInstancedBaseInstanceEXT(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLuint baseinstance) +{ + return GL_DrawElementsInstancedBaseInstanceEXT(mode, count, type, indices, instancecount, + baseinstance); +} + +void GL_APIENTRY glDrawElementsInstancedBaseVertexBaseInstanceEXT(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei instancecount, + GLint basevertex, + GLuint baseinstance) +{ + return GL_DrawElementsInstancedBaseVertexBaseInstanceEXT( + mode, count, type, indices, instancecount, basevertex, baseinstance); +} + // GL_EXT_blend_func_extended void GL_APIENTRY glBindFragDataLocationEXT(GLuint program, GLuint color, const GLchar *name) { diff --git a/src/libGLESv2/libGLESv2_autogen.def b/src/libGLESv2/libGLESv2_autogen.def index 5396365c8..0b387455f 100644 --- a/src/libGLESv2/libGLESv2_autogen.def +++ b/src/libGLESv2/libGLESv2_autogen.def @@ -654,6 +654,11 @@ EXPORTS ; GL_EXT_YUV_target + ; GL_EXT_base_instance + glDrawArraysInstancedBaseInstanceEXT + glDrawElementsInstancedBaseInstanceEXT + glDrawElementsInstancedBaseVertexBaseInstanceEXT + ; GL_EXT_blend_func_extended glBindFragDataLocationEXT glBindFragDataLocationIndexedEXT diff --git a/src/libGLESv2/libGLESv2_no_capture_autogen.def b/src/libGLESv2/libGLESv2_no_capture_autogen.def index 2af0d18ef..8af07e072 100644 --- a/src/libGLESv2/libGLESv2_no_capture_autogen.def +++ b/src/libGLESv2/libGLESv2_no_capture_autogen.def @@ -654,6 +654,11 @@ EXPORTS ; GL_EXT_YUV_target + ; GL_EXT_base_instance + glDrawArraysInstancedBaseInstanceEXT + glDrawElementsInstancedBaseInstanceEXT + glDrawElementsInstancedBaseVertexBaseInstanceEXT + ; GL_EXT_blend_func_extended glBindFragDataLocationEXT glBindFragDataLocationIndexedEXT diff --git a/src/libGLESv2/libGLESv2_with_capture_autogen.def b/src/libGLESv2/libGLESv2_with_capture_autogen.def index b833d3409..c67260c02 100644 --- a/src/libGLESv2/libGLESv2_with_capture_autogen.def +++ b/src/libGLESv2/libGLESv2_with_capture_autogen.def @@ -654,6 +654,11 @@ EXPORTS ; GL_EXT_YUV_target + ; GL_EXT_base_instance + glDrawArraysInstancedBaseInstanceEXT + glDrawElementsInstancedBaseInstanceEXT + glDrawElementsInstancedBaseVertexBaseInstanceEXT + ; GL_EXT_blend_func_extended glBindFragDataLocationEXT glBindFragDataLocationIndexedEXT diff --git a/src/libGLESv2/proc_table_egl_autogen.cpp b/src/libGLESv2/proc_table_egl_autogen.cpp index 211684631..4d42c7698 100644 --- a/src/libGLESv2/proc_table_egl_autogen.cpp +++ b/src/libGLESv2/proc_table_egl_autogen.cpp @@ -300,6 +300,7 @@ const ProcEntry g_procTable[] = { {"glDrawArraysInstanced", P(GL_DrawArraysInstanced)}, {"glDrawArraysInstancedANGLE", P(GL_DrawArraysInstancedANGLE)}, {"glDrawArraysInstancedBaseInstanceANGLE", P(GL_DrawArraysInstancedBaseInstanceANGLE)}, + {"glDrawArraysInstancedBaseInstanceEXT", P(GL_DrawArraysInstancedBaseInstanceEXT)}, {"glDrawArraysInstancedEXT", P(GL_DrawArraysInstancedEXT)}, {"glDrawBuffers", P(GL_DrawBuffers)}, {"glDrawBuffersEXT", P(GL_DrawBuffersEXT)}, @@ -310,9 +311,12 @@ const ProcEntry g_procTable[] = { {"glDrawElementsIndirect", P(GL_DrawElementsIndirect)}, {"glDrawElementsInstanced", P(GL_DrawElementsInstanced)}, {"glDrawElementsInstancedANGLE", P(GL_DrawElementsInstancedANGLE)}, + {"glDrawElementsInstancedBaseInstanceEXT", P(GL_DrawElementsInstancedBaseInstanceEXT)}, {"glDrawElementsInstancedBaseVertex", P(GL_DrawElementsInstancedBaseVertex)}, {"glDrawElementsInstancedBaseVertexBaseInstanceANGLE", P(GL_DrawElementsInstancedBaseVertexBaseInstanceANGLE)}, + {"glDrawElementsInstancedBaseVertexBaseInstanceEXT", + P(GL_DrawElementsInstancedBaseVertexBaseInstanceEXT)}, {"glDrawElementsInstancedBaseVertexEXT", P(GL_DrawElementsInstancedBaseVertexEXT)}, {"glDrawElementsInstancedBaseVertexOES", P(GL_DrawElementsInstancedBaseVertexOES)}, {"glDrawElementsInstancedEXT", P(GL_DrawElementsInstancedEXT)}, @@ -947,5 +951,5 @@ const ProcEntry g_procTable[] = { {"glWaitSync", P(GL_WaitSync)}, {"glWeightPointerOES", P(GL_WeightPointerOES)}}; -const size_t g_numProcs = 914; +const size_t g_numProcs = 917; } // namespace egl diff --git a/util/capture/trace_gles_loader_autogen.cpp b/util/capture/trace_gles_loader_autogen.cpp index 474b277ed..a605145b8 100644 --- a/util/capture/trace_gles_loader_autogen.cpp +++ b/util/capture/trace_gles_loader_autogen.cpp @@ -613,6 +613,12 @@ ANGLE_TRACE_LOADER_EXPORT PFNGLLOSECONTEXTCHROMIUMPROC t_glLoseContextCHROMIUM; ANGLE_TRACE_LOADER_EXPORT PFNGLEGLIMAGETARGETTEXSTORAGEEXTPROC t_glEGLImageTargetTexStorageEXT; ANGLE_TRACE_LOADER_EXPORT PFNGLEGLIMAGETARGETTEXTURESTORAGEEXTPROC t_glEGLImageTargetTextureStorageEXT; +ANGLE_TRACE_LOADER_EXPORT PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEEXTPROC + t_glDrawArraysInstancedBaseInstanceEXT; +ANGLE_TRACE_LOADER_EXPORT PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEEXTPROC + t_glDrawElementsInstancedBaseInstanceEXT; +ANGLE_TRACE_LOADER_EXPORT PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEEXTPROC + t_glDrawElementsInstancedBaseVertexBaseInstanceEXT; ANGLE_TRACE_LOADER_EXPORT PFNGLBINDFRAGDATALOCATIONEXTPROC t_glBindFragDataLocationEXT; ANGLE_TRACE_LOADER_EXPORT PFNGLBINDFRAGDATALOCATIONINDEXEDEXTPROC t_glBindFragDataLocationIndexedEXT; @@ -1774,6 +1780,15 @@ void LoadGLES(LoadProc loadProc) t_glEGLImageTargetTextureStorageEXT = reinterpret_cast( loadProc("glEGLImageTargetTextureStorageEXT")); + t_glDrawArraysInstancedBaseInstanceEXT = + reinterpret_cast( + loadProc("glDrawArraysInstancedBaseInstanceEXT")); + t_glDrawElementsInstancedBaseInstanceEXT = + reinterpret_cast( + loadProc("glDrawElementsInstancedBaseInstanceEXT")); + t_glDrawElementsInstancedBaseVertexBaseInstanceEXT = + reinterpret_cast( + loadProc("glDrawElementsInstancedBaseVertexBaseInstanceEXT")); t_glBindFragDataLocationEXT = reinterpret_cast(loadProc("glBindFragDataLocationEXT")); t_glBindFragDataLocationIndexedEXT = reinterpret_cast( diff --git a/util/capture/trace_gles_loader_autogen.h b/util/capture/trace_gles_loader_autogen.h index bc8ba41dc..0aeb6248e 100644 --- a/util/capture/trace_gles_loader_autogen.h +++ b/util/capture/trace_gles_loader_autogen.h @@ -584,6 +584,10 @@ #define glLoseContextCHROMIUM t_glLoseContextCHROMIUM #define glEGLImageTargetTexStorageEXT t_glEGLImageTargetTexStorageEXT #define glEGLImageTargetTextureStorageEXT t_glEGLImageTargetTextureStorageEXT +#define glDrawArraysInstancedBaseInstanceEXT t_glDrawArraysInstancedBaseInstanceEXT +#define glDrawElementsInstancedBaseInstanceEXT t_glDrawElementsInstancedBaseInstanceEXT +#define glDrawElementsInstancedBaseVertexBaseInstanceEXT \ + t_glDrawElementsInstancedBaseVertexBaseInstanceEXT #define glBindFragDataLocationEXT t_glBindFragDataLocationEXT #define glBindFragDataLocationIndexedEXT t_glBindFragDataLocationIndexedEXT #define glGetFragDataIndexEXT t_glGetFragDataIndexEXT @@ -1456,6 +1460,12 @@ ANGLE_TRACE_LOADER_EXPORT extern PFNGLEGLIMAGETARGETTEXSTORAGEEXTPROC t_glEGLImageTargetTexStorageEXT; ANGLE_TRACE_LOADER_EXPORT extern PFNGLEGLIMAGETARGETTEXTURESTORAGEEXTPROC t_glEGLImageTargetTextureStorageEXT; +ANGLE_TRACE_LOADER_EXPORT extern PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEEXTPROC + t_glDrawArraysInstancedBaseInstanceEXT; +ANGLE_TRACE_LOADER_EXPORT extern PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEEXTPROC + t_glDrawElementsInstancedBaseInstanceEXT; +ANGLE_TRACE_LOADER_EXPORT extern PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEEXTPROC + t_glDrawElementsInstancedBaseVertexBaseInstanceEXT; ANGLE_TRACE_LOADER_EXPORT extern PFNGLBINDFRAGDATALOCATIONEXTPROC t_glBindFragDataLocationEXT; ANGLE_TRACE_LOADER_EXPORT extern PFNGLBINDFRAGDATALOCATIONINDEXEDEXTPROC t_glBindFragDataLocationIndexedEXT; diff --git a/util/gles_loader_autogen.cpp b/util/gles_loader_autogen.cpp index be82f4951..357f58738 100644 --- a/util/gles_loader_autogen.cpp +++ b/util/gles_loader_autogen.cpp @@ -589,6 +589,12 @@ ANGLE_UTIL_EXPORT PFNGLCOVERAGEMODULATIONCHROMIUMPROC l_glCoverageModulationCHRO ANGLE_UTIL_EXPORT PFNGLLOSECONTEXTCHROMIUMPROC l_glLoseContextCHROMIUM; ANGLE_UTIL_EXPORT PFNGLEGLIMAGETARGETTEXSTORAGEEXTPROC l_glEGLImageTargetTexStorageEXT; ANGLE_UTIL_EXPORT PFNGLEGLIMAGETARGETTEXTURESTORAGEEXTPROC l_glEGLImageTargetTextureStorageEXT; +ANGLE_UTIL_EXPORT PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEEXTPROC + l_glDrawArraysInstancedBaseInstanceEXT; +ANGLE_UTIL_EXPORT PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEEXTPROC + l_glDrawElementsInstancedBaseInstanceEXT; +ANGLE_UTIL_EXPORT PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEEXTPROC + l_glDrawElementsInstancedBaseVertexBaseInstanceEXT; ANGLE_UTIL_EXPORT PFNGLBINDFRAGDATALOCATIONEXTPROC l_glBindFragDataLocationEXT; ANGLE_UTIL_EXPORT PFNGLBINDFRAGDATALOCATIONINDEXEDEXTPROC l_glBindFragDataLocationIndexedEXT; ANGLE_UTIL_EXPORT PFNGLGETFRAGDATAINDEXEXTPROC l_glGetFragDataIndexEXT; @@ -1743,6 +1749,15 @@ void LoadGLES(LoadProc loadProc) l_glEGLImageTargetTextureStorageEXT = reinterpret_cast( loadProc("glEGLImageTargetTextureStorageEXT")); + l_glDrawArraysInstancedBaseInstanceEXT = + reinterpret_cast( + loadProc("glDrawArraysInstancedBaseInstanceEXT")); + l_glDrawElementsInstancedBaseInstanceEXT = + reinterpret_cast( + loadProc("glDrawElementsInstancedBaseInstanceEXT")); + l_glDrawElementsInstancedBaseVertexBaseInstanceEXT = + reinterpret_cast( + loadProc("glDrawElementsInstancedBaseVertexBaseInstanceEXT")); l_glBindFragDataLocationEXT = reinterpret_cast(loadProc("glBindFragDataLocationEXT")); l_glBindFragDataLocationIndexedEXT = reinterpret_cast( diff --git a/util/gles_loader_autogen.h b/util/gles_loader_autogen.h index 0d3ae61fc..afa62d4e9 100644 --- a/util/gles_loader_autogen.h +++ b/util/gles_loader_autogen.h @@ -584,6 +584,10 @@ #define glLoseContextCHROMIUM l_glLoseContextCHROMIUM #define glEGLImageTargetTexStorageEXT l_glEGLImageTargetTexStorageEXT #define glEGLImageTargetTextureStorageEXT l_glEGLImageTargetTextureStorageEXT +#define glDrawArraysInstancedBaseInstanceEXT l_glDrawArraysInstancedBaseInstanceEXT +#define glDrawElementsInstancedBaseInstanceEXT l_glDrawElementsInstancedBaseInstanceEXT +#define glDrawElementsInstancedBaseVertexBaseInstanceEXT \ + l_glDrawElementsInstancedBaseVertexBaseInstanceEXT #define glBindFragDataLocationEXT l_glBindFragDataLocationEXT #define glBindFragDataLocationIndexedEXT l_glBindFragDataLocationIndexedEXT #define glGetFragDataIndexEXT l_glGetFragDataIndexEXT @@ -1420,6 +1424,12 @@ ANGLE_UTIL_EXPORT extern PFNGLLOSECONTEXTCHROMIUMPROC l_glLoseContextCHROMIUM; ANGLE_UTIL_EXPORT extern PFNGLEGLIMAGETARGETTEXSTORAGEEXTPROC l_glEGLImageTargetTexStorageEXT; ANGLE_UTIL_EXPORT extern PFNGLEGLIMAGETARGETTEXTURESTORAGEEXTPROC l_glEGLImageTargetTextureStorageEXT; +ANGLE_UTIL_EXPORT extern PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEEXTPROC + l_glDrawArraysInstancedBaseInstanceEXT; +ANGLE_UTIL_EXPORT extern PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEEXTPROC + l_glDrawElementsInstancedBaseInstanceEXT; +ANGLE_UTIL_EXPORT extern PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEEXTPROC + l_glDrawElementsInstancedBaseVertexBaseInstanceEXT; ANGLE_UTIL_EXPORT extern PFNGLBINDFRAGDATALOCATIONEXTPROC l_glBindFragDataLocationEXT; ANGLE_UTIL_EXPORT extern PFNGLBINDFRAGDATALOCATIONINDEXEDEXTPROC l_glBindFragDataLocationIndexedEXT; ANGLE_UTIL_EXPORT extern PFNGLGETFRAGDATAINDEXEXTPROC l_glGetFragDataIndexEXT;