mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
only run shader on active fragments in the span
This commit is contained in:
parent
34b60b001d
commit
176dac684a
1 changed files with 3 additions and 0 deletions
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue