Mesa (7.9): mesa: return GL_FRAMEBUFFER_DEFAULT as FBO attachment type

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


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

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

mesa: return GL_FRAMEBUFFER_DEFAULT as FBO attachment type

If querying the default/window-system FBO's attachment type, return
GL_FRAMEBUFFER_DEFAULT (per the GL_ARB_framebuffer_object spec).

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

NOTE: This is a candidate for the 7.9 branch.

(cherry picked from commit 6d13ec7dc082aea9a8ce04dd8e045e77e5921d8a)

---

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

diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index fb5b9d3..3740168 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1971,7 +1971,7 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
 
    switch (pname) {
    case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT:
-      *params = att->Type;
+      *params = buffer->Name == 0 ? GL_FRAMEBUFFER_DEFAULT : att->Type;
       return;
    case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT:
       if (att->Type == GL_RENDERBUFFER_EXT) {




More information about the mesa-commit mailing list