[Mesa-dev] [PATCH v2 05/23] mesa: add KHR_no_error support for glInvalidateBufferSubData()

Samuel Pitoiset samuel.pitoiset at gmail.com
Mon Jun 5 21:43:53 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
---
 src/mapi/glapi/gen/ARB_invalidate_subdata.xml |  2 +-
 src/mesa/main/bufferobj.c                     | 10 ++++++++++
 src/mesa/main/bufferobj.h                     |  5 +++++
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/src/mapi/glapi/gen/ARB_invalidate_subdata.xml b/src/mapi/glapi/gen/ARB_invalidate_subdata.xml
index 052816ad7e..79e8a917f5 100644
--- a/src/mapi/glapi/gen/ARB_invalidate_subdata.xml
+++ b/src/mapi/glapi/gen/ARB_invalidate_subdata.xml
@@ -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"/>
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 4f3c640248..f11d6118d6 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -4247,6 +4247,16 @@ invalidate_buffer_subdata(struct gl_context *ctx,
 }
 
 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)
 {
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index ff44fed0b8..2e49d33b8d 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -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);
-- 
2.13.0



More information about the mesa-dev mailing list