dri/nouveau: Don't reemit the BO state in nouveau_state_emit().
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 15 Sep 2010 14:44:06 +0000 (16:44 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Thu, 16 Sep 2010 17:44:22 +0000 (19:44 +0200)
src/mesa/drivers/dri/nouveau/nouveau_state.c
src/mesa/drivers/dri/nouveau/nv04_context.c

index 691e51e738d2745df44886dbc067360dd1421b40..01bcbc4b3ccb4be6575fef37014157581d59e65e 100644 (file)
@@ -459,8 +459,6 @@ nouveau_state_emit(GLcontext *ctx)
        }
 
        BITSET_ZERO(nctx->dirty);
-
-       nouveau_bo_state_emit(ctx);
 }
 
 static void
index 78703b0efa69bc0dec50a30dfb96d70e660b438c..94422f559dc878ce077a25076cb0502eb386d6c0 100644 (file)
@@ -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);
        }
 }