diff options
author | Laura Ekstrand <[email protected]> | 2015-02-11 11:06:42 -0800 |
---|---|---|
committer | Laura Ekstrand <[email protected]> | 2015-03-17 10:18:33 -0700 |
commit | 9cb732b8e9fad4a603f38ce896cd84300e2743a3 (patch) | |
tree | e396eb53f9d4f32ad73c8dae90bf866fc71dde16 /src/mesa/main/bufferobj.c | |
parent | 566ccdf11b37363255bf5d20d7ab6639ddaf1b30 (diff) |
main: Improve errors and style in BufferSubData.
- More explicit error reporting.
- Removed legacy style.
Reviewed-by: Martin Peres <[email protected]>
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r-- | src/mesa/main/bufferobj.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 5153679ea6c..f6bc333c828 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -272,13 +272,17 @@ buffer_object_subdata_range_good(struct gl_context *ctx, if (mappedRange) { if (bufferobj_range_mapped(bufObj, offset, size)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "%s", caller); + _mesa_error(ctx, GL_INVALID_OPERATION, + "%s(range is mapped without persistent bit)", + caller); return false; } } else { if (_mesa_bufferobj_mapped(bufObj, MAP_USER)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "%s", caller); + _mesa_error(ctx, GL_INVALID_OPERATION, + "%s(buffer is mapped without persistent bit)", + caller); return false; } } @@ -1642,7 +1646,7 @@ _mesa_buffer_sub_data(struct gl_context *ctx, struct gl_buffer_object *bufObj, bufObj->Written = GL_TRUE; assert(ctx->Driver.BufferSubData); - ctx->Driver.BufferSubData( ctx, offset, size, data, bufObj ); + ctx->Driver.BufferSubData(ctx, offset, size, data, bufObj); } void GLAPIENTRY |