From 9927180714662456ff7b895221f67112f2567a53 Mon Sep 17 00:00:00 2001 From: Samuel Iglesias Gonsalvez Date: Thu, 3 Apr 2014 08:30:06 +0200 Subject: [PATCH] mesa: fix check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT() According to the spec: must be RENDERBUFFER and should be set to the name of the renderbuffer object to be attached to the framebuffer. must be either zero or the name of an existing renderbuffer object of type , 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@lists.freedesktop.org Reviewed-by: Anuj Phogat Reviewed-by: Kenneth Graunke Signed-off-by: Samuel Iglesias Gonsalvez --- 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 6c4f1b548be..7669a0c5df5 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; -- 2.30.2