Mesa (7.9): mesa: fix GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME query

Brian Paul brianp at kemper.freedesktop.org
Tue Dec 14 23:32:18 UTC 2010


Module: Mesa
Branch: 7.9
Commit: 5f05ade503d8543bbdfaba57e416c5b2904b4377
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5f05ade503d8543bbdfaba57e416c5b2904b4377

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Dec 14 16:26:14 2010 -0700

mesa: fix GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME query

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.

(cherry picked from commit 20cf1851d82d6135b92c20323266156eb6ad5ffe)

---

 src/mesa/main/fbobject.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 5201f50..fb5b9d3 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1981,8 +1981,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:




More information about the mesa-commit mailing list