[Mesa-dev] [PATCH 026/101] mesa: add KHR_no_error support to gl{Create, Gen}VertexArrays()

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Jul 21 17:39:35 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/mapi/glapi/gen/ARB_direct_state_access.xml |  2 +-
 src/mapi/glapi/gen/ARB_vertex_array_object.xml |  2 +-
 src/mesa/main/arrayobj.c                       | 16 ++++++++++++++++
 src/mesa/main/arrayobj.h                       |  6 ++++++
 4 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml
index f1ae6e9790..8e91d80141 100644
--- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
+++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
@@ -579,7 +579,7 @@
 
    <!-- Vertex Array object functions -->
 
-   <function name="CreateVertexArrays">
+   <function name="CreateVertexArrays" no_error="true">
       <param name="n" type="GLsizei" />
       <param name="arrays" type="GLuint *" />
    </function>
diff --git a/src/mapi/glapi/gen/ARB_vertex_array_object.xml b/src/mapi/glapi/gen/ARB_vertex_array_object.xml
index 4f21137ab0..57eaa1d3ff 100644
--- a/src/mapi/glapi/gen/ARB_vertex_array_object.xml
+++ b/src/mapi/glapi/gen/ARB_vertex_array_object.xml
@@ -20,7 +20,7 @@
         <param name="arrays" type="const GLuint *" count="n"/>
     </function>
 
-    <function name="GenVertexArrays" es2="3.0">
+    <function name="GenVertexArrays" es2="3.0" no_error="true">
         <param name="n" type="GLsizei"/>
         <param name="arrays" type="GLuint *"/>
     </function>
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index 5b73652bd9..af6a17daec 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -551,6 +551,14 @@ gen_vertex_arrays_err(struct gl_context *ctx, GLsizei n, GLuint *arrays,
  * All arrays will be required to live in VBOs.
  */
 void GLAPIENTRY
+_mesa_GenVertexArrays_no_error(GLsizei n, GLuint *arrays)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   gen_vertex_arrays(ctx, n, arrays, false, "glGenVertexArrays");
+}
+
+
+void GLAPIENTRY
 _mesa_GenVertexArrays(GLsizei n, GLuint *arrays)
 {
    GET_CURRENT_CONTEXT(ctx);
@@ -563,6 +571,14 @@ _mesa_GenVertexArrays(GLsizei n, GLuint *arrays)
  * Generates ID's and creates the array objects.
  */
 void GLAPIENTRY
+_mesa_CreateVertexArrays_no_error(GLsizei n, GLuint *arrays)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   gen_vertex_arrays(ctx, n, arrays, true, "glCreateVertexArrays");
+}
+
+
+void GLAPIENTRY
 _mesa_CreateVertexArrays(GLsizei n, GLuint *arrays)
 {
    GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h
index 1794968577..69ffc9250d 100644
--- a/src/mesa/main/arrayobj.h
+++ b/src/mesa/main/arrayobj.h
@@ -98,8 +98,14 @@ void GLAPIENTRY _mesa_BindVertexArray( GLuint id );
 
 void GLAPIENTRY _mesa_DeleteVertexArrays(GLsizei n, const GLuint *ids);
 
+void GLAPIENTRY
+_mesa_GenVertexArrays_no_error(GLsizei n, GLuint *arrays);
+
 void GLAPIENTRY _mesa_GenVertexArrays(GLsizei n, GLuint *arrays);
 
+void GLAPIENTRY
+_mesa_CreateVertexArrays_no_error(GLsizei n, GLuint *arrays);
+
 void GLAPIENTRY _mesa_CreateVertexArrays(GLsizei n, GLuint *arrays);
 
 GLboolean GLAPIENTRY _mesa_IsVertexArray( GLuint id );
-- 
2.13.3



More information about the mesa-dev mailing list