diff options
author | Ilia Mirkin <[email protected]> | 2014-03-25 17:02:48 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2014-03-31 21:21:11 -0400 |
commit | f5ba1a1f7f6c50c2c1f3544555f419a0e7216a94 (patch) | |
tree | b7b89de7a7b319231939be63d266421315af12fa /src/mesa/main | |
parent | 24b86cb3047507078ae8d0e2e8943586ee85ede5 (diff) |
mesa/st: Accelerate ARB_clear_buffer_object with clear_buffer
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/bufferobj.c | 6 | ||||
-rw-r--r-- | src/mesa/main/bufferobj.h | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 2e9e05918bd..36acd64ce70 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -665,7 +665,7 @@ _mesa_buffer_get_subdata( struct gl_context *ctx, GLintptrARB offset, * \sa glClearBufferSubData, glClearBufferData and * dd_function_table::ClearBufferSubData. */ -static void +void _mesa_buffer_clear_subdata(struct gl_context *ctx, GLintptr offset, GLsizeiptr size, const GLvoid *clearValue, @@ -1458,7 +1458,7 @@ _mesa_ClearBufferData(GLenum target, GLenum internalformat, GLenum format, if (data == NULL) { /* clear to zeros, per the spec */ ctx->Driver.ClearBufferSubData(ctx, 0, bufObj->Size, - NULL, 0, bufObj); + NULL, clearValueSize, bufObj); return; } @@ -1510,7 +1510,7 @@ _mesa_ClearBufferSubData(GLenum target, GLenum internalformat, /* clear to zeros, per the spec */ if (size > 0) { ctx->Driver.ClearBufferSubData(ctx, offset, size, - NULL, 0, bufObj); + NULL, clearValueSize, bufObj); } return; } diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h index 9814552eb96..c08c4fdf2af 100644 --- a/src/mesa/main/bufferobj.h +++ b/src/mesa/main/bufferobj.h @@ -115,6 +115,13 @@ extern void _mesa_buffer_unmap_all_mappings(struct gl_context *ctx, struct gl_buffer_object *bufObj); +extern void +_mesa_buffer_clear_subdata(struct gl_context *ctx, + GLintptr offset, GLsizeiptr size, + const GLvoid *clearValue, + GLsizeiptr clearValueSize, + struct gl_buffer_object *bufObj); + /* * API functions */ |