aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-11-10 12:31:11 -0800
committerEric Anholt <[email protected]>2011-11-14 09:26:53 -0800
commit95a826bed385efe6f53d3e1c0305b05ef355d786 (patch)
tree0b5b9fe8a812c6ce4c1e2bc62973731d7750ec11 /src
parentda1544b39ebdf9b24414dcee214a5ccf76e74a77 (diff)
meta: Don't forget to flag state when restoring texobjects.
It's unlikely that we changed the object but no other texture parameter, but be correct anyway. Noticed by inspection. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/common/meta.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 8d589e4c3bd..f9b582df128 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -879,8 +879,11 @@ _mesa_meta_end(struct gl_context *ctx)
/* restore texture objects for unit[0] only */
for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) {
- _mesa_reference_texobj(&ctx->Texture.Unit[0].CurrentTex[tgt],
- save->CurrentTexture[tgt]);
+ if (ctx->Texture.Unit[0].CurrentTex[tgt] != save->CurrentTexture[tgt]) {
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+ _mesa_reference_texobj(&ctx->Texture.Unit[0].CurrentTex[tgt],
+ save->CurrentTexture[tgt]);
+ }
_mesa_reference_texobj(&save->CurrentTexture[tgt], NULL);
}