summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormdaenzer <mdaenzer>2002-10-20 20:49:33 +0000
committermdaenzer <mdaenzer>2002-10-20 20:49:33 +0000
commita604e0c295ff8ea203c03ea476834bd8a155b162 (patch)
tree660fa457936961b8d5778b4e09d9d2b44a2c5ca8
parentacfbba451e6f3567dd6bb6a1b98f769287fee6fc (diff)
don't use texture placeholder heaps after they've been destroyedtrunk-20021022
-rw-r--r--xc/lib/GL/mesa/src/drv/r128/r128_context.c1
-rw-r--r--xc/lib/GL/mesa/src/drv/r128/r128_lock.c2
-rw-r--r--xc/lib/GL/mesa/src/drv/r200/r200_context.c1
-rw-r--r--xc/lib/GL/mesa/src/drv/radeon/radeon_context.c1
-rw-r--r--xc/lib/GL/mesa/src/drv/radeon/radeon_lock.c2
5 files changed, 5 insertions, 2 deletions
diff --git a/xc/lib/GL/mesa/src/drv/r128/r128_context.c b/xc/lib/GL/mesa/src/drv/r128/r128_context.c
index d637cd60a..d9cb8ddb2 100644
--- a/xc/lib/GL/mesa/src/drv/r128/r128_context.c
+++ b/xc/lib/GL/mesa/src/drv/r128/r128_context.c
@@ -218,6 +218,7 @@ void r128DestroyContext( __DRIcontextPrivate *driContextPriv )
r128DestroyTexObj( rmesa, t );
}
mmDestroy( rmesa->texHeap[i] );
+ rmesa->texHeap[i] = NULL;
}
foreach_s ( t, next_t, &rmesa->SwappedOut ) {
diff --git a/xc/lib/GL/mesa/src/drv/r128/r128_lock.c b/xc/lib/GL/mesa/src/drv/r128/r128_lock.c
index 38ad89fde..9de650448 100644
--- a/xc/lib/GL/mesa/src/drv/r128/r128_lock.c
+++ b/xc/lib/GL/mesa/src/drv/r128/r128_lock.c
@@ -86,7 +86,7 @@ void r128GetLock( r128ContextPtr rmesa, GLuint flags )
}
for ( i = 0 ; i < rmesa->lastTexHeap ; i++ ) {
- if ( sarea->texAge[i] != rmesa->lastTexAge[i] ) {
+ if ( rmesa->texHeap[i] && sarea->texAge[i] != rmesa->lastTexAge[i] ) {
r128AgeTextures( rmesa, i );
}
}
diff --git a/xc/lib/GL/mesa/src/drv/r200/r200_context.c b/xc/lib/GL/mesa/src/drv/r200/r200_context.c
index ccb190fc2..59690086b 100644
--- a/xc/lib/GL/mesa/src/drv/r200/r200_context.c
+++ b/xc/lib/GL/mesa/src/drv/r200/r200_context.c
@@ -496,6 +496,7 @@ void r200DestroyContext( __DRIcontextPrivate *driContextPriv )
r200DestroyTexObj( rmesa, t );
}
mmDestroy( rmesa->texture.heap[i] );
+ rmesa->texture.heap[i] = NULL;
}
foreach_s ( t, next_t, &rmesa->texture.swapped ) {
diff --git a/xc/lib/GL/mesa/src/drv/radeon/radeon_context.c b/xc/lib/GL/mesa/src/drv/radeon/radeon_context.c
index 3fe2445c0..3af5f125d 100644
--- a/xc/lib/GL/mesa/src/drv/radeon/radeon_context.c
+++ b/xc/lib/GL/mesa/src/drv/radeon/radeon_context.c
@@ -546,6 +546,7 @@ radeonDestroyContext( __DRIcontextPrivate *driContextPriv )
radeonDestroyTexObj( rmesa, t );
}
mmDestroy( rmesa->texture.heap[i] );
+ rmesa->texture.heap[i] = NULL;
}
foreach_s ( t, next_t, &rmesa->texture.swapped ) {
diff --git a/xc/lib/GL/mesa/src/drv/radeon/radeon_lock.c b/xc/lib/GL/mesa/src/drv/radeon/radeon_lock.c
index 7e8aaebaa..ef658be7a 100644
--- a/xc/lib/GL/mesa/src/drv/radeon/radeon_lock.c
+++ b/xc/lib/GL/mesa/src/drv/radeon/radeon_lock.c
@@ -117,7 +117,7 @@ void radeonGetLock( radeonContextPtr rmesa, GLuint flags )
sarea->ctxOwner = rmesa->dri.hwContext;
for ( i = 0 ; i < rmesa->texture.numHeaps ; i++ ) {
- if ( sarea->texAge[i] != rmesa->texture.age[i] ) {
+ if ( rmesa->texture.heap[i] && sarea->texAge[i] != rmesa->texture.age[i] ) {
radeonAgeTextures( rmesa, i );
}
}