From ac5523a9c31efbb89e58ef99da47b0d81a21409c Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 3 Jul 2007 17:31:59 -0600 Subject: SIMD comments --- src/mesa/pipe/softpipe/sp_quad_alpha_test.c | 4 ++++ src/mesa/pipe/softpipe/sp_quad_depth_test.c | 1 + 2 files changed, 5 insertions(+) diff --git a/src/mesa/pipe/softpipe/sp_quad_alpha_test.c b/src/mesa/pipe/softpipe/sp_quad_alpha_test.c index 0059b3abf4..e0f7225d74 100644 --- a/src/mesa/pipe/softpipe/sp_quad_alpha_test.c +++ b/src/mesa/pipe/softpipe/sp_quad_alpha_test.c @@ -23,6 +23,10 @@ alpha_test_quad(struct quad_stage *qs, struct quad_header *quad) quad->mask = 0x0; break; case PIPE_FUNC_LESS: + /* + * If quad->mask were an array [4] we could do this SIMD-style: + * quad->mask &= (quad->outputs.color[3] <= vec4(ref)); + */ for (j = 0; j < QUAD_SIZE; j++) { if (quad->mask & (1 << j)) { if (quad->outputs.color[3][j] >= ref) { diff --git a/src/mesa/pipe/softpipe/sp_quad_depth_test.c b/src/mesa/pipe/softpipe/sp_quad_depth_test.c index b72bbac0d4..fcd6a22e1d 100644 --- a/src/mesa/pipe/softpipe/sp_quad_depth_test.c +++ b/src/mesa/pipe/softpipe/sp_quad_depth_test.c @@ -54,6 +54,7 @@ depth_test_quad(struct quad_stage *qs, struct quad_header *quad) break; case PIPE_FUNC_LESS: /* Note this is pretty much a single sse or cell instruction. + * Like this: quad->mask &= (quad->outputs.depth < zzzz); */ for (j = 0; j < QUAD_SIZE; j++) { if (quad->outputs.depth[j] < zzzz[j]) -- cgit v1.2.3