summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2003-12-08 22:43:10 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2003-12-08 22:43:10 +0000
commit73c3c397e4c07b48dcc845add9d80df025e1f0cd (patch)
treec0cfb2d4d1ac060f8788012ba5fbb85fb73fbbdc /src/mesa
parent93c2dacca6a995134ff6d78273385394e7d8ae49 (diff)
fix bogus assertion that checked for an empty texture heap list before
deleting the textures. Essentially move the assertion after the destruction of the heap.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i810/i810context.c4
-rw-r--r--src/mesa/drivers/dri/i830/i830_context.c4
-rw-r--r--src/mesa/drivers/dri/mga/mga_xmesa.c4
-rw-r--r--src/mesa/drivers/dri/r128/r128_context.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c5
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.c4
6 files changed, 12 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i810/i810context.c b/src/mesa/drivers/dri/i810/i810context.c
index 3bf0a81bcb..868ae028ef 100644
--- a/src/mesa/drivers/dri/i810/i810context.c
+++ b/src/mesa/drivers/dri/i810/i810context.c
@@ -320,12 +320,12 @@ i810DestroyContext(__DRIcontextPrivate *driContextPriv)
*/
int i;
- assert( is_empty_list( & imesa->swapped ) );
-
for ( i = 0 ; i < imesa->nr_heaps ; i++ ) {
driDestroyTextureHeap( imesa->texture_heaps[ i ] );
imesa->texture_heaps[ i ] = NULL;
}
+
+ assert( is_empty_list( & imesa->swapped ) );
}
Xfree(imesa);
diff --git a/src/mesa/drivers/dri/i830/i830_context.c b/src/mesa/drivers/dri/i830/i830_context.c
index 9eaff1eed7..1d1890976f 100644
--- a/src/mesa/drivers/dri/i830/i830_context.c
+++ b/src/mesa/drivers/dri/i830/i830_context.c
@@ -410,12 +410,12 @@ void i830DestroyContext(__DRIcontextPrivate *driContextPriv)
*/
int i;
- assert( is_empty_list( & imesa->swapped ) );
-
for ( i = 0 ; i < imesa->nr_heaps ; i++ ) {
driDestroyTextureHeap( imesa->texture_heaps[ i ] );
imesa->texture_heaps[ i ] = NULL;
}
+
+ assert( is_empty_list( & imesa->swapped ) );
}
Xfree (imesa);
diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c
index 3752a8b13c..3888d12cb9 100644
--- a/src/mesa/drivers/dri/mga/mga_xmesa.c
+++ b/src/mesa/drivers/dri/mga/mga_xmesa.c
@@ -573,12 +573,12 @@ mgaDestroyContext(__DRIcontextPrivate *driContextPriv)
*/
int i;
- assert( is_empty_list( & mmesa->swapped ) );
-
for ( i = 0 ; i < mmesa->nr_heaps ; i++ ) {
driDestroyTextureHeap( mmesa->texture_heaps[ i ] );
mmesa->texture_heaps[ i ] = NULL;
}
+
+ assert( is_empty_list( & mmesa->swapped ) );
}
/* free the option cache */
diff --git a/src/mesa/drivers/dri/r128/r128_context.c b/src/mesa/drivers/dri/r128/r128_context.c
index 1c7e868ad1..7290615507 100644
--- a/src/mesa/drivers/dri/r128/r128_context.c
+++ b/src/mesa/drivers/dri/r128/r128_context.c
@@ -300,12 +300,12 @@ void r128DestroyContext( __DRIcontextPrivate *driContextPriv )
*/
int i;
- assert( is_empty_list( & rmesa->swapped ) );
-
for ( i = 0 ; i < rmesa->nr_heaps ; i++ ) {
driDestroyTextureHeap( rmesa->texture_heaps[ i ] );
rmesa->texture_heaps[ i ] = NULL;
}
+
+ assert( is_empty_list( & rmesa->swapped ) );
}
/* free the option cache */
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index c08c411e22..2da6ef3abb 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -530,13 +530,12 @@ void r200DestroyContext( __DRIcontextPrivate *driContextPriv )
*/
int i;
- /* this assert is wrong. The default textures are always on swap list
- assert( is_empty_list( & rmesa->swapped ) ); */
-
for ( i = 0 ; i < rmesa->nr_heaps ; i++ ) {
driDestroyTextureHeap( rmesa->texture_heaps[ i ] );
rmesa->texture_heaps[ i ] = NULL;
}
+
+ assert( is_empty_list( & rmesa->swapped ) );
}
/* free the option cache */
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index 2cd09b1870..0abf5b2e3e 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -526,12 +526,12 @@ void radeonDestroyContext( __DRIcontextPrivate *driContextPriv )
*/
int i;
- assert( is_empty_list( & rmesa->swapped ) );
-
for ( i = 0 ; i < rmesa->nr_heaps ; i++ ) {
driDestroyTextureHeap( rmesa->texture_heaps[ i ] );
rmesa->texture_heaps[ i ] = NULL;
}
+
+ assert( is_empty_list( & rmesa->swapped ) );
}
/* free the option cache */