Mesa (10.1): mesa: fix check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()
Carl Worth
cworth at kemper.freedesktop.org
Wed Apr 23 09:27:24 UTC 2014
Module: Mesa
Branch: 10.1
Commit: e16df44a859c3e6f70c00085fe676d2406deca56
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e16df44a859c3e6f70c00085fe676d2406deca56
Author: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
Date: Thu Apr 3 08:30:06 2014 +0200
mesa: fix check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()
According to the spec:
<renderbuffertarget> must be RENDERBUFFER and <renderbuffer>
should be set to the name of the renderbuffer object to be
attached to the framebuffer. <renderbuffer> must be either
zero or the name of an existing renderbuffer object of type
<renderbuffertarget>, otherwise an INVALID_OPERATION error is
generated.
This patch changes the previous returned GL_INVALID_VALUE to
GL_INVALID_OPERATION.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76894
Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
(cherry picked from commit 9927180714662456ff7b895221f67112f2567a53)
---
src/mesa/main/fbobject.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index e4aad54..0c67919 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -2666,8 +2666,7 @@ _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment,
return;
}
else if (rb == &DummyRenderbuffer) {
- /* This is what NVIDIA does */
- _mesa_error(ctx, GL_INVALID_VALUE,
+ _mesa_error(ctx, GL_INVALID_OPERATION,
"glFramebufferRenderbufferEXT(renderbuffer %u)",
renderbuffer);
return;
More information about the mesa-commit
mailing list