X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fswrast%2Fs_span.c;h=ab7b82b19d952e4a17c2c75c17e5714620c3fc07;hb=71e64fc30b4f57bd93daf004bc04af7181391f4d;hp=214c2a1b6f338b4cf758d8876758d1aef19ae060;hpb=9136c9b29ed5c14bc89a4c4e3a391e0b097092e1;p=mesa.git diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 214c2a1b6f3..ab7b82b19d9 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -1032,6 +1032,7 @@ add_specular(GLcontext *ctx, SWspan *span) ASSERT(!ctx->FragmentProgram._Current); ASSERT(span->arrayMask & SPAN_RGBA); ASSERT(swrast->_ActiveAttribMask & FRAG_BIT_COL1); + (void) swrast; /* silence warning */ if (span->array->ChanType == GL_FLOAT) { if ((span->arrayAttribs & FRAG_BIT_COL0) == 0) { @@ -1310,6 +1311,7 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) /* Do the alpha test */ if (ctx->Color.AlphaEnabled) { if (!_swrast_alpha_test(ctx, span)) { + /* all fragments failed test */ goto end; } } @@ -1322,6 +1324,7 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) if (ctx->Stencil.Enabled && fb->Visual.stencilBits > 0) { /* Combined Z/stencil tests */ if (!_swrast_stencil_and_ztest_span(ctx, span)) { + /* all fragments failed test */ goto end; } } @@ -1330,6 +1333,7 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) ASSERT(ctx->Depth.Test); ASSERT(span->arrayMask & SPAN_Z); if (!_swrast_depth_test_span(ctx, span)) { + /* all fragments failed test */ goto end; } } @@ -1349,6 +1353,7 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) * the occlusion test. */ if (colorMask == 0x0) { + /* no colors to write */ goto end; }