diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2016-01-09 17:53:07 -0500 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2016-01-12 12:19:38 -0500 |
commit | 2ea213f142020d7587b4fbe4c2cc6579b19359f0 (patch) | |
tree | 2ebdbc165256576e74b96b27c6ffb72a80f9a8e0 | |
parent | 130d8ee31823612fcd1f85088ef23555cf8a73ea (diff) |
mesa: add Driver.InvalidateBufferSubData
-rw-r--r-- | src/mesa/main/bufferobj.c | 12 | ||||
-rw-r--r-- | src/mesa/main/dd.h | 5 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 63d563e5e5..e8baf055da 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -3980,10 +3980,8 @@ _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 @@ -4020,8 +4018,6 @@ _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 e5281ce974..70ed5633f7 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -634,6 +634,11 @@ struct dd_function_table { GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size ); + void (*InvalidateBufferSubData)( struct gl_context *ctx, + struct gl_buffer_object *obj, + GLintptr offset, + GLsizeiptr length ); + /* Returns pointer to the start of the mapped range. * May return NULL if MESA_MAP_NOWAIT_BIT is set in access: */ |