summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Brill <[email protected]>2008-03-04 21:52:49 +0100
committerChristoph Brill <[email protected]>2008-03-04 21:52:49 +0100
commitfc21e9cdd09db7a6759b82cb69cc42015d8a76de (patch)
treee274e9863728b100269012b0663c6cb7332b4159
parent701ccf6f290cddfa09686c12f728dab150029f80 (diff)
r300: replace some hard coded mask by define in stencil area
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index d10242fa1f7..ec9bf25bab3 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -957,7 +957,8 @@ static void r300StencilMaskSeparate(GLcontext * ctx, GLenum face, GLuint mask)
ZB_STENCILREFMASK_STENCILWRITEMASK_SHIFT);
rmesa->hw.zs.cmd[R300_ZS_CNTL_2] |=
(ctx->Stencil.
- WriteMask[0] & 0xff) << ZB_STENCILREFMASK_STENCILWRITEMASK_SHIFT;
+ WriteMask[0] & ZB_STENCILREFMASK_STENCIL_MASK) <<
+ ZB_STENCILREFMASK_STENCILWRITEMASK_SHIFT;
}
static void r300StencilOpSeparate(GLcontext * ctx, GLenum face,
@@ -1004,11 +1005,10 @@ static void r300ClearStencil(GLcontext * ctx, GLint s)
r300ContextPtr rmesa = R300_CONTEXT(ctx);
rmesa->state.stencil.clear =
- ((GLuint) (ctx->Stencil.Clear & 0xff) |
- (ZB_STENCILREFMASK_STENCIL_MASK <<
- ZB_STENCILREFMASK_STENCILMASK_SHIFT) | ((ctx->Stencil.
- WriteMask[0] & 0xff) <<
- ZB_STENCILREFMASK_STENCILMASK_SHIFT));
+ ((GLuint) (ctx->Stencil.Clear & ZB_STENCILREFMASK_STENCIL_MASK) |
+ (ZB_STENCILREFMASK_STENCIL_MASK << ZB_STENCILREFMASK_STENCILMASK_SHIFT) |
+ ((ctx->Stencil.WriteMask[0] & ZB_STENCILREFMASK_STENCIL_MASK) <<
+ ZB_STENCILREFMASK_STENCILMASK_SHIFT));
}
/* =============================================================