From: Brian Paul Date: Sun, 30 Aug 2009 15:21:20 +0000 (-0600) Subject: swrast: minor code consolidation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d6b8664e3cd37c081cb1dd3d6cd5ffdac1813dac;p=mesa.git swrast: minor code consolidation --- diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c index 2e84ddec71f..e9e9d3a4f10 100644 --- a/src/mesa/swrast/s_stencil.c +++ b/src/mesa/swrast/s_stencil.c @@ -231,8 +231,9 @@ do_stencil_test( GLcontext *ctx, GLuint face, GLuint n, GLstencil stencil[], GLubyte fail[MAX_WIDTH]; GLboolean allfail = GL_FALSE; GLuint i; - GLstencil r, s; const GLuint valueMask = ctx->Stencil.ValueMask[face]; + const GLstencil r = (GLstencil) (ctx->Stencil.Ref[face] & valueMask); + GLstencil s; ASSERT(n <= MAX_WIDTH); @@ -260,7 +261,6 @@ do_stencil_test( GLcontext *ctx, GLuint face, GLuint n, GLstencil stencil[], allfail = GL_TRUE; break; case GL_LESS: - r = (GLstencil) (ctx->Stencil.Ref[face] & valueMask); for (i=0;iStencil.Ref[face] & valueMask); for (i=0;iStencil.Ref[face] & valueMask); for (i=0;iStencil.Ref[face] & valueMask); for (i=0;iStencil.Ref[face] & valueMask); for (i=0;iStencil.Ref[face] & valueMask); for (i=0;i