[Mesa-dev] [PATCH v2 02/23] mesa: add KHR_no_error support for glVertexArrayVertexBuffers()

Samuel Pitoiset samuel.pitoiset at gmail.com
Mon Jun 5 21:43:50 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
---
 src/mapi/glapi/gen/ARB_direct_state_access.xml |  2 +-
 src/mesa/main/varray.c                         | 15 +++++++++++++++
 src/mesa/main/varray.h                         |  6 ++++++
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml
index f13a1444a9..cb24d7981c 100644
--- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
+++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
@@ -607,7 +607,7 @@
       <param name="stride" type="GLsizei" />
    </function>
 
-   <function name="VertexArrayVertexBuffers">
+   <function name="VertexArrayVertexBuffers" no_error="true">
       <param name="vaobj" type="GLuint" />
       <param name="first" type="GLuint" />
       <param name="count" type="GLsizei" />
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index c2c771c173..0cc8b56c64 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -2273,6 +2273,21 @@ _mesa_BindVertexBuffers(GLuint first, GLsizei count, const GLuint *buffers,
 
 
 void GLAPIENTRY
+_mesa_VertexArrayVertexBuffers_no_error(GLuint vaobj, GLuint first,
+                                        GLsizei count, const GLuint *buffers,
+                                        const GLintptr *offsets,
+                                        const GLsizei *strides)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   struct gl_vertex_array_object *vao = _mesa_lookup_vao(ctx, vaobj);
+   vertex_array_vertex_buffers(ctx, vao, first, count,
+                               buffers, offsets, strides, true,
+                               "glVertexArrayVertexBuffers");
+}
+
+
+void GLAPIENTRY
 _mesa_VertexArrayVertexBuffers(GLuint vaobj, GLuint first, GLsizei count,
                                const GLuint *buffers,
                                const GLintptr *offsets, const GLsizei *strides)
diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h
index 24e37a9bf7..90ca8483ca 100644
--- a/src/mesa/main/varray.h
+++ b/src/mesa/main/varray.h
@@ -379,6 +379,12 @@ extern void GLAPIENTRY
 _mesa_BindVertexBuffers(GLuint first, GLsizei count, const GLuint *buffers,
                         const GLintptr *offsets, const GLsizei *strides);
 
+void GLAPIENTRY
+_mesa_VertexArrayVertexBuffers_no_error(GLuint vaobj, GLuint first,
+                                        GLsizei count, const GLuint *buffers,
+                                        const GLintptr *offsets,
+                                        const GLsizei *strides);
+
 extern void GLAPIENTRY
 _mesa_VertexArrayVertexBuffers(GLuint vaobj, GLuint first, GLsizei count,
                                const GLuint *buffers,
-- 
2.13.0



More information about the mesa-dev mailing list