X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fnv50%2Fnv50_clear.c;h=5447904e9ca11a7babff49b33e438335ba3cfbb8;hb=880e3fb09b538f6f0b6fad2db7e0e10e9df43555;hp=e0b2d2880b00b1e42bfe7d02a3ba121ea06c208b;hpb=28471cfa970702128d822c2ecbb1703eedbca245;p=mesa.git diff --git a/src/gallium/drivers/nv50/nv50_clear.c b/src/gallium/drivers/nv50/nv50_clear.c index e0b2d2880b0..5447904e9ca 100644 --- a/src/gallium/drivers/nv50/nv50_clear.c +++ b/src/gallium/drivers/nv50/nv50_clear.c @@ -35,8 +35,11 @@ nv50_clear(struct pipe_context *pipe, unsigned buffers, struct nouveau_grobj *tesla = nv50->screen->tesla; struct pipe_framebuffer_state *fb = &nv50->framebuffer; unsigned mode = 0, i; + const unsigned dirty = nv50->dirty; - if (!nv50_state_validate(nv50)) + /* don't need NEW_BLEND, NV50TCL_COLOR_MASK doesn't affect CLEAR_BUFFERS */ + nv50->dirty &= NV50_NEW_FRAMEBUFFER | NV50_NEW_SCISSOR; + if (!nv50_state_validate(nv50, 64)) return; if (buffers & PIPE_CLEAR_COLOR && fb->nr_cbufs) { @@ -64,5 +67,6 @@ nv50_clear(struct pipe_context *pipe, unsigned buffers, BEGIN_RING(chan, tesla, NV50TCL_CLEAR_BUFFERS, 1); OUT_RING (chan, (i << 6) | 0x3c); } + nv50->dirty = dirty; }