diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-12-09 21:44:26 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-12-09 21:44:26 -0700 |
commit | 63e2ab83f6f3955c230bf71662136b34ff46dfe2 (patch) | |
tree | 39bd85bd9f74c56906e55dcabad89bb4871e6705 /src/mesa/pipe/softpipe/sp_quad_alpha_test.c | |
parent | 98848382731b71a51e4a80f1820f009e70f06a25 (diff) |
use quadColor local var
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); } } |