[Mesa-dev] [PATCH 06/21] mesa: add KHR_no_error support for glInvalidateBufferData()
Samuel Pitoiset
samuel.pitoiset at gmail.com
Thu Jun 1 13:04:55 UTC 2017
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/mapi/glapi/gen/ARB_invalidate_subdata.xml | 2 +-
src/mesa/main/bufferobj.c | 9 +++++++++
src/mesa/main/bufferobj.h | 3 +++
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/mapi/glapi/gen/ARB_invalidate_subdata.xml b/src/mapi/glapi/gen/ARB_invalidate_subdata.xml
index 79e8a917f5..2cbc4f63be 100644
--- a/src/mapi/glapi/gen/ARB_invalidate_subdata.xml
+++ b/src/mapi/glapi/gen/ARB_invalidate_subdata.xml
@@ -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>
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 171750e0c3..9323e8d9a9 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -4309,6 +4309,15 @@ _mesa_InvalidateBufferSubData(GLuint buffer, GLintptr offset,
}
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)
{
GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index 2e49d33b8d..a8e174dc6b 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -348,6 +348,9 @@ _mesa_InvalidateBufferSubData(GLuint buffer, GLintptr offset,
GLsizeiptr length);
void GLAPIENTRY
+_mesa_InvalidateBufferData_no_error(GLuint buffer);
+
+void GLAPIENTRY
_mesa_InvalidateBufferData(GLuint buffer);
void GLAPIENTRY
--
2.13.0
More information about the mesa-dev
mailing list