diff options
author | Laura Ekstrand <[email protected]> | 2015-01-20 15:24:53 -0800 |
---|---|---|
committer | Laura Ekstrand <[email protected]> | 2015-03-17 10:18:34 -0700 |
commit | 23eab47bbe998b95d5da889b85b7b0ca6e14385b (patch) | |
tree | ecf9688288c061313b08afd0e9c2420983e9eeb9 /src/mesa/main/bufferobj.c | |
parent | 3706ace2446825b9544e45800c0ce1df261a1c30 (diff) |
main: Add entry point for GetNamedBufferSubData.
Reviewed-by: Fredrik Höglund <[email protected]>
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r-- | src/mesa/main/bufferobj.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 49d6d329e6b..7aac1c62f65 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -1700,6 +1700,28 @@ _mesa_GetBufferSubData(GLenum target, GLintptr offset, ctx->Driver.GetBufferSubData( ctx, offset, size, data, bufObj ); } +void GLAPIENTRY +_mesa_GetNamedBufferSubData(GLuint buffer, GLintptr offset, + GLsizeiptr size, GLvoid *data) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object *bufObj; + + bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, + "glGetNamedBufferSubData"); + if (!bufObj) + return; + + if (!buffer_object_subdata_range_good(ctx, bufObj, offset, size, false, + "glGetNamedBufferSubData")) { + return; + } + + assert(ctx->Driver.GetBufferSubData); + ctx->Driver.GetBufferSubData(ctx, offset, size, data, bufObj); +} + + /** * \param subdata true if caller is *SubData, false if *Data */ |