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-sta...@lists.freedesktop.org
Reviewed-by: Anuj Phogat <anuj.pho...@gmail.com>
Signed-off-by: Samuel Iglesias Gonsalvez <sigles...@igalia.com>
---
 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 6c4f1b5..7669a0c 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -2676,8 +2676,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;
-- 
1.9.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to