summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_pipe_wide_point.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_point.c
parent807f8f177b3a2833806d84a70e71019f8849239f (diff)
draw: don't assume vertex position is in data[0]
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_wide_point.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_wide_point.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
index df92e3f2d0..d40a07f4ae 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
@@ -96,6 +96,7 @@ static void widepoint_point( struct draw_stage *stage,
struct prim_header *header )
{
const struct widepoint_stage *wide = widepoint_stage(stage);
+ const unsigned pos = stage->draw->vs.position_output;
const boolean sprite = (boolean) stage->draw->rasterizer->point_sprite;
float half_size;
float left_adj, right_adj, bot_adj, top_adj;
@@ -108,10 +109,10 @@ static void widepoint_point( struct draw_stage *stage,
struct vertex_header *v2 = dup_vert(stage, header->v[0], 2);
struct vertex_header *v3 = dup_vert(stage, header->v[0], 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];
/* point size is either per-vertex or fixed size */
if (wide->psize_slot >= 0) {