From: Marek Olšák <marek.ol...@amd.com> --- src/mesa/main/bufferobj.c | 14 ++++++-------- src/mesa/main/dd.h | 8 +++++++- 2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 2e9e059..e7b6382 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -2813,10 +2813,9 @@ _mesa_InvalidateBufferSubData(GLuint buffer, GLintptr offset, return; } - /* We don't actually do anything for this yet. Just return after - * validating the parameters and generating the required errors. - */ - return; + if (ctx->Driver.InvalidateBufferSubData) { + ctx->Driver.InvalidateBufferSubData(ctx, bufObj, offset, length); + } } void GLAPIENTRY @@ -2847,8 +2846,7 @@ _mesa_InvalidateBufferData(GLuint buffer) return; } - /* We don't actually do anything for this yet. Just return after - * validating the parameters and generating the required errors. - */ - return; + if (ctx->Driver.InvalidateBufferSubData) { + ctx->Driver.InvalidateBufferSubData(ctx, bufObj, 0, bufObj->Size); + } } diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 9715241..a2d2696 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -957,7 +957,13 @@ struct dd_function_table { GLenum access, GLenum format); void (*MemoryBarrier)(struct gl_context *ctx, GLbitfield barriers); - /** @} */ + + /** @} + * \name GL_ARB_invalidate_subdata interface. + */ + void (*InvalidateBufferSubData)(struct gl_context *ctx, + struct gl_buffer_object *bufObj, + unsigned offset, unsigned length); }; -- 1.8.3.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev