X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fswrast%2Fs_span.c;h=ab7b82b19d952e4a17c2c75c17e5714620c3fc07;hb=71e64fc30b4f57bd93daf004bc04af7181391f4d;hp=4c58f8de876be24efc89434d2a81fa32b4ee8e41;hpb=dbf3c5247c90bd35c0b2002e3b972a2dd4c8b130;p=mesa.git diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 4c58f8de876..ab7b82b19d9 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -30,12 +30,12 @@ * \author Brian Paul */ -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "macros.h" -#include "imports.h" -#include "image.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/imports.h" +#include "main/image.h" #include "s_atifragshader.h" #include "s_alpha.h" @@ -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; }