Mesa (master): dri/nouveau: Don't reemit the BO state in nouveau_state_emit ().

Francisco Jerez currojerez at kemper.freedesktop.org
Thu Sep 16 17:48:11 UTC 2010


Module: Mesa
Branch: master
Commit: d4d81ed02e79ef39ab0e06ebc18e1f5b79e2c92d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d4d81ed02e79ef39ab0e06ebc18e1f5b79e2c92d

Author: Francisco Jerez <currojerez at riseup.net>
Date:   Wed Sep 15 16:44:06 2010 +0200

dri/nouveau: Don't reemit the BO state in nouveau_state_emit().

---

 src/mesa/drivers/dri/nouveau/nouveau_state.c |    2 --
 src/mesa/drivers/dri/nouveau/nv04_context.c  |    6 +++---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c
index 691e51e..01bcbc4 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_state.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c
@@ -459,8 +459,6 @@ nouveau_state_emit(GLcontext *ctx)
 	}
 
 	BITSET_ZERO(nctx->dirty);
-
-	nouveau_bo_state_emit(ctx);
 }
 
 static void
diff --git a/src/mesa/drivers/dri/nouveau/nv04_context.c b/src/mesa/drivers/dri/nouveau/nv04_context.c
index 78703b0..94422f5 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_context.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_context.c
@@ -93,15 +93,15 @@ nv04_channel_flush_notify(struct nouveau_channel *chan)
 	GLcontext *ctx = &nctx->base;
 
 	if (nctx->fallback < SWRAST) {
-		/* Flushing seems to clobber the engine context. */
+		nouveau_bo_state_emit(ctx);
+
+		/* Reemit the engine state. */
 		context_emit(ctx, TEX_OBJ0);
 		context_emit(ctx, TEX_OBJ1);
 		context_emit(ctx, TEX_ENV0);
 		context_emit(ctx, TEX_ENV1);
 		context_emit(ctx, CONTROL);
 		context_emit(ctx, BLEND);
-
-		nouveau_bo_state_emit(ctx);
 	}
 }
 




More information about the mesa-commit mailing list