summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300/r300_tex.c
diff options
context:
space:
mode:
authorMaciej Cencora <[email protected]>2009-11-11 13:50:06 +0100
committerMaciej Cencora <[email protected]>2009-11-14 14:43:10 +0100
commitd3fa67c9b83b5736724ca57a0487857631e6c415 (patch)
treec097ac2b1e09d1f30367f32fad9ae5970b07b3d5 /src/mesa/drivers/dri/r300/r300_tex.c
parent286bf89e5a1fc931dbf523ded861b809859485e2 (diff)
radeon/r300: don't flush cmdbuf if not necessary
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_tex.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c
index 27b78a912fa..427237d200b 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.c
+++ b/src/mesa/drivers/dri/r300/r300_tex.c
@@ -270,7 +270,11 @@ static void r300DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
if (rmesa) {
int i;
- radeon_firevertices(&rmesa->radeon);
+ struct radeon_bo *bo;
+ bo = !t->mt ? t->bo : t->mt->bo;
+ if (bo && radeon_bo_is_referenced_by_cs(bo, rmesa->radeon.cmdbuf.cs)) {
+ radeon_firevertices(&rmesa->radeon);
+ }
for(i = 0; i < R300_MAX_TEXTURE_UNITS; ++i)
if (rmesa->hw.textures[i] == t)