diff options
author | Dave Airlie <[email protected]> | 2012-01-06 12:23:00 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2012-01-11 08:20:11 +0000 |
commit | 1865f341d8f45b389061fc08d2da90b7aa8a6099 (patch) | |
tree | dbe427bbb19465398d3c62f4f0d9b58e30728c3e /src/gallium/auxiliary/draw/draw_private.h | |
parent | f7e3e46f72fffe4b83cd3f922173ff28e9ab9c7c (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_private.h')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_private.h | 5 |
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 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); |