From: Samuel Pitoiset Date: Wed, 31 May 2017 12:18:00 +0000 (+0200) Subject: mesa: add KHR_no_error support for glInvalidateBufferData() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b019c4e6e833d41c24043144ac24986dd3e9a4eb;p=mesa.git mesa: add KHR_no_error support for glInvalidateBufferData() Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- diff --git a/src/mapi/glapi/gen/ARB_invalidate_subdata.xml b/src/mapi/glapi/gen/ARB_invalidate_subdata.xml index 79e8a917f58..2cbc4f63be7 100644 --- a/src/mapi/glapi/gen/ARB_invalidate_subdata.xml +++ b/src/mapi/glapi/gen/ARB_invalidate_subdata.xml @@ -25,7 +25,7 @@ - + diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index f11d6118d66..9304308eabf 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -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) { diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h index 2e49d33b8d3..a8e174dc6b1 100644 --- a/src/mesa/main/bufferobj.h +++ b/src/mesa/main/bufferobj.h @@ -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);