Fix the comment for the 'bound' field: it's a bitmask, not an index.
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 8 Sep 2005 18:47:36 +0000 (18:47 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 8 Sep 2005 18:47:36 +0000 (18:47 +0000)
In driTexturesGone(), set bound = 0, not 99.

src/mesa/drivers/dri/common/texmem.c
src/mesa/drivers/dri/common/texmem.h

index acefce0f5971302e793e36881bc479e575fe751b..5bc27e449362aa412688872c0baf58026b0823f2 100644 (file)
@@ -414,7 +414,7 @@ static void driTexturesGone( driTexHeap * heap, int offset, int size,
       }
       t->heap = heap;
       if (in_use) 
-        t->bound = 99;
+        t->bound = 0; /* bound to no tex units */
       insert_at_head( & heap->texture_objects, t );
    }
 }
index 705cd4d3445f89d9262635fe1556cfdacb0dd9db..486cb0dab941b958b1f708d52f015fb67de19d77 100644 (file)
@@ -67,7 +67,10 @@ struct dri_texture_object {
                                         * A placeholder should have a heap and a memBlock.
                                         */
        PMemBlock   memBlock;           /**< Memory block containing texture */
-       unsigned    bound;              /**< Texture unit currently bound to */
+       unsigned    bound;              /**< Bitmask indicating which tex units
+                                        * this texture object is bound to.
+                                        * Bit 0 = unit 0, Bit 1 = unit 1, etc
+                                        */
 
        unsigned    totalSize;          /**< Total size of the texture,
                                         * including all mipmap levels