mesa: add KHR_no_error support for gl*Buffers()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 26 Jun 2017 10:42:25 +0000 (12:42 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 28 Jun 2017 08:25:12 +0000 (10:25 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mapi/glapi/gen/ARB_direct_state_access.xml
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/bufferobj.c
src/mesa/main/bufferobj.h

index 860bbbd28ab19e0771bb99015c7041d36b00feab..87581d48b273b717a44701e3ae5b44703bbce57e 100644 (file)
@@ -49,7 +49,7 @@
 
    <!-- Buffer object functions -->
 
-   <function name="CreateBuffers">
+   <function name="CreateBuffers" no_error="true">
       <param name="n" type="GLsizei" />
       <param name="buffers" type="GLuint *" />
    </function>
index 4d6a08e1247afa4f0a815ce0080bb69d9b67c26e..84195cae7ce16d9c86b59d610f42de31ef8d3701 100644 (file)
         <glx ignore="true"/>
     </function>
 
-    <function name="GenBuffers" es1="1.1" es2="2.0">
+    <function name="GenBuffers" es1="1.1" es2="2.0" no_error="true">
         <param name="n" type="GLsizei" counter="true"/>
         <param name="buffer" type="GLuint *" output="true" count="n"/>
         <glx ignore="true"/>
index 410aa7e4b5ab0e352e5917fec61f5207d75781d9..419972e37127137eec4f09f72debf640ed744de2 100644 (file)
@@ -1478,6 +1478,14 @@ create_buffers_err(struct gl_context *ctx, GLsizei n, GLuint *buffers, bool dsa)
  * \param n        Number of IDs to generate.
  * \param buffers  Array of \c n locations to store the IDs.
  */
+void GLAPIENTRY
+_mesa_GenBuffers_no_error(GLsizei n, GLuint *buffers)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   create_buffers(ctx, n, buffers, false);
+}
+
+
 void GLAPIENTRY
 _mesa_GenBuffers(GLsizei n, GLuint *buffers)
 {
@@ -1491,6 +1499,14 @@ _mesa_GenBuffers(GLsizei n, GLuint *buffers)
  * \param n        Number of IDs to generate.
  * \param buffers  Array of \c n locations to store the IDs.
  */
+void GLAPIENTRY
+_mesa_CreateBuffers_no_error(GLsizei n, GLuint *buffers)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   create_buffers(ctx, n, buffers, true);
+}
+
+
 void GLAPIENTRY
 _mesa_CreateBuffers(GLsizei n, GLuint *buffers)
 {
index 44342840a81865af6dacdfc9375fea0de751d364..662ceba8a6ceec2f7894b97dba77c126d97ca282 100644 (file)
@@ -164,9 +164,15 @@ _mesa_BindBuffer(GLenum target, GLuint buffer);
 void GLAPIENTRY
 _mesa_DeleteBuffers(GLsizei n, const GLuint * buffer);
 
+void GLAPIENTRY
+_mesa_GenBuffers_no_error(GLsizei n, GLuint *buffers);
+
 void GLAPIENTRY
 _mesa_GenBuffers(GLsizei n, GLuint *buffers);
 
+void GLAPIENTRY
+_mesa_CreateBuffers_no_error(GLsizei n, GLuint *buffers);
+
 void GLAPIENTRY
 _mesa_CreateBuffers(GLsizei n, GLuint *buffers);