summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_private.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-10-10 17:43:59 -0600
committerBrian Paul <[email protected]>2011-10-11 07:41:22 -0600
commite6c237cfd6f53ff569f68255d5d6da15148cd0f5 (patch)
treeabadc1875c9980c465e4fcc1c6fcf9511c9624e1 /src/gallium/auxiliary/draw/draw_private.h
parentf0c036536f5acea90f12130dc712ea6b97d488b6 (diff)
draw/llvm: fix hard-coded number of total clip planes
Instead of 12 use DRAW_TOTAL_CLIP_PLANES. The max number of user-defined clip planes was increased to 8 so the total number of planes is 14. This doesn't fix any specific bug, but clearly the old code was wrong. Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_private.h')
-rw-r--r--src/gallium/auxiliary/draw/draw_private.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h
index ef772660f71..b84d2b77179 100644
--- a/src/gallium/auxiliary/draw/draw_private.h
+++ b/src/gallium/auxiliary/draw/draw_private.h
@@ -52,6 +52,10 @@ struct draw_llvm;
#endif
+/** Sum of frustum planes and user-defined planes */
+#define DRAW_TOTAL_CLIP_PLANES (6 + PIPE_MAX_CLIP_PLANES)
+
+
struct pipe_context;
struct draw_vertex_shader;
struct draw_context;
@@ -66,9 +70,9 @@ struct tgsi_sampler;
* Carry some useful information around with the vertices in the prim pipe.
*/
struct vertex_header {
- unsigned clipmask:12;
+ unsigned clipmask:DRAW_TOTAL_CLIP_PLANES;
unsigned edgeflag:1;
- unsigned pad:3;
+ unsigned pad:1;
unsigned vertex_id:16;
float clip[4];
@@ -179,7 +183,7 @@ struct draw_context
unsigned gs_constants_size[PIPE_MAX_CONSTANT_BUFFERS];
/* pointer to planes */
- float (*planes)[12][4];
+ float (*planes)[DRAW_TOTAL_CLIP_PLANES][4];
} user;
boolean test_fse; /* enable FSE even though its not correct (eg for softpipe) */
@@ -277,7 +281,7 @@ struct draw_context
/* Clip derived state:
*/
- float plane[12][4];
+ float plane[DRAW_TOTAL_CLIP_PLANES][4];
unsigned nr_planes;
boolean depth_clamp;