Mesa (master): nv30: reset the stencil mask when fast-clearing
Ilia Mirkin
imirkin at kemper.freedesktop.org
Sun May 22 18:49:28 UTC 2016
Module: Mesa
Branch: master
Commit: cb9a51d1f6db4c5a3baa2aed309875bf2e8746bd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cb9a51d1f6db4c5a3baa2aed309875bf2e8746bd
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Sun May 22 14:34:28 2016 -0400
nv30: reset the stencil mask when fast-clearing
Apparently the stencil mask applies to clears on nv30/nv40. Reset it to
0xff before doing a stencil clear. This fixes gl-1.0-readpixsanity and
a number of other piglit tests.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
src/gallium/drivers/nouveau/nv30/nv30_clear.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_clear.c b/src/gallium/drivers/nouveau/nv30/nv30_clear.c
index 118cac7..c8fa38e 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_clear.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_clear.c
@@ -73,8 +73,13 @@ nv30_clear(struct pipe_context *pipe, unsigned buffers,
zeta = pack_zeta(fb->zsbuf->format, depth, stencil);
if (buffers & PIPE_CLEAR_DEPTH)
mode |= NV30_3D_CLEAR_BUFFERS_DEPTH;
- if (buffers & PIPE_CLEAR_STENCIL)
+ if (buffers & PIPE_CLEAR_STENCIL) {
mode |= NV30_3D_CLEAR_BUFFERS_STENCIL;
+ BEGIN_NV04(push, NV30_3D(STENCIL_ENABLE(0)), 2);
+ PUSH_DATA (push, 0);
+ PUSH_DATA (push, 0x000000ff);
+ nv30->dirty |= NV30_NEW_ZSA;
+ }
}
/*XXX: wtf? fixes clears sometimes not clearing on nv3x... */
More information about the mesa-commit
mailing list