summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common/texmem.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-02-17 10:25:34 +1000
committerDave Airlie <airlied@redhat.com>2009-02-17 10:25:34 +1000
commit5325f8624093bb1ec30d581b4ff64218ceab99f9 (patch)
tree78a9367863c6ac6f28c4cd524557ea95ff65a467 /src/mesa/drivers/dri/common/texmem.c
parentecf0a3eac1a4868da83ab0a3c21e2f265f7cf9e2 (diff)
dri/radeon: export a function to cleanup a texture object.
The radeon legacy code want to cleanup not free the texture obj, so export a function to do that and wrap it.
Diffstat (limited to 'src/mesa/drivers/dri/common/texmem.c')
-rw-r--r--src/mesa/drivers/dri/common/texmem.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/common/texmem.c b/src/mesa/drivers/dri/common/texmem.c
index ff174a251d..65c3c4e63e 100644
--- a/src/mesa/drivers/dri/common/texmem.c
+++ b/src/mesa/drivers/dri/common/texmem.c
@@ -314,11 +314,10 @@ void driSwapOutTextureObject( driTextureObject * t )
* \param t Texture object to be destroyed
*/
-void driDestroyTextureObject( driTextureObject * t )
+void driCleanupTextureObject( driTextureObject * t )
{
driTexHeap * heap;
-
if ( 0 ) {
fprintf( stderr, "[%s:%d] freeing %p (tObj = %p, DriverData = %p)\n",
__FILE__, __LINE__,
@@ -350,7 +349,6 @@ void driDestroyTextureObject( driTextureObject * t )
}
remove_from_list( t );
- FREE( t );
}
if ( 0 ) {
@@ -359,6 +357,18 @@ void driDestroyTextureObject( driTextureObject * t )
}
+void driDestroyTextureObject( driTextureObject * t )
+{
+ driTexHeap * heap;
+
+ if (t == NULL)
+ return;
+
+ driCleanupTextureObject(t);
+ FREE(t);
+}
+
+
/**