From: Christoph Brill Date: Tue, 4 Mar 2008 20:52:49 +0000 (+0100) Subject: r300: replace some hard coded mask by define in stencil area X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fc21e9cdd09db7a6759b82cb69cc42015d8a76de;p=mesa.git r300: replace some hard coded mask by define in stencil area --- 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)); } /* =============================================================