summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nv30/nv30_clear.c
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-03-05 12:10:15 -0500
committerIlia Mirkin <[email protected]>2015-05-24 12:00:03 -0400
commitaba3392541f38f82e3ebde251fdcca78e90adbf3 (patch)
treed21943249b5e1c53d8e3a7e80407891df2387a2b /src/gallium/drivers/nouveau/nv30/nv30_clear.c
parent207ae2b0efcdb48a39fd91b05181c7e6d81e5002 (diff)
nv30: avoid doing extra work on clear and hitting unexpected states
Clearing can happen at a time when various state objects are incoherent and not ready for a draw. Some of the validation functions don't handle this well, so only flush the framebuffer state. This has the advantage of also not doing extra work. This works around some crashes that can happen when clearing. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tobias Klausmann <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv30/nv30_clear.c')
-rw-r--r--src/gallium/drivers/nouveau/nv30/nv30_clear.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_clear.c b/src/gallium/drivers/nouveau/nv30/nv30_clear.c
index 1ab8929cc38..83fd1fa38dd 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_clear.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_clear.c
@@ -58,7 +58,7 @@ nv30_clear(struct pipe_context *pipe, unsigned buffers,
struct pipe_framebuffer_state *fb = &nv30->framebuffer;
uint32_t colr = 0, zeta = 0, mode = 0;
- if (!nv30_state_validate(nv30, TRUE))
+ if (!nv30_state_validate(nv30, NV30_NEW_FRAMEBUFFER | NV30_NEW_SCISSOR, TRUE))
return;
if (buffers & PIPE_CLEAR_COLOR && fb->nr_cbufs) {