mesa: fix GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME query
authorBrian Paul <brianp@vmware.com>
Fri, 3 Dec 2010 15:23:31 +0000 (08:23 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 3 Dec 2010 15:24:51 +0000 (08:24 -0700)
Return 0 instead of generating an error.

See http://bugs.freedesktop.org/show_bug.cgi?id=30993

Note that piglit fbo-getframebufferattachmentparameter-01 still does
not pass.  But Mesa behaves the same as the NVIDIA driver in this case.
Perhaps the test is incorrect.

NOTE: This is a candidate for the 7.9 branch.

src/mesa/main/fbobject.c

index 7c3357043faf3b1efc372a120eaaf45fb96a2a1a..560a2f68beab211f1ce103f6243873368a097e0f 100644 (file)
@@ -2024,8 +2024,8 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
         *params = att->Texture->Name;
       }
       else {
-        _mesa_error(ctx, GL_INVALID_ENUM,
-                    "glGetFramebufferAttachmentParameterivEXT(pname)");
+         assert(att->Type == GL_NONE);
+         *params = 0;
       }
       return;
    case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT: