From fc21e9cdd09db7a6759b82cb69cc42015d8a76de Mon Sep 17 00:00:00 2001 From: Christoph Brill Date: Tue, 4 Mar 2008 21:52:49 +0100 Subject: [PATCH] r300: replace some hard coded mask by define in stencil area --- src/mesa/drivers/dri/r300/r300_state.c | 12 ++++++------ 1 file 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)); } /* ============================================================= -- 2.30.2