mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
r300: Cleaned up r300DestroyTexObj.
This commit is contained in:
parent
7e2c381a22
commit
6a2ef09918
1 changed files with 5 additions and 18 deletions
|
|
@ -63,29 +63,16 @@ SOFTWARE.
|
|||
*/
|
||||
void r300DestroyTexObj(r300ContextPtr rmesa, r300TexObjPtr t)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (RADEON_DEBUG & DEBUG_TEXTURE) {
|
||||
fprintf(stderr, "%s( %p, %p )\n", __FUNCTION__,
|
||||
(void *)t, (void *)t->base.tObj);
|
||||
}
|
||||
|
||||
if (rmesa != NULL) {
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < rmesa->radeon.glCtx->Const.MaxTextureUnits; i++) {
|
||||
if (t == rmesa->state.texture.unit[i].texobj) {
|
||||
rmesa->state.texture.unit[i].texobj = NULL;
|
||||
/* This code below is meant to shorten state
|
||||
pushed to the hardware by not programming
|
||||
unneeded units.
|
||||
|
||||
This does not appear to be worthwhile on R300 */
|
||||
#if 0
|
||||
remove_from_list(&rmesa->hw.tex[i]);
|
||||
make_empty_list(&rmesa->hw.tex[i]);
|
||||
remove_from_list(&rmesa->hw.cube[i]);
|
||||
make_empty_list(&rmesa->hw.cube[i]);
|
||||
#endif
|
||||
}
|
||||
for (i = 0; i < rmesa->radeon.glCtx->Const.MaxTextureUnits; i++) {
|
||||
if (rmesa->state.texture.unit[i].texobj == t) {
|
||||
rmesa->state.texture.unit[i].texobj = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue