summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_private.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-01-04 11:52:30 +0000
committerDave Airlie <airlied@redhat.com>2012-01-11 07:13:35 +0000
commit40c5987ed84f9f0b8bb1f707bb13c1aafc39330a (patch)
tree0614696dcf1b6b8f1886920b3520e38f66dcc3f3 /src/gallium/auxiliary/draw/draw_private.h
parent34a78b7ef6b0edf217acf221eab4b63542be5552 (diff)
downloadexternal_mesa3d-40c5987ed84f9f0b8bb1f707bb13c1aafc39330a.zip
external_mesa3d-40c5987ed84f9f0b8bb1f707bb13c1aafc39330a.tar.gz
external_mesa3d-40c5987ed84f9f0b8bb1f707bb13c1aafc39330a.tar.bz2
draw/softpipe: add clip vertex support. (v2)
softpipe always clipped using the position vector, however for unclipped vertices it stored the position in window coordinates, however when position and clipping are separated, we need to store the clip-space position and the clip-space vertex clip, so we can interpolate both separately. This means we have to take the clip space position and store it to use later. This allows softpipe to pass all the clip-vertex piglit tests. v2: fix llvm draw regression, the structure being passed into llvm needed updating, remove some hardcoded ints that should have been enums while there. 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.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h
index 91112eb..aa9b602 100644
--- a/src/gallium/auxiliary/draw/draw_private.h
+++ b/src/gallium/auxiliary/draw/draw_private.h
@@ -76,6 +76,7 @@ struct vertex_header {
unsigned vertex_id:16;
float clip[4];
+ float pre_clip_pos[4];
/* This will probably become float (*data)[4] soon:
*/
@@ -230,6 +231,7 @@ struct draw_context
uint num_vs_outputs; /**< convenience, from vertex_shader */
uint position_output;
uint edgeflag_output;
+ uint clipvertex_output;
/** TGSI program interpreter runtime state */
struct tgsi_exec_machine *machine;
@@ -378,7 +380,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);
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);