summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-08-24 13:44:21 +0200
committerSamuel Pitoiset <[email protected]>2017-08-25 11:11:51 +0200
commit08ee28b6a86ff85eb1d4ac4b72be2aaf07f83729 (patch)
treee8b09ae6704d520c48e79a9a51e30275ddfc4f94 /src
parentc7b201a50dc7e6e17076e74250a7eb8bfac2b7c3 (diff)
mesa: don't error check the default buffer object in glBindBufferOffsetEXT()
An allocation check is already done when the buffer is created at context creation. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/transformfeedback.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c
index 07a9f9e9401..a075d0875ac 100644
--- a/src/mesa/main/transformfeedback.c
+++ b/src/mesa/main/transformfeedback.c
@@ -778,12 +778,11 @@ _mesa_BindBufferOffsetEXT(GLenum target, GLuint index, GLuint buffer,
bufObj = ctx->Shared->NullBufferObj;
} else {
bufObj = _mesa_lookup_bufferobj(ctx, buffer);
- }
-
- if (!bufObj) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glBindBufferOffsetEXT(invalid buffer=%u)", buffer);
- return;
+ if (!bufObj) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBindBufferOffsetEXT(invalid buffer=%u)", buffer);
+ return;
+ }
}
_mesa_bind_buffer_range_xfb(ctx, obj, index, bufObj, offset, 0);