#define ZB_STENCILREFMASK 0x4f08
# define ZB_STENCILREFMASK_STENCILREF_SHIFT 0
+# define ZB_STENCILREFMASK_STENCIL_MASK 0xff
# define ZB_STENCILREFMASK_STENCILREF_MASK 0x000000ff
# define ZB_STENCILREFMASK_STENCILMASK_SHIFT 8
# define ZB_STENCILREFMASK_STENCILMASK_MASK 0x0000ff00
# define ZB_ZCACHE_CTLSTAT_ZC_FLUSH_FLUSH_AND_FREE (1 << 0)
# define ZB_ZCACHE_CTLSTAT_ZC_FREE_NO_EFFECT (0 << 1)
# define ZB_ZCACHE_CTLSTAT_ZC_FREE_FREE (1 << 1)
-# define ZB_ZCACHE_CTLSTAT_ZC_BUSY_IDLE (0 << 1)
-# define ZB_ZCACHE_CTLSTAT_ZC_BUSY_BUSY (1 << 1)
+# define ZB_ZCACHE_CTLSTAT_ZC_BUSY_IDLE (0 << 31)
+# define ZB_ZCACHE_CTLSTAT_ZC_BUSY_BUSY (1 << 31)
#define R300_ZB_BW_CNTL 0x4f1c
# define R300_HIZ_DISABLE (0 << 0)
R300_RB3D_ZS1_BACK_FUNC_SHIFT));
rmesa->hw.zs.cmd[R300_ZS_CNTL_2] &=
- ~((ZB_STENCILREFMASK_STENCILREF_MASK << ZB_STENCILREFMASK_STENCILREF_SHIFT) |
- (ZB_STENCILREFMASK_STENCILMASK_MASK << ZB_STENCILREFMASK_STENCILMASK_SHIFT));
+ ~((ZB_STENCILREFMASK_STENCIL_MASK << ZB_STENCILREFMASK_STENCILREF_SHIFT) |
+ (ZB_STENCILREFMASK_STENCIL_MASK << ZB_STENCILREFMASK_STENCILMASK_SHIFT));
flag = translate_func(ctx->Stencil.Function[0]);
rmesa->hw.zs.cmd[R300_ZS_CNTL_1] |=
R300_STATECHANGE(rmesa, zs);
rmesa->hw.zs.cmd[R300_ZS_CNTL_2] &=
- ~(ZB_STENCILREFMASK_STENCILMASK_MASK <<
+ ~(ZB_STENCILREFMASK_STENCIL_MASK <<
ZB_STENCILREFMASK_STENCILWRITEMASK_SHIFT);
rmesa->hw.zs.cmd[R300_ZS_CNTL_2] |=
(ctx->Stencil.
rmesa->state.stencil.clear =
((GLuint) (ctx->Stencil.Clear & 0xff) |
- (ZB_STENCILREFMASK_STENCILMASK_MASK <<
+ (ZB_STENCILREFMASK_STENCIL_MASK <<
ZB_STENCILREFMASK_STENCILMASK_SHIFT) | ((ctx->Stencil.
WriteMask[0] & 0xff) <<
ZB_STENCILREFMASK_STENCILMASK_SHIFT));