X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fswrast%2Fs_stencil.c;h=e9e9d3a4f10eccb88e63d19008d4356b42eb8acb;hb=940ca2e837efe45caae1cf1d9665f6736347705d;hp=c925922463e61a8ac0b3bf1071b998185fdeb78f;hpb=89ab66448e1bcd78caab6678261c2885dcff741c;p=mesa.git diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c index c925922463e..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;ifacing == 0) ? 0 : ctx->Stencil._BackFace; + if (span->arrayMask & SPAN_XY) - return stencil_and_ztest_pixels(ctx, span, span->facing); + return stencil_and_ztest_pixels(ctx, span, face); else - return stencil_and_ztest_span(ctx, span, span->facing); + return stencil_and_ztest_span(ctx, span, face); }