diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2006-02-28 15:48:43 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2006-02-28 15:48:43 +0000 |
commit | 176dac684a65d9140d3f1ce4d3bd4220ff5b653f (patch) | |
tree | c0152fbf2d1c9fb4008763964fb103dbcf796053 | |
parent | 34b60b001de080643aa5b7c9e0145b98b5653ed1 (diff) |
only run shader on active fragments in the span
-rw-r--r-- | src/mesa/swrast/s_arbshader.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_arbshader.c b/src/mesa/swrast/s_arbshader.c index e17e799100..c915b97d6e 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]);
}
+ }
}
}
|