From 215c4c3a9c989b3d0e7090177ab2fc3eeab0ddaa Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 27 Oct 2005 20:26:24 +0000 Subject: Bug #1028: Add hardware-accelerated stencil support to r128. Testing with stencilwrap reported many issues with various modes. Some of these were complicated by the fact that spans are broken (Bug #1615), but some appear to be real bugs. However, while spans remain broken, I found that visual results were better by avoiding fallbacks rather than avoiding just a broken stencil implementation. Note that this required changing the depth spans at 24+8bpp into read-modify-write cycles. It would be nicer as a single write with a mask, but the kernel span blits turn off masking. Reviewed by: ajax --- src/mesa/drivers/dri/r128/server/r128_reg.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/drivers/dri/r128/server/r128_reg.h') diff --git a/src/mesa/drivers/dri/r128/server/r128_reg.h b/src/mesa/drivers/dri/r128/server/r128_reg.h index 00f5041c11..cb979cb70d 100644 --- a/src/mesa/drivers/dri/r128/server/r128_reg.h +++ b/src/mesa/drivers/dri/r128/server/r128_reg.h @@ -1068,24 +1068,28 @@ # define R128_STENCIL_TEST_GREATER (5 << 12) # define R128_STENCIL_TEST_NEQUAL (6 << 12) # define R128_STENCIL_TEST_ALWAYS (7 << 12) +# define R128_STENCIL_TEST_MASK (7 << 12) # define R128_STENCIL_S_FAIL_KEEP (0 << 16) # define R128_STENCIL_S_FAIL_ZERO (1 << 16) # define R128_STENCIL_S_FAIL_REPLACE (2 << 16) # define R128_STENCIL_S_FAIL_INC (3 << 16) # define R128_STENCIL_S_FAIL_DEC (4 << 16) # define R128_STENCIL_S_FAIL_INV (5 << 16) +# define R128_STENCIL_S_FAIL_MASK (7 << 16) # define R128_STENCIL_ZPASS_KEEP (0 << 20) # define R128_STENCIL_ZPASS_ZERO (1 << 20) # define R128_STENCIL_ZPASS_REPLACE (2 << 20) # define R128_STENCIL_ZPASS_INC (3 << 20) # define R128_STENCIL_ZPASS_DEC (4 << 20) # define R128_STENCIL_ZPASS_INV (5 << 20) +# define R128_STENCIL_ZPASS_MASK (7 << 20) # define R128_STENCIL_ZFAIL_KEEP (0 << 24) # define R128_STENCIL_ZFAIL_ZERO (1 << 24) # define R128_STENCIL_ZFAIL_REPLACE (2 << 24) # define R128_STENCIL_ZFAIL_INC (3 << 24) # define R128_STENCIL_ZFAIL_DEC (4 << 24) # define R128_STENCIL_ZFAIL_INV (5 << 24) +# define R128_STENCIL_ZFAIL_MASK (7 << 24) #define R128_TEX_CNTL_C 0x1c9c # define R128_Z_ENABLE (1 << 0) # define R128_Z_WRITE_ENABLE (1 << 1) -- cgit v1.2.3