Mesa (master): mesa: Flag _NEW_BUFFERS when unbinding an attachment on glDeleteTextures.

Eric Anholt anholt at kemper.freedesktop.org
Sat Jun 18 22:28:45 UTC 2011


Module: Mesa
Branch: master
Commit: 001e07144332203bb30993eed4181b0e411a18be
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=001e07144332203bb30993eed4181b0e411a18be

Author: Eric Anholt <eric at anholt.net>
Date:   Wed May 25 16:37:09 2011 -0700

mesa: Flag _NEW_BUFFERS when unbinding an attachment on glDeleteTextures.

The _ColorDrawBuffers[] wouldn't get updated despite us having updated
what it depends on (Attachments[]->Renderbuffer).  Other callers of
_mesa_remove_attachment are already flagging _NEW_BUFFERS for other
reasons.  The specific bug report that led to this fix (and
the fbo-finish-deleted testcase) was fixed by
23b6f9606dc247488835745668b3686218612536, though.

Reviewed-by: Brian Paul <brianp at vmware.com>

---

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

diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index fdf1281..565a3a2 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -879,6 +879,8 @@ unbind_texobj_from_fbo(struct gl_context *ctx,
          for (j = 0; j < BUFFER_COUNT; j++) {
             if (fb->Attachment[j].Type == GL_TEXTURE &&
                 fb->Attachment[j].Texture == texObj) {
+	       /* Vertices are already flushed by _mesa_DeleteTextures */
+	       ctx->NewState |= _NEW_BUFFERS;
                _mesa_remove_attachment(ctx, fb->Attachment + j);         
             }
          }




More information about the mesa-commit mailing list