summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe/sp_quad_alpha_test.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-04-07 21:59:12 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-04-07 21:59:12 -0600
commitc7daa68ca312cc98abe351be2fef8d8246929627 (patch)
treeafb31b40a34da809654bd7cef860d9f486fc1c9f /src/gallium/drivers/softpipe/sp_quad_alpha_test.c
parent4e2127b0e5cb6411123e16dd562626cd70814a9a (diff)
downloadexternal_mesa3d-c7daa68ca312cc98abe351be2fef8d8246929627.zip
external_mesa3d-c7daa68ca312cc98abe351be2fef8d8246929627.tar.gz
external_mesa3d-c7daa68ca312cc98abe351be2fef8d8246929627.tar.bz2
gallium: begin reworking quad stages for multiple color outputs
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_quad_alpha_test.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_quad_alpha_test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_quad_alpha_test.c b/src/gallium/drivers/softpipe/sp_quad_alpha_test.c
index 318916f..7a42b08 100644
--- a/src/gallium/drivers/softpipe/sp_quad_alpha_test.c
+++ b/src/gallium/drivers/softpipe/sp_quad_alpha_test.c
@@ -16,7 +16,8 @@ alpha_test_quad(struct quad_stage *qs, struct quad_header *quad)
struct softpipe_context *softpipe = qs->softpipe;
const float ref = softpipe->depth_stencil->alpha.ref;
unsigned passMask = 0x0, j;
- const float *aaaa = quad->outputs.color[3];
+ const uint cbuf = 0; /* only output[0].alpha is tested */
+ const float *aaaa = quad->outputs.color[cbuf][3];
switch (softpipe->depth_stencil->alpha.func) {
case PIPE_FUNC_NEVER:
@@ -25,7 +26,7 @@ alpha_test_quad(struct quad_stage *qs, struct quad_header *quad)
case PIPE_FUNC_LESS:
/*
* If mask were an array [4] we could do this SIMD-style:
- * passMask = (quad->outputs.color[3] <= vec4(ref));
+ * passMask = (quad->outputs.color[0][3] <= vec4(ref));
*/
for (j = 0; j < QUAD_SIZE; j++) {
if (aaaa[j] < ref) {