mesa: add KHR_no_error support for unmap buffer functions
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 4 May 2017 03:31:27 +0000 (13:31 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Sun, 7 May 2017 05:29:33 +0000 (15:29 +1000)
Reviewed-by: Eric Anholt <eric@anholt.net>
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 b147e7252e0e2494a4260ef43585646ed3f06d07..fe5a7e92143d171d9dee77332e7b540096c9b05a 100644 (file)
       <param name="access" type="GLbitfield" />
    </function>
 
-   <function name="UnmapNamedBuffer">
+   <function name="UnmapNamedBuffer" no_error="true">
       <return type="GLboolean" />
       <param name="buffer" type="GLuint" />
    </function>
index 29e4ba43de6deb99bf6b5b0e0b82be85cdaa8e01..a304ac0e4d984a03d1e33e13f2264f753aa9bc1e 100644 (file)
         <glx ignore="true"/>
     </function>
 
-    <function name="UnmapBuffer" es2="3.0">
+    <function name="UnmapBuffer" es2="3.0" no_error="true">
         <param name="target" type="GLenum"/>
         <return type="GLboolean"/>
         <glx ignore="true"/>
index 0fdb623b4b1595d39bac76d286d462bc3de964aa..6fa32e90fda0dace89a596cffdfd418f3294ab26 100644 (file)
@@ -2066,6 +2066,16 @@ validate_and_unmap_buffer(struct gl_context *ctx,
    return unmap_buffer(ctx, bufObj);
 }
 
+GLboolean GLAPIENTRY
+_mesa_UnmapBuffer_no_error(GLenum target)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   struct gl_buffer_object **bufObjPtr = get_buffer_target(ctx, target);
+   struct gl_buffer_object *bufObj = *bufObjPtr;
+
+   return unmap_buffer(ctx, bufObj);
+}
+
 GLboolean GLAPIENTRY
 _mesa_UnmapBuffer(GLenum target)
 {
@@ -2079,6 +2089,15 @@ _mesa_UnmapBuffer(GLenum target)
    return validate_and_unmap_buffer(ctx, bufObj, "glUnmapBuffer");
 }
 
+GLboolean GLAPIENTRY
+_mesa_UnmapNamedBuffer_no_error(GLuint buffer)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+
+   return unmap_buffer(ctx, bufObj);
+}
+
 GLboolean GLAPIENTRY
 _mesa_UnmapNamedBuffer(GLuint buffer)
 {
index 30e3105ff665ff856bdfd6de44b6ea48c4d30c1d..d538d0f2ca57f439fbaa8757c9aa11ac3f089ebb 100644 (file)
@@ -252,9 +252,13 @@ _mesa_ClearNamedBufferSubData(GLuint buffer, GLenum internalformat,
                               GLenum format, GLenum type,
                               const GLvoid *data);
 
+GLboolean GLAPIENTRY
+_mesa_UnmapBuffer_no_error(GLenum target);
 GLboolean GLAPIENTRY
 _mesa_UnmapBuffer(GLenum target);
 
+GLboolean GLAPIENTRY
+_mesa_UnmapNamedBuffer_no_error(GLuint buffer);
 GLboolean GLAPIENTRY
 _mesa_UnmapNamedBuffer(GLuint buffer);