mesa: add KHR_no_error support for glInvalidateBufferData()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 31 May 2017 12:18:00 +0000 (14:18 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 7 Jun 2017 09:03:53 +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 79e8a917f58132c2c18ddb54f4bf7d250d3a6a77..2cbc4f63be7db1a2f1471af3c789cf626b119d4e 100644 (file)
@@ -25,7 +25,7 @@
     <param name="length" type="GLsizeiptr"/>
   </function>
 
-  <function name="InvalidateBufferData">
+  <function name="InvalidateBufferData" no_error="true">
     <param name="buffer" type="GLuint"/>
   </function>
 
index f11d6118d6672d3566b02fa5214927ffe22b1969..9304308eabf68707cdcb744ce17f4d0383077011 100644 (file)
@@ -4308,6 +4308,15 @@ _mesa_InvalidateBufferSubData(GLuint buffer, GLintptr offset,
    invalidate_buffer_subdata(ctx, bufObj, offset, length);
 }
 
+void GLAPIENTRY
+_mesa_InvalidateBufferData_no_error(GLuint buffer)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   struct gl_buffer_object *bufObj =_mesa_lookup_bufferobj(ctx, buffer);
+   invalidate_buffer_subdata(ctx, bufObj, 0, bufObj->Size);
+}
+
 void GLAPIENTRY
 _mesa_InvalidateBufferData(GLuint buffer)
 {
index 2e49d33b8d3222bd711add45ac88618f326ef739..a8e174dc6b1c0b7d7905a54bb51f179806eda446 100644 (file)
@@ -347,6 +347,9 @@ void GLAPIENTRY
 _mesa_InvalidateBufferSubData(GLuint buffer, GLintptr offset,
                               GLsizeiptr length);
 
+void GLAPIENTRY
+_mesa_InvalidateBufferData_no_error(GLuint buffer);
+
 void GLAPIENTRY
 _mesa_InvalidateBufferData(GLuint buffer);