From 1865f341d8f45b389061fc08d2da90b7aa8a6099 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 6 Jan 2012 12:23:00 +0000 Subject: 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 --- src/gallium/auxiliary/draw/draw_private.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gallium/auxiliary/draw/draw_private.h') diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h index aa9b602a353..31beb4b98e3 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); -- cgit v1.2.3