diff options
author | Dave Airlie <[email protected]> | 2009-02-17 14:46:12 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2009-02-17 14:46:12 +1000 |
commit | 7ce6af25e56e28a819c38e60b4371caea3c8b5b0 (patch) | |
tree | 3c0411672e6afaf8d78bf82a7ccb3ed7dff5b7e7 /src/mesa/drivers/dri | |
parent | 2ba4fc3d603ebc9e3210ef96f9fbc2cd488e0a33 (diff) |
Revert "dri/radeon: export a function to cleanup a texture object."
This reverts commit 5325f8624093bb1ec30d581b4ff64218ceab99f9.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/common/texmem.c | 16 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/texmem.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_bo_legacy.c | 4 |
3 files changed, 4 insertions, 17 deletions
diff --git a/src/mesa/drivers/dri/common/texmem.c b/src/mesa/drivers/dri/common/texmem.c index 65c3c4e63e2..ff174a251d2 100644 --- a/src/mesa/drivers/dri/common/texmem.c +++ b/src/mesa/drivers/dri/common/texmem.c @@ -314,10 +314,11 @@ void driSwapOutTextureObject( driTextureObject * t ) * \param t Texture object to be destroyed */ -void driCleanupTextureObject( driTextureObject * t ) +void driDestroyTextureObject( driTextureObject * t ) { driTexHeap * heap; + if ( 0 ) { fprintf( stderr, "[%s:%d] freeing %p (tObj = %p, DriverData = %p)\n", __FILE__, __LINE__, @@ -349,6 +350,7 @@ void driCleanupTextureObject( driTextureObject * t ) } remove_from_list( t ); + FREE( t ); } if ( 0 ) { @@ -357,18 +359,6 @@ void driCleanupTextureObject( driTextureObject * t ) } -void driDestroyTextureObject( driTextureObject * t ) -{ - driTexHeap * heap; - - if (t == NULL) - return; - - driCleanupTextureObject(t); - FREE(t); -} - - /** diff --git a/src/mesa/drivers/dri/common/texmem.h b/src/mesa/drivers/dri/common/texmem.h index b9beeeadfca..9c065da8b4f 100644 --- a/src/mesa/drivers/dri/common/texmem.h +++ b/src/mesa/drivers/dri/common/texmem.h @@ -272,7 +272,6 @@ void driAgeTextures( driTexHeap * heap ); void driUpdateTextureLRU( driTextureObject * t ); void driSwapOutTextureObject( driTextureObject * t ); -void driCleanupTextureObject( driTextureObject * t ); void driDestroyTextureObject( driTextureObject * t ); int driAllocateTexture( driTexHeap * const * heap_array, unsigned nr_heaps, driTextureObject * t ); diff --git a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c index 1cc039c8440..93838b5d92f 100644 --- a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c +++ b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c @@ -377,13 +377,11 @@ static void bo_free(struct bo_legacy *bo_legacy) /* dma buffers */ bo_dma_free(&bo_legacy->base); } else { - if (bo_legacy->got_dri_texture_obj) - driCleanupTextureObject(&bo_legacy->dri_texture_obj); - /* free backing store */ free(bo_legacy->ptr); } } + memset(bo_legacy, 0 , sizeof(struct bo_legacy)); free(bo_legacy); } |