summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2010-10-25 21:35:54 +0200
committerFrancisco Jerez <[email protected]>2010-10-30 19:25:33 +0200
commitf102c5220c8b671d92c04dce803b9c1f474f7253 (patch)
tree063d7ccd8382ee5a03258eb3380b22c944c18d1d /src/mesa
parente3c0b7ba4198db170543ff2b8cf9ebc8e0657f62 (diff)
dri/nouveau: Call _mesa_update_state() after framebuffer invalidation.
Previously nouveau_state_emit() was being called directly, sometimes that doesn't work because it doesn't update the derived GL context.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_context.c3
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_context.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
index 0ace139b886..c6cf78150cb 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -365,5 +365,6 @@ nouveau_validate_framebuffer(struct gl_context *ctx)
validate_framebuffer(dri_ctx, dri_read,
&dri_ctx->dri2.read_stamp);
- nouveau_state_emit(ctx);
+ if (ctx->NewState & _NEW_BUFFERS)
+ _mesa_update_state(ctx);
}
diff --git a/src/mesa/drivers/dri/nouveau/nv10_context.c b/src/mesa/drivers/dri/nouveau/nv10_context.c
index fdcb43b7718..78be401ba2a 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_context.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_context.c
@@ -24,6 +24,7 @@
*
*/
+#include "main/state.h"
#include "nouveau_driver.h"
#include "nouveau_context.h"
#include "nouveau_fbo.h"
@@ -184,6 +185,9 @@ nv10_clear(struct gl_context *ctx, GLbitfield buffers)
nv17_zclear(ctx, &buffers);
else
nv10_zclear(ctx, &buffers);
+
+ /* Emit the zclear state if it's dirty */
+ _mesa_update_state(ctx);
}
nouveau_clear(ctx, buffers);