mesa: add KHR_no_error support for glInvalidateBufferSubData()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 31 May 2017 12:15:37 +0000 (14:15 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 7 Jun 2017 09:03:52 +0000 (11:03 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mapi/glapi/gen/ARB_invalidate_subdata.xml
src/mesa/main/bufferobj.c
src/mesa/main/bufferobj.h

index 052816ad7e0dcd05aa5ced0706d6caab21961dc5..79e8a917f58132c2c18ddb54f4bf7d250d3a6a77 100644 (file)
@@ -19,7 +19,7 @@
     <param name="level" type="GLint"/>
   </function>
 
-  <function name="InvalidateBufferSubData">
+  <function name="InvalidateBufferSubData" no_error="true">
     <param name="buffer" type="GLuint"/>
     <param name="offset" type="GLintptr"/>
     <param name="length" type="GLsizeiptr"/>
index 4f3c640248677364fb61b26a17b2f17d62380881..f11d6118d6672d3566b02fa5214927ffe22b1969 100644 (file)
@@ -4246,6 +4246,16 @@ invalidate_buffer_subdata(struct gl_context *ctx,
       ctx->Driver.InvalidateBufferSubData(ctx, bufObj, offset, length);
 }
 
+void GLAPIENTRY
+_mesa_InvalidateBufferSubData_no_error(GLuint buffer, GLintptr offset,
+                                       GLsizeiptr length)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+   invalidate_buffer_subdata(ctx, bufObj, offset, length);
+}
+
 void GLAPIENTRY
 _mesa_InvalidateBufferSubData(GLuint buffer, GLintptr offset,
                               GLsizeiptr length)
index ff44fed0b85339c428da72af14ca5edf3e8a8103..2e49d33b8d3222bd711add45ac88618f326ef739 100644 (file)
@@ -338,6 +338,11 @@ _mesa_BindBuffersRange(GLenum target, GLuint first, GLsizei count,
 void GLAPIENTRY
 _mesa_BindBuffersBase(GLenum target, GLuint first, GLsizei count,
                       const GLuint *buffers);
+
+void GLAPIENTRY
+_mesa_InvalidateBufferSubData_no_error(GLuint buffer, GLintptr offset,
+                                       GLsizeiptr length);
+
 void GLAPIENTRY
 _mesa_InvalidateBufferSubData(GLuint buffer, GLintptr offset,
                               GLsizeiptr length);