mesa: expose EXT_base_instance in ES3 contexts
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 3 Apr 2016 06:44:50 +0000 (02:44 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 4 Apr 2016 00:40:55 +0000 (20:40 -0400)
This extension is identical to ARB_base_instance. Reuse the same
entrypoints.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/mapi/glapi/gen/es_EXT.xml
src/mesa/main/extensions_table.h
src/mesa/main/tests/dispatch_sanity.cpp
src/mesa/vbo/vbo_exec_array.c

index 3b2c15ebf5c3ed880b3bac53d8495df72b44bcae..bf67eae40d48c690350432699e9dedd1eb616c93 100644 (file)
 
 </category>
 
+<category name="GL_EXT_base_instance" number="203">
+
+  <function name="DrawArraysInstancedBaseInstanceEXT" es2="3.0"
+            alias="DrawArraysInstancedBaseInstance">
+    <param name="mode" type="GLenum"/>
+    <param name="first" type="GLint"/>
+    <param name="count" type="GLsizei"/>
+    <param name="instancecount" type="GLsizei"/>
+    <param name="baseinstance" type="GLuint"/>
+  </function>
+
+  <function name="DrawElementsInstancedBaseInstanceEXT" es2="3.0"
+            alias="DrawElementsInstancedBaseInstance">
+    <param name="mode" type="GLenum"/>
+    <param name="count" type="GLsizei"/>
+    <param name="type" type="GLenum"/>
+    <param name="indices" type="const GLvoid *"/>
+    <param name="instancecount" type="GLsizei"/>
+    <param name="baseinstance" type="GLuint"/>
+  </function>
+
+  <function name="DrawElementsInstancedBaseVertexBaseInstanceEXT" es2="3.0"
+            alias="DrawElementsInstancedBaseVertexBaseInstance">
+    <param name="mode" type="GLenum"/>
+    <param name="count" type="GLsizei"/>
+    <param name="type" type="GLenum"/>
+    <param name="indices" type="const GLvoid *"/>
+    <param name="instancecount" type="GLsizei"/>
+    <param name="basevertex" type="GLint"/>
+    <param name="baseinstance" type="GLuint"/>
+  </function>
+
+</category>
+
 <category name="GL_EXT_draw_elements_base_vertex" number="204">
 
     <function name="DrawElementsBaseVertexEXT" alias="DrawElementsBaseVertex"
index a31a9a1dc511e7b328acfb23d340b1cd6ee37f13..ddc25d812c704216055fbf8836fb55ebf4fc8938 100644 (file)
@@ -177,6 +177,7 @@ EXT(ATI_texture_float                       , ARB_texture_float
 EXT(ATI_texture_mirror_once                 , ATI_texture_mirror_once                , GLL, GLC,  x ,  x , 2006)
 
 EXT(EXT_abgr                                , dummy_true                             , GLL, GLC,  x ,  x , 1995)
+EXT(EXT_base_instance                       , ARB_base_instance                      ,  x ,  x ,  x ,  30, 2014)
 EXT(EXT_bgra                                , dummy_true                             , GLL,  x ,  x ,  x , 1995)
 EXT(EXT_blend_color                         , EXT_blend_color                        , GLL,  x ,  x ,  x , 1995)
 EXT(EXT_blend_equation_separate             , EXT_blend_equation_separate            , GLL, GLC,  x ,  x , 2003)
index c6599fd5cea8e31169f14808efb2411c843056d5..c85bc54fe35f237ffdbc81666ea1273ec57b9f39 100644 (file)
@@ -2476,6 +2476,11 @@ const struct function gles3_functions_possible[] = {
    { "glDisableiOES", 30, -1 },
    { "glIsEnablediOES", 30, -1 },
 
+   /* GL_EXT_base_instance */
+   { "glDrawArraysInstancedBaseInstanceEXT", 30, -1 },
+   { "glDrawElementsInstancedBaseInstanceEXT", 30, -1 },
+   { "glDrawElementsInstancedBaseVertexBaseInstanceEXT", 30, -1 },
+
    { NULL, 0, -1 }
 };
 
index f0245fd08cc19b03018dd9c8ee86e08f6e789196..40cf3fff1266e7994b39e2c5d3fa8959cb9a0f07 100644 (file)
@@ -1739,7 +1739,7 @@ vbo_initialize_exec_dispatch(const struct gl_context *ctx,
       }
    }
 
-   if (_mesa_is_desktop_gl(ctx)) {
+   if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
       SET_DrawArraysInstancedBaseInstance(exec, vbo_exec_DrawArraysInstancedBaseInstance);
       SET_DrawElementsInstancedBaseInstance(exec, vbo_exec_DrawElementsInstancedBaseInstance);
       SET_DrawElementsInstancedBaseVertexBaseInstance(exec, vbo_exec_DrawElementsInstancedBaseVertexBaseInstance);