summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r128/server/r128_reg.h
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2005-10-27 20:26:24 +0000
committerEric Anholt <anholt@FreeBSD.org>2005-10-27 20:26:24 +0000
commit215c4c3a9c989b3d0e7090177ab2fc3eeab0ddaa (patch)
tree4d358e322e350f176e5b0dfbc6c838403f7199fd /src/mesa/drivers/dri/r128/server/r128_reg.h
parent512c994b92126a7575bb3cc327da40710b43f52c (diff)
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
Diffstat (limited to 'src/mesa/drivers/dri/r128/server/r128_reg.h')
-rw-r--r--src/mesa/drivers/dri/r128/server/r128_reg.h4
1 files changed, 4 insertions, 0 deletions
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)