summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_pipe_wide_line.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-06-11 23:48:13 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2008-06-11 23:48:45 +0100
commit2161b0fafcdc16703162dd489d2ec1e7114cce4c (patch)
tree4e192f064c7416c9fb59012d586d1fc87afdf877 /src/gallium/auxiliary/draw/draw_pipe_wide_line.c
parent807f8f177b3a2833806d84a70e71019f8849239f (diff)
draw: don't assume vertex position is in data[0]
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_wide_line.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_wide_line.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_wide_line.c b/src/gallium/auxiliary/draw/draw_pipe_wide_line.c
index 878c9c7169..29649f5787 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_wide_line.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_wide_line.c
@@ -58,6 +58,7 @@ static void wideline_line( struct draw_stage *stage,
struct prim_header *header )
{
/*const struct wideline_stage *wide = wideline_stage(stage);*/
+ const unsigned pos = stage->draw->vs.position_output;
const float half_width = 0.5f * stage->draw->rasterizer->line_width;
struct prim_header tri;
@@ -67,10 +68,10 @@ static void wideline_line( struct draw_stage *stage,
struct vertex_header *v2 = dup_vert(stage, header->v[1], 2);
struct vertex_header *v3 = dup_vert(stage, header->v[1], 3);
- float *pos0 = v0->data[0];
- float *pos1 = v1->data[0];
- float *pos2 = v2->data[0];
- float *pos3 = v3->data[0];
+ float *pos0 = v0->data[pos];
+ float *pos1 = v1->data[pos];
+ float *pos2 = v2->data[pos];
+ float *pos3 = v3->data[pos];
const float dx = FABSF(pos0[0] - pos2[0]);
const float dy = FABSF(pos0[1] - pos2[1]);