From: Ian Romanick <[email protected]>

v2: Add proper core-profile and GLES3 filtering.

Signed-off-by: Ian Romanick <[email protected]>
---
 src/mesa/main/APIspec.xml |   16 ----------------
 src/mesa/main/varray.c    |    7 +++++--
 2 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml
index de73640..6b20baa 100644
--- a/src/mesa/main/APIspec.xml
+++ b/src/mesa/main/APIspec.xml
@@ -1622,22 +1622,6 @@
                <param name="pname" type="GLenum"/>
                <vector name="params" type="GLtype *" size="dynamic"/>
        </proto>
-
-       <desc name="pname">
-               <value name="GL_VERTEX_ATTRIB_ARRAY_ENABLED"/>
-               <value name="GL_VERTEX_ATTRIB_ARRAY_SIZE"/>
-               <value name="GL_VERTEX_ATTRIB_ARRAY_STRIDE"/>
-               <value name="GL_VERTEX_ATTRIB_ARRAY_TYPE"/>
-               <value name="GL_VERTEX_ATTRIB_ARRAY_NORMALIZED"/>
-               <value name="GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING"/>
-
-               <desc name="params" vector_size="1" convert="false"/>
-       </desc>
-
-       <desc name="pname">
-               <value name="GL_CURRENT_VERTEX_ATTRIB"/>
-               <desc name="params" vector_size="16?" convert="false"/>
-       </desc>
 </template>
 
 <template name="GetVertexAttribPointer" direction="get">
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 8c3ddc5..dc85a82 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -590,12 +590,15 @@ get_vertex_array_attrib(struct gl_context *ctx, GLuint 
index, GLenum pname,
    case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB:
       return array->BufferObj->Name;
    case GL_VERTEX_ATTRIB_ARRAY_INTEGER:
-      if (ctx->Version >= 30 || ctx->Extensions.EXT_gpu_shader4) {
+      if ((_mesa_is_desktop_gl(ctx)
+           && (ctx->Version >= 30 || ctx->Extensions.EXT_gpu_shader4))
+          || _mesa_is_gles3(ctx)) {
          return array->Integer;
       }
       goto error;
    case GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB:
-      if (ctx->Extensions.ARB_instanced_arrays) {
+      if ((_mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_instanced_arrays)
+          || _mesa_is_gles3(ctx)) {
          return array->InstanceDivisor;
       }
       goto error;
-- 
1.7.6.5

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to