diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2008-06-11 23:48:13 +0100 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2008-06-11 23:48:45 +0100 |
commit | 2161b0fafcdc16703162dd489d2ec1e7114cce4c (patch) | |
tree | 4e192f064c7416c9fb59012d586d1fc87afdf877 /src/gallium/auxiliary/draw/draw_pipe_cull.c | |
parent | 807f8f177b3a2833806d84a70e71019f8849239f (diff) |
draw: don't assume vertex position is in data[0]
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_cull.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_cull.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_cull.c b/src/gallium/auxiliary/draw/draw_pipe_cull.c index 87aaf1f85b..d0d22a38e0 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_cull.c +++ b/src/gallium/auxiliary/draw/draw_pipe_cull.c @@ -55,10 +55,12 @@ static INLINE struct cull_stage *cull_stage( struct draw_stage *stage ) static void cull_tri( struct draw_stage *stage, struct prim_header *header ) { + const unsigned pos = stage->draw->vs.position_output; + /* Window coords: */ - const float *v0 = header->v[0]->data[0]; - const float *v1 = header->v[1]->data[0]; - const float *v2 = header->v[2]->data[0]; + const float *v0 = header->v[0]->data[pos]; + const float *v1 = header->v[1]->data[pos]; + const float *v2 = header->v[2]->data[pos]; /* edge vectors e = v0 - v2, f = v1 - v2 */ const float ex = v0[0] - v2[0]; |