summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_pipe_aaline.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2011-09-23 19:55:47 +0100
committerJosé Fonseca <jfonseca@vmware.com>2011-09-25 11:04:31 +0100
commit102bf6e2a70f565f03d5e9c4995b29d61c0aa165 (patch)
tree23467d880e597168f725bd040bb801cd07750745 /src/gallium/auxiliary/draw/draw_pipe_aaline.c
parentfc31f9a3f255c5565ce2a3e9c73415bc17199e28 (diff)
downloadexternal_mesa3d-102bf6e2a70f565f03d5e9c4995b29d61c0aa165.tar.gz
external_mesa3d-102bf6e2a70f565f03d5e9c4995b29d61c0aa165.tar.bz2
external_mesa3d-102bf6e2a70f565f03d5e9c4995b29d61c0aa165.zip
draw: Never allocate duplicate extra vertex attribs.
Prevents mismatches when the VS outputs generic attributes not used by the FS. Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_aaline.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_aaline.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_aaline.c b/src/gallium/auxiliary/draw/draw_pipe_aaline.c
index 7ecd2aa3f4..0b368da674 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_aaline.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_aaline.c
@@ -374,7 +374,9 @@ generate_aaline_fs(struct aaline_stage *aaline)
newLen, &transform.base);
#if 0 /* DEBUG */
+ debug_printf("draw_aaline, orig shader:\n");
tgsi_dump(orig_fs->tokens, 0);
+ debug_printf("draw_aaline, new shader:\n");
tgsi_dump(aaline_fs.tokens, 0);
#endif
@@ -692,12 +694,12 @@ aaline_first_line(struct draw_stage *stage, struct prim_header *header)
}
/* update vertex attrib info */
- aaline->tex_slot = draw_current_shader_outputs(draw);
aaline->pos_slot = draw_current_shader_position_output(draw);;
/* allocate the extra post-transformed vertex attribute */
- (void) draw_alloc_extra_vertex_attrib(draw, TGSI_SEMANTIC_GENERIC,
- aaline->fs->generic_attrib);
+ aaline->tex_slot = draw_alloc_extra_vertex_attrib(draw,
+ TGSI_SEMANTIC_GENERIC,
+ aaline->fs->generic_attrib);
/* how many samplers? */
/* we'll use sampler/texture[pstip->sampler_unit] for the stipple */