Mesa (master): mesa: Remove renderbuffer deletion debug field.

Eric Anholt anholt at kemper.freedesktop.org
Mon Apr 18 11:21:16 PDT 2011


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

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Apr 15 11:06:36 2011 -0700

mesa: Remove renderbuffer deletion debug field.

It has presumably served its purpose by now, and other object deletion
doesn't do this.

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

---

 src/mesa/main/mtypes.h       |    2 --
 src/mesa/main/renderbuffer.c |    5 -----
 2 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 9e2905a..6ca7405 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2406,8 +2406,6 @@ struct gl_shared_state
  */
 struct gl_renderbuffer
 {
-#define RB_MAGIC 0xaabbccdd
-   int Magic; /** XXX TEMPORARY DEBUG INFO */
    _glthread_Mutex Mutex;		   /**< for thread safety */
    GLuint ClassID;        /**< Useful for drivers */
    GLuint Name;
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index e6d5fe4..84c5f27 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -1395,7 +1395,6 @@ _mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name)
 {
    _glthread_INIT_MUTEX(rb->Mutex);
 
-   rb->Magic = RB_MAGIC;
    rb->ClassID = 0;
    rb->Name = name;
    rb->RefCount = 0;
@@ -1970,9 +1969,7 @@ _mesa_reference_renderbuffer(struct gl_renderbuffer **ptr,
       GLboolean deleteFlag = GL_FALSE;
       struct gl_renderbuffer *oldRb = *ptr;
 
-      assert(oldRb->Magic == RB_MAGIC);
       _glthread_LOCK_MUTEX(oldRb->Mutex);
-      assert(oldRb->Magic == RB_MAGIC);
       ASSERT(oldRb->RefCount > 0);
       oldRb->RefCount--;
       /*printf("RB DECR %p (%d) to %d\n", (void*) oldRb, oldRb->Name, oldRb->RefCount);*/
@@ -1980,7 +1977,6 @@ _mesa_reference_renderbuffer(struct gl_renderbuffer **ptr,
       _glthread_UNLOCK_MUTEX(oldRb->Mutex);
 
       if (deleteFlag) {
-         oldRb->Magic = 0; /* now invalid memory! */
          oldRb->Delete(oldRb);
       }
 
@@ -1989,7 +1985,6 @@ _mesa_reference_renderbuffer(struct gl_renderbuffer **ptr,
    assert(!*ptr);
 
    if (rb) {
-      assert(rb->Magic == RB_MAGIC);
       /* reference new renderbuffer */
       _glthread_LOCK_MUTEX(rb->Mutex);
       rb->RefCount++;



More information about the mesa-commit mailing list