summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_private.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-01-06 12:23:00 +0000
committerDave Airlie <airlied@redhat.com>2012-01-11 08:20:11 +0000
commit1865f341d8f45b389061fc08d2da90b7aa8a6099 (patch)
treedbe427bbb19465398d3c62f4f0d9b58e30728c3e /src/gallium/auxiliary/draw/draw_private.h
parentf7e3e46f72fffe4b83cd3f922173ff28e9ab9c7c (diff)
downloadexternal_mesa3d-1865f341d8f45b389061fc08d2da90b7aa8a6099.zip
external_mesa3d-1865f341d8f45b389061fc08d2da90b7aa8a6099.tar.gz
external_mesa3d-1865f341d8f45b389061fc08d2da90b7aa8a6099.tar.bz2
draw: clipdistance support (v2)
Add support for using the clipdistance instead of clip plane. Passes all piglit clipdistance tests. v2: fixup some comments from Brian in review. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_private.h')
-rw-r--r--src/gallium/auxiliary/draw/draw_private.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h
index aa9b602..31beb4b 100644
--- a/src/gallium/auxiliary/draw/draw_private.h
+++ b/src/gallium/auxiliary/draw/draw_private.h
@@ -72,7 +72,7 @@ struct tgsi_sampler;
struct vertex_header {
unsigned clipmask:DRAW_TOTAL_CLIP_PLANES;
unsigned edgeflag:1;
- unsigned pad:1;
+ unsigned have_clipdist:1;
unsigned vertex_id:16;
float clip[4];
@@ -232,7 +232,7 @@ struct draw_context
uint position_output;
uint edgeflag_output;
uint clipvertex_output;
-
+ uint clipdistance_output[2];
/** TGSI program interpreter runtime state */
struct tgsi_exec_machine *machine;
@@ -381,6 +381,7 @@ void draw_gs_destroy( struct draw_context *draw );
uint draw_current_shader_outputs(const struct draw_context *draw);
uint draw_current_shader_position_output(const struct draw_context *draw);
uint draw_current_shader_clipvertex_output(const struct draw_context *draw);
+uint draw_current_shader_clipdistance_output(const struct draw_context *draw, int index);
int draw_alloc_extra_vertex_attrib(struct draw_context *draw,
uint semantic_name, uint semantic_index);
void draw_remove_extra_vertex_attribs(struct draw_context *draw);