summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_rast.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-12-16 16:02:59 -0700
committerBrian Paul <[email protected]>2009-12-16 16:10:05 -0700
commitab9438193083b7f9a3180cb9cea45e269131048a (patch)
tree56affd185611182349f1db88cc2a49aa7d431e08 /src/gallium/drivers/llvmpipe/lp_rast.h
parente288796c92bb7d75cd6dfee968804c6230ef38d7 (diff)
llvmpipe: do final the pixel in/out triangle test in the fragment shader
The test to determine which of the pixels in a 2x2 quad is now done in the fragment shader rather than in the calling C code. This is a little faster but there's a few more things to do. Note that the step[] array elements are in a different order now. Rather than being in row-major order for the 4x4 grid, they're in "quad-major" order. The setup of the step arrays is a little more complicated now. So is the course/intermediate tile test code, but some lookup tables help with that. Next steps: - early-cull 2x2 quads which are totally outside the triangle. - skip the in/out test for fully contained quads - make the in/out comparison code tighter/faster.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h
index 2dd0193d8dc..46e22f69a61 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast.h
@@ -80,6 +80,9 @@ struct lp_rast_shader_inputs {
float (*a0)[4];
float (*dadx)[4];
float (*dady)[4];
+
+ /* edge/step info for 3 edges and 4x4 block of pixels */
+ int ALIGN16_ATTRIB step[3][16];
};
@@ -117,14 +120,10 @@ struct lp_rast_triangle {
int dx31;
/* edge function values at minx,miny ?? */
- int c1;
- int c2;
- int c3;
-
- int step[3][16];
+ int c1, c2, c3;
/* inputs for the shader */
- struct lp_rast_shader_inputs inputs;
+ struct lp_rast_shader_inputs ALIGN16_ATTRIB inputs;
};