[Mesa-dev] [PATCH 2/3] mesa: Fix the error for glCopyBufferSubData() with a buffer of 0.
Eric Anholt
eric at anholt.net
Wed Jan 25 17:51:04 PST 2012
The INVALID_ENUM here may have been trying to catch someone passing
something bogus as the target rather than having a non-buffer bound.
The extension spec and the GL 3.2 specs doesn't say anything specific
for error results for either bad target enums or things that aren't
buffer objects other than "0". Given that, provide at least correct
behavior for the specified case.
---
src/mesa/main/bufferobj.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index e4f964f..471442c 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -1311,14 +1311,14 @@ _mesa_CopyBufferSubData(GLenum readTarget, GLenum writeTarget,
src = get_buffer(ctx, readTarget);
if (!_mesa_is_bufferobj(src)) {
- _mesa_error(ctx, GL_INVALID_ENUM,
+ _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyBuffserSubData(readTarget = 0x%x)", readTarget);
return;
}
dst = get_buffer(ctx, writeTarget);
if (!_mesa_is_bufferobj(dst)) {
- _mesa_error(ctx, GL_INVALID_ENUM,
+ _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyBuffserSubData(writeTarget = 0x%x)", writeTarget);
return;
}
--
1.7.7.3
More information about the mesa-dev
mailing list