diff options
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_quad_alpha_test.c')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_alpha_test.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mesa/pipe/softpipe/sp_quad_alpha_test.c b/src/mesa/pipe/softpipe/sp_quad_alpha_test.c index 6a9cf29e47..7b56bceba2 100644 --- a/src/mesa/pipe/softpipe/sp_quad_alpha_test.c +++ b/src/mesa/pipe/softpipe/sp_quad_alpha_test.c @@ -16,6 +16,7 @@ alpha_test_quad(struct quad_stage *qs, struct quad_header *quad) struct softpipe_context *softpipe = qs->softpipe; const float ref = softpipe->alpha_test->ref; unsigned passMask = 0x0, j; + const float *aaaa = quad->outputs.color[3]; switch (softpipe->alpha_test->func) { case PIPE_FUNC_NEVER: @@ -27,42 +28,42 @@ alpha_test_quad(struct quad_stage *qs, struct quad_header *quad) * passMask = (quad->outputs.color[3] <= vec4(ref)); */ for (j = 0; j < QUAD_SIZE; j++) { - if (quad->outputs.color[3][j] < ref) { + if (aaaa[j] < ref) { passMask |= (1 << j); } } break; case PIPE_FUNC_EQUAL: for (j = 0; j < QUAD_SIZE; j++) { - if (quad->outputs.color[3][j] == ref) { + if (aaaa[j] == ref) { passMask |= (1 << j); } } break; case PIPE_FUNC_LEQUAL: for (j = 0; j < QUAD_SIZE; j++) { - if (quad->outputs.color[3][j] <= ref) { + if (aaaa[j] <= ref) { passMask |= (1 << j); } } break; case PIPE_FUNC_GREATER: for (j = 0; j < QUAD_SIZE; j++) { - if (quad->outputs.color[3][j] > ref) { + if (aaaa[j] > ref) { passMask |= (1 << j); } } break; case PIPE_FUNC_NOTEQUAL: for (j = 0; j < QUAD_SIZE; j++) { - if (quad->outputs.color[3][j] != ref) { + if (aaaa[j] != ref) { passMask |= (1 << j); } } break; case PIPE_FUNC_GEQUAL: for (j = 0; j < QUAD_SIZE; j++) { - if (quad->outputs.color[3][j] >= ref) { + if (aaaa[j] >= ref) { passMask |= (1 << j); } } |