From: Brian Paul Date: Tue, 28 Feb 2006 15:48:43 +0000 (+0000) Subject: only run shader on active fragments in the span X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=176dac684a65d9140d3f1ce4d3bd4220ff5b653f;p=mesa.git only run shader on active fragments in the span --- diff --git a/src/mesa/swrast/s_arbshader.c b/src/mesa/swrast/s_arbshader.c index e17e799100e..c915b97d6ec 100644 --- a/src/mesa/swrast/s_arbshader.c +++ b/src/mesa/swrast/s_arbshader.c @@ -46,6 +46,8 @@ void _swrast_exec_arbshader (GLcontext *ctx, struct sw_span *span) for (i = span->start; i < span->end; i++) { + /* only run shader on active fragments */ + if (span->array->mask[i]) { GLfloat vec[4]; GLuint j; GLboolean discard; @@ -89,6 +91,7 @@ void _swrast_exec_arbshader (GLcontext *ctx, struct sw_span *span) UNCLAMPED_FLOAT_TO_CHAN(span->array->rgba[i][BCOMP], vec[2]); UNCLAMPED_FLOAT_TO_CHAN(span->array->rgba[i][ACOMP], vec[3]); } + } } }