[Mesa-dev] [PATCH 18/20] gles/es3.1: Enable dispatch of almost all new GLES 3.1 functions

Ian Romanick idr at freedesktop.org
Wed Apr 29 16:26:09 PDT 2015


From: Ian Romanick <ian.d.romanick at intel.com>

A couple functions are missing because there are no implementations of
them yet.  These are:

      glFramebufferParameteri (from GL_ARB_framebuffer_no_attachments)
      glGetFramebufferParameteriv (from GL_ARB_framebuffer_no_attachments)
      glMemoryBarrierByRegion

v2: Rebase on updated dispatch_sanity.cpp test.

v3: Add support for glDraw{Arrays,Elements}Indirect in vbo_exec_array.c.
The updated dispatch_sanity.cpp test discovered this omission.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mapi/glapi/gen/ARB_compute_shader.xml          |  4 +-
 src/mapi/glapi/gen/ARB_draw_indirect.xml           |  4 +-
 src/mapi/glapi/gen/ARB_program_interface_query.xml | 10 +--
 src/mapi/glapi/gen/ARB_separate_shader_objects.xml | 86 ++++++++++----------
 src/mapi/glapi/gen/ARB_shader_image_load_store.xml |  4 +-
 src/mapi/glapi/gen/ARB_texture_multisample.xml     |  4 +-
 .../glapi/gen/ARB_texture_storage_multisample.xml  |  2 +-
 src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml   | 10 +--
 src/mapi/glapi/gen/GL3x.xml                        |  2 +-
 src/mapi/glapi/gen/gl_API.xml                      |  4 +-
 src/mesa/main/tests/dispatch_sanity.cpp            | 95 ++++++++++++++++++++++
 src/mesa/vbo/vbo_exec_array.c                      |  5 +-
 12 files changed, 164 insertions(+), 66 deletions(-)

diff --git a/src/mapi/glapi/gen/ARB_compute_shader.xml b/src/mapi/glapi/gen/ARB_compute_shader.xml
index 1db373e..0ccbcc0 100644
--- a/src/mapi/glapi/gen/ARB_compute_shader.xml
+++ b/src/mapi/glapi/gen/ARB_compute_shader.xml
@@ -26,13 +26,13 @@
   <enum name="DISPATCH_INDIRECT_BUFFER_BINDING"                value="0x90EF"/>
   <enum name="COMPUTE_SHADER_BIT"                              value="0x00000020"/>
 
-  <function name="DispatchCompute" offset="assign">
+  <function name="DispatchCompute" offset="assign" es2="3.1">
     <param name="num_groups_x" type="GLuint"/>
     <param name="num_groups_y" type="GLuint"/>
     <param name="num_groups_z" type="GLuint"/>
   </function>
 
-  <function name="DispatchComputeIndirect" offset="assign">
+  <function name="DispatchComputeIndirect" offset="assign" es2="3.1">
     <param name="indirect" type="GLintptr"/>
   </function>
 </category>
diff --git a/src/mapi/glapi/gen/ARB_draw_indirect.xml b/src/mapi/glapi/gen/ARB_draw_indirect.xml
index 7de03cd..e02568c 100644
--- a/src/mapi/glapi/gen/ARB_draw_indirect.xml
+++ b/src/mapi/glapi/gen/ARB_draw_indirect.xml
@@ -8,12 +8,12 @@
     <enum name="DRAW_INDIRECT_BUFFER"                   value="0x8F3F"/>
     <enum name="DRAW_INDIRECT_BUFFER_BINDING"           value="0x8F43"/>
 
-    <function name="DrawArraysIndirect" offset="assign" exec="dynamic">
+    <function name="DrawArraysIndirect" offset="assign" exec="dynamic" es2="3.1">
         <param name="mode" type="GLenum"/>
         <param name="indirect" type="const GLvoid *"/>
     </function>
 
-    <function name="DrawElementsIndirect" offset="assign" exec="dynamic">
+    <function name="DrawElementsIndirect" offset="assign" exec="dynamic" es2="3.1">
         <param name="mode" type="GLenum"/>
         <param name="type" type="GLenum"/>
         <param name="indirect" type="const GLvoid *"/>
diff --git a/src/mapi/glapi/gen/ARB_program_interface_query.xml b/src/mapi/glapi/gen/ARB_program_interface_query.xml
index 59eb59c..5c26498 100644
--- a/src/mapi/glapi/gen/ARB_program_interface_query.xml
+++ b/src/mapi/glapi/gen/ARB_program_interface_query.xml
@@ -56,21 +56,21 @@
     <enum name="NUM_COMPATIBLE_SUBROUTINES"                      value="0x8E4A"/>
     <enum name="COMPATIBLE_SUBROUTINES"                          value="0x8E4B"/>
 
-    <function name="GetProgramInterfaceiv" offset="assign">
+    <function name="GetProgramInterfaceiv" offset="assign" es2="3.1">
         <param name="program" type="GLuint"/>
         <param name="programInterface" type="GLenum"/>
         <param name="pname" type="GLenum"/>
         <param name="params" type="GLint *" output="true"/>
     </function>
 
-    <function name="GetProgramResourceIndex" offset="assign">
+    <function name="GetProgramResourceIndex" offset="assign" es2="3.1">
         <param name="program" type="GLuint"/>
         <param name="programInterface" type="GLenum"/>
         <param name="name" type="const GLchar *"/>
         <return type="GLuint"/>
     </function>
 
-    <function name="GetProgramResourceName" offset="assign">
+    <function name="GetProgramResourceName" offset="assign" es2="3.1">
         <param name="program" type="GLuint"/>
         <param name="programInterface" type="GLenum"/>
         <param name="index" type="GLuint"/>
@@ -79,7 +79,7 @@
         <param name="name" type="GLchar *" output="true"/>
     </function>
 
-    <function name="GetProgramResourceiv" offset="assign">
+    <function name="GetProgramResourceiv" offset="assign" es2="3.1">
         <param name="program" type="GLuint"/>
         <param name="programInterface" type="GLenum"/>
         <param name="index" type="GLuint"/>
@@ -90,7 +90,7 @@
         <param name="params" type="GLint *" output="true"/>
     </function>
 
-    <function name="GetProgramResourceLocation" offset="assign">
+    <function name="GetProgramResourceLocation" offset="assign" es2="3.1">
         <param name="program" type="GLuint"/>
         <param name="programInterface" type="GLenum"/>
         <param name="name" type="const GLchar *"/>
diff --git a/src/mapi/glapi/gen/ARB_separate_shader_objects.xml b/src/mapi/glapi/gen/ARB_separate_shader_objects.xml
index 96ae2b9..d05b96c 100644
--- a/src/mapi/glapi/gen/ARB_separate_shader_objects.xml
+++ b/src/mapi/glapi/gen/ARB_separate_shader_objects.xml
@@ -15,33 +15,33 @@
       <enum   name="ALL_SHADER_BITS"                              value="0xFFFFFFFF"/>
       <enum   name="PROGRAM_SEPARABLE"                            value="0x8258"/>
 
-      <function name="UseProgramStages" offset="assign" static_dispatch="false">
+      <function name="UseProgramStages" offset="assign" static_dispatch="false" es2="3.1">
          <param name="pipeline" type="GLuint" />
          <param name="stages" type="GLbitfield" />
          <param name="program" type="GLuint" />
       </function>
-      <function name="ActiveShaderProgram" offset="assign" static_dispatch="false">
+      <function name="ActiveShaderProgram" offset="assign" static_dispatch="false" es2="3.1">
          <param name="pipeline" type="GLuint" />
          <param name="program" type="GLuint" />
       </function>
-      <function name="CreateShaderProgramv" offset="assign" static_dispatch="false">
+      <function name="CreateShaderProgramv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="type" type="GLenum" />
          <param name="count" type="GLsizei" />
          <param name="strings" type="const GLchar * const *" />
          <return type="GLuint"/>
       </function>
-      <function name="BindProgramPipeline" offset="assign" static_dispatch="false">
+      <function name="BindProgramPipeline" offset="assign" static_dispatch="false" es2="3.1">
          <param name="pipeline" type="GLuint" />
       </function>
-      <function name="DeleteProgramPipelines" offset="assign" static_dispatch="false">
+      <function name="DeleteProgramPipelines" offset="assign" static_dispatch="false" es2="3.1">
          <param name="n" type="GLsizei" />
          <param name="pipelines" type="const GLuint *" />
       </function>
-      <function name="GenProgramPipelines" offset="assign" static_dispatch="false">
+      <function name="GenProgramPipelines" offset="assign" static_dispatch="false" es2="3.1">
          <param name="n" type="GLsizei" />
          <param name="pipelines" type="GLuint *" />
       </function>
-      <function name="IsProgramPipeline" offset="assign" static_dispatch="false">
+      <function name="IsProgramPipeline" offset="assign" static_dispatch="false" es2="3.1">
          <param name="pipeline" type="GLuint" />
          <return type="GLboolean"/>
       </function>
@@ -54,30 +54,30 @@
          <param name="value" type="GLint"/>
       </function>
       -->
-      <function name="GetProgramPipelineiv" offset="assign" static_dispatch="false">
+      <function name="GetProgramPipelineiv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="pipeline" type="GLuint" />
          <param name="pname" type="GLenum" />
          <param name="params" type="GLint *" />
       </function>
-      <function name="ProgramUniform1i" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform1i" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="x" type="GLint" />
       </function>
-      <function name="ProgramUniform2i" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform2i" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="x" type="GLint" />
          <param name="y" type="GLint" />
       </function>
-      <function name="ProgramUniform3i" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform3i" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="x" type="GLint" />
          <param name="y" type="GLint" />
          <param name="z" type="GLint" />
       </function>
-      <function name="ProgramUniform4i" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform4i" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="x" type="GLint" />
@@ -85,25 +85,25 @@
          <param name="z" type="GLint" />
          <param name="w" type="GLint" />
       </function>
-      <function name="ProgramUniform1ui" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform1ui" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="x" type="GLuint" />
       </function>
-      <function name="ProgramUniform2ui" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform2ui" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="x" type="GLuint" />
          <param name="y" type="GLuint" />
       </function>
-      <function name="ProgramUniform3ui" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform3ui" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="x" type="GLuint" />
          <param name="y" type="GLuint" />
          <param name="z" type="GLuint" />
       </function>
-      <function name="ProgramUniform4ui" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform4ui" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="x" type="GLuint" />
@@ -111,25 +111,25 @@
          <param name="z" type="GLuint" />
          <param name="w" type="GLuint" />
       </function>
-      <function name="ProgramUniform1f" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform1f" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="x" type="GLfloat" />
       </function>
-      <function name="ProgramUniform2f" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform2f" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="x" type="GLfloat" />
          <param name="y" type="GLfloat" />
       </function>
-      <function name="ProgramUniform3f" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform3f" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="x" type="GLfloat" />
          <param name="y" type="GLfloat" />
          <param name="z" type="GLfloat" />
       </function>
-      <function name="ProgramUniform4f" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform4f" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="x" type="GLfloat" />
@@ -137,145 +137,145 @@
          <param name="z" type="GLfloat" />
          <param name="w" type="GLfloat" />
       </function>
-      <function name="ProgramUniform1iv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform1iv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="value" type="const GLint *" />
       </function>
-      <function name="ProgramUniform2iv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform2iv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="value" type="const GLint *" />
       </function>
-      <function name="ProgramUniform3iv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform3iv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="value" type="const GLint *" />
       </function>
-      <function name="ProgramUniform4iv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform4iv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="value" type="const GLint *" />
       </function>
-      <function name="ProgramUniform1uiv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform1uiv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="value" type="const GLuint *" />
       </function>
-      <function name="ProgramUniform2uiv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform2uiv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="value" type="const GLuint *" />
       </function>
-      <function name="ProgramUniform3uiv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform3uiv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="value" type="const GLuint *" />
       </function>
-      <function name="ProgramUniform4uiv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform4uiv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="value" type="const GLuint *" />
       </function>
-      <function name="ProgramUniform1fv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform1fv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="value" type="const GLfloat *" />
       </function>
-      <function name="ProgramUniform2fv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform2fv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="value" type="const GLfloat *" />
       </function>
-      <function name="ProgramUniform3fv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform3fv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="value" type="const GLfloat *" />
       </function>
-      <function name="ProgramUniform4fv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniform4fv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="value" type="const GLfloat *" />
       </function>
-      <function name="ProgramUniformMatrix2fv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniformMatrix2fv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="transpose" type="GLboolean" />
          <param name="value" type="const GLfloat *" />
       </function>
-      <function name="ProgramUniformMatrix3fv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniformMatrix3fv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="transpose" type="GLboolean" />
          <param name="value" type="const GLfloat *" />
       </function>
-      <function name="ProgramUniformMatrix4fv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniformMatrix4fv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="transpose" type="GLboolean" />
          <param name="value" type="const GLfloat *" />
       </function>
-      <function name="ProgramUniformMatrix2x3fv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniformMatrix2x3fv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="transpose" type="GLboolean" />
          <param name="value" type="const GLfloat *" />
       </function>
-      <function name="ProgramUniformMatrix3x2fv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniformMatrix3x2fv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="transpose" type="GLboolean" />
          <param name="value" type="const GLfloat *" />
       </function>
-      <function name="ProgramUniformMatrix2x4fv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniformMatrix2x4fv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="transpose" type="GLboolean" />
          <param name="value" type="const GLfloat *" />
       </function>
-      <function name="ProgramUniformMatrix4x2fv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniformMatrix4x2fv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="transpose" type="GLboolean" />
          <param name="value" type="const GLfloat *" />
       </function>
-      <function name="ProgramUniformMatrix3x4fv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniformMatrix3x4fv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="transpose" type="GLboolean" />
          <param name="value" type="const GLfloat *" />
       </function>
-      <function name="ProgramUniformMatrix4x3fv" offset="assign" static_dispatch="false">
+      <function name="ProgramUniformMatrix4x3fv" offset="assign" static_dispatch="false" es2="3.1">
          <param name="program" type="GLuint" />
          <param name="location" type="GLint" />
          <param name="count" type="GLsizei" />
          <param name="transpose" type="GLboolean" />
          <param name="value" type="const GLfloat *" />
       </function>
-      <function name="ValidateProgramPipeline" offset="assign" static_dispatch="false">
+      <function name="ValidateProgramPipeline" offset="assign" static_dispatch="false" es2="3.1">
          <param name="pipeline" type="GLuint" />
       </function>
-      <function name="GetProgramPipelineInfoLog" offset="assign" static_dispatch="false">
+      <function name="GetProgramPipelineInfoLog" offset="assign" static_dispatch="false" es2="3.1">
          <param name="pipeline" type="GLuint" />
          <param name="bufSize" type="GLsizei" />
          <param name="length" type="GLsizei *" />
diff --git a/src/mapi/glapi/gen/ARB_shader_image_load_store.xml b/src/mapi/glapi/gen/ARB_shader_image_load_store.xml
index 7ccfca4..90431e8 100644
--- a/src/mapi/glapi/gen/ARB_shader_image_load_store.xml
+++ b/src/mapi/glapi/gen/ARB_shader_image_load_store.xml
@@ -70,7 +70,7 @@
 <enum name="MAX_FRAGMENT_IMAGE_UNIFORMS" value="0x90CE"/>
 <enum name="MAX_COMBINED_IMAGE_UNIFORMS" value="0x90CF"/>
 
-<function name="BindImageTexture" offset="assign">
+<function name="BindImageTexture" offset="assign" es2="3.1">
   <param name="unit" type="GLuint"/>
   <param name="texture" type="GLuint"/>
   <param name="level" type="GLint"/>
@@ -80,7 +80,7 @@
   <param name="format" type="GLenum"/>
 </function>
 
-<function name="MemoryBarrier" offset="assign">
+<function name="MemoryBarrier" offset="assign" es2="3.1">
   <param name="barriers" type="GLbitfield"/>
 </function>
 
diff --git a/src/mapi/glapi/gen/ARB_texture_multisample.xml b/src/mapi/glapi/gen/ARB_texture_multisample.xml
index 1f65a8b..f7701d9 100644
--- a/src/mapi/glapi/gen/ARB_texture_multisample.xml
+++ b/src/mapi/glapi/gen/ARB_texture_multisample.xml
@@ -53,13 +53,13 @@
       <param name="fixedsamplelocations" type="GLboolean"/>
    </function>
 
-   <function name="GetMultisamplefv" offset="assign">
+   <function name="GetMultisamplefv" offset="assign" es2="3.1">
       <param name="pname" type="GLenum"/>
       <param name="index" type="GLuint"/>
       <param name="val" type="GLfloat *"/>
    </function>
 
-   <function name="SampleMaski" offset="assign">
+   <function name="SampleMaski" offset="assign" es2="3.1">
       <param name="index" type="GLuint"/>
       <param name="mask" type="GLbitfield"/>
    </function>
diff --git a/src/mapi/glapi/gen/ARB_texture_storage_multisample.xml b/src/mapi/glapi/gen/ARB_texture_storage_multisample.xml
index 0f9d323..e9cf7c1 100644
--- a/src/mapi/glapi/gen/ARB_texture_storage_multisample.xml
+++ b/src/mapi/glapi/gen/ARB_texture_storage_multisample.xml
@@ -7,7 +7,7 @@
 
 <category name="GL_ARB_texture_storage_multisample" number="141">
 
-   <function name="TexStorage2DMultisample" offset="assign">
+   <function name="TexStorage2DMultisample" offset="assign" es2="3.1">
       <param name="target" type="GLenum"/>
       <param name="samples" type="GLsizei"/>
       <param name="internalformat" type="GLenum"/>
diff --git a/src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml b/src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml
index 7e62688..0922f24 100644
--- a/src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml
+++ b/src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml
@@ -7,14 +7,14 @@
 
 <category name="GL_ARB_vertex_attrib_binding" number="125">
 
-    <function name="BindVertexBuffer" offset="assign">
+    <function name="BindVertexBuffer" offset="assign" es2="3.1">
         <param name="bindingindex" type="GLuint"/>
         <param name="buffer" type="GLuint"/>
         <param name="offset" type="GLintptr"/>
         <param name="stride" type="GLsizei"/>
     </function>
 
-    <function name="VertexAttribFormat" offset="assign">
+    <function name="VertexAttribFormat" offset="assign" es2="3.1">
         <param name="attribindex" type="GLuint"/>
         <param name="size" type="GLint"/>
         <param name="type" type="GLenum"/>
@@ -22,7 +22,7 @@
         <param name="relativeoffset" type="GLuint"/>
     </function>
 
-    <function name="VertexAttribIFormat" offset="assign">
+    <function name="VertexAttribIFormat" offset="assign" es2="3.1">
         <param name="attribindex" type="GLuint"/>
         <param name="size" type="GLint"/>
         <param name="type" type="GLenum"/>
@@ -36,12 +36,12 @@
         <param name="relativeoffset" type="GLuint"/>
     </function>
 
-    <function name="VertexAttribBinding" offset="assign">
+    <function name="VertexAttribBinding" offset="assign" es2="3.1">
         <param name="attribindex" type="GLuint"/>
         <param name="bindingindex" type="GLuint"/>
     </function>
 
-    <function name="VertexBindingDivisor" offset="assign">
+    <function name="VertexBindingDivisor" offset="assign" es2="3.1">
         <param name="attribindex" type="GLuint"/>
         <param name="divisor" type="GLuint"/>
     </function>
diff --git a/src/mapi/glapi/gen/GL3x.xml b/src/mapi/glapi/gen/GL3x.xml
index 5078f7b..5cc8e87 100644
--- a/src/mapi/glapi/gen/GL3x.xml
+++ b/src/mapi/glapi/gen/GL3x.xml
@@ -166,7 +166,7 @@
     <param name="a" type="GLboolean"/>
   </function>
 
-  <function name="GetBooleani_v" offset="assign">
+  <function name="GetBooleani_v" offset="assign" es2="3.1">
     <param name="value" type="GLenum"/>
     <param name="index" type="GLuint"/>
     <param name="data" type="GLboolean *"/>
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index a8a6db6..ba8e195 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -2889,7 +2889,7 @@
         <glx sop="137"/>
     </function>
 
-    <function name="GetTexLevelParameterfv" offset="284">
+    <function name="GetTexLevelParameterfv" offset="284" es2="3.1">
         <param name="target" type="GLenum"/>
         <param name="level" type="GLint"/>
         <param name="pname" type="GLenum"/>
@@ -2897,7 +2897,7 @@
         <glx sop="138"/>
     </function>
 
-    <function name="GetTexLevelParameteriv" offset="285">
+    <function name="GetTexLevelParameteriv" offset="285" es2="3.1">
         <param name="target" type="GLenum"/>
         <param name="level" type="GLint"/>
         <param name="pname" type="GLenum"/>
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index 2a5afcd..23fba99 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -72,6 +72,7 @@ extern const struct function gl_core_functions_possible[];
 extern const struct function gles11_functions_possible[];
 extern const struct function gles2_functions_possible[];
 extern const struct function gles3_functions_possible[];
+extern const struct function gles31_functions_possible[];
 
 class DispatchSanity_test : public ::testing::Test {
 public:
@@ -201,6 +202,15 @@ TEST_F(DispatchSanity_test, GLES3)
    validate_nops(&ctx, nop_table);
 }
 
+TEST_F(DispatchSanity_test, GLES31)
+{
+   SetUpCtx(API_OPENGLES2, 31);
+   validate_functions(&ctx, gles2_functions_possible, nop_table);
+   validate_functions(&ctx, gles3_functions_possible, nop_table);
+   validate_functions(&ctx, gles31_functions_possible, nop_table);
+   validate_nops(&ctx, nop_table);
+}
+
 const struct function gl_core_functions_possible[] = {
    { "glCullFace", 10, -1 },
    { "glFrontFace", 10, -1 },
@@ -1582,3 +1592,88 @@ const struct function gles3_functions_possible[] = {
 
    { NULL, 0, -1 }
 };
+
+const struct function gles31_functions_possible[] = {
+   { "glDispatchCompute", 31, -1 },
+   { "glDispatchComputeIndirect", 31, -1 },
+   { "glDrawArraysIndirect", 31, -1 },
+   { "glDrawElementsIndirect", 31, -1 },
+
+   // FINISHME: These two functions have not been implemented yet.  They come
+   // FINISHME: from the ARB_framebuffer_no_attachments extension.
+   // { "glFramebufferParameteri", 31, -1 },
+   // { "glGetFramebufferParameteriv", 31, -1 },
+
+   { "glGetProgramInterfaceiv", 31, -1 },
+   { "glGetProgramResourceIndex", 31, -1 },
+   { "glGetProgramResourceName", 31, -1 },
+   { "glGetProgramResourceiv", 31, -1 },
+   { "glGetProgramResourceLocation", 31, -1 },
+
+   // We check for the aliased EXT versions in GLES 2
+   // { "glUseProgramStages", 31, -1 },
+   // { "glActiveShaderProgram", 31, -1 },
+   // { "glCreateShaderProgramv", 31, -1 },
+   // { "glBindProgramPipeline", 31, -1 },
+   // { "glDeleteProgramPipelines", 31, -1 },
+   // { "glGenProgramPipelines", 31, -1 },
+   // { "glIsProgramPipeline", 31, -1 },
+   // { "glGetProgramPipelineiv", 31, -1 },
+   // { "glProgramUniform1i", 31, -1 },
+   // { "glProgramUniform2i", 31, -1 },
+   // { "glProgramUniform3i", 31, -1 },
+   // { "glProgramUniform4i", 31, -1 },
+   // { "glProgramUniform1f", 31, -1 },
+   // { "glProgramUniform2f", 31, -1 },
+   // { "glProgramUniform3f", 31, -1 },
+   // { "glProgramUniform4f", 31, -1 },
+   // { "glProgramUniform1iv", 31, -1 },
+   // { "glProgramUniform2iv", 31, -1 },
+   // { "glProgramUniform3iv", 31, -1 },
+   // { "glProgramUniform4iv", 31, -1 },
+   // { "glProgramUniform1fv", 31, -1 },
+   // { "glProgramUniform2fv", 31, -1 },
+   // { "glProgramUniform3fv", 31, -1 },
+   // { "glProgramUniform4fv", 31, -1 },
+   // { "glProgramUniformMatrix2fv", 31, -1 },
+   // { "glProgramUniformMatrix3fv", 31, -1 },
+   // { "glProgramUniformMatrix4fv", 31, -1 },
+   // { "glProgramUniformMatrix2x3fv", 31, -1 },
+   // { "glProgramUniformMatrix3x2fv", 31, -1 },
+   // { "glProgramUniformMatrix2x4fv", 31, -1 },
+   // { "glProgramUniformMatrix4x2fv", 31, -1 },
+   // { "glProgramUniformMatrix3x4fv", 31, -1 },
+   // { "glProgramUniformMatrix4x3fv", 31, -1 },
+   // { "glValidateProgramPipeline", 31, -1 },
+   // { "glGetProgramPipelineInfoLog", 31, -1 },
+
+   // We check for the aliased EXT versions in GLES 3
+   // { "glProgramUniform1ui", 31, -1 },
+   // { "glProgramUniform2ui", 31, -1 },
+   // { "glProgramUniform3ui", 31, -1 },
+   // { "glProgramUniform4ui", 31, -1 },
+   // { "glProgramUniform1uiv", 31, -1 },
+   // { "glProgramUniform2uiv", 31, -1 },
+   // { "glProgramUniform3uiv", 31, -1 },
+   // { "glProgramUniform4uiv", 31, -1 },
+
+   { "glBindImageTexture", 31, -1 },
+   { "glGetBooleani_v", 31, -1 },
+   { "glMemoryBarrier", 31, -1 },
+
+   // FINISHME: This function has not been implemented yet.
+   // { "glMemoryBarrierByRegion", 31, -1 },
+
+   { "glTexStorage2DMultisample", 31, -1 },
+   { "glGetMultisamplefv", 31, -1 },
+   { "glSampleMaski", 31, -1 },
+   { "glGetTexLevelParameteriv", 31, -1 },
+   { "glGetTexLevelParameterfv", 31, -1 },
+   { "glBindVertexBuffer", 31, -1 },
+   { "glVertexAttribFormat", 31, -1 },
+   { "glVertexAttribIFormat", 31, -1 },
+   { "glVertexAttribBinding", 31, -1 },
+   { "glVertexBindingDivisor", 31, -1 },
+
+   { NULL, 0, -1 },
+ };
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 3ea775c..72b8206 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -1817,9 +1817,12 @@ vbo_initialize_exec_dispatch(const struct gl_context *ctx,
       SET_DrawElementsInstancedBaseVertexBaseInstance(exec, vbo_exec_DrawElementsInstancedBaseVertexBaseInstance);
    }
 
-   if (ctx->API == API_OPENGL_CORE) {
+   if (ctx->API == API_OPENGL_CORE || _mesa_is_gles31(ctx)) {
       SET_DrawArraysIndirect(exec, vbo_exec_DrawArraysIndirect);
       SET_DrawElementsIndirect(exec, vbo_exec_DrawElementsIndirect);
+   }
+
+   if (ctx->API == API_OPENGL_CORE) {
       SET_MultiDrawArraysIndirect(exec, vbo_exec_MultiDrawArraysIndirect);
       SET_MultiDrawElementsIndirect(exec, vbo_exec_MultiDrawElementsIndirect);
    }
-- 
2.1.0



More information about the mesa-dev mailing list