diff options
| author | Zack Rusin <zackr@vmware.com> | 2013-08-09 10:11:31 -0400 |
|---|---|---|
| committer | Zack Rusin <zackr@vmware.com> | 2013-08-14 18:23:35 -0400 |
| commit | a3ae5dc7dd5c2f8893f86a920247e690e550ebd4 (patch) | |
| tree | 0c8ab07edf93210be4d0f20e95886b206c927e52 /src/gallium/auxiliary/draw/draw_pipe_aaline.c | |
| parent | 98d2498404ba69a3efc1c765b1a1885d151181ed (diff) | |
| download | external_mesa3d-a3ae5dc7dd5c2f8893f86a920247e690e550ebd4.tar.gz external_mesa3d-a3ae5dc7dd5c2f8893f86a920247e690e550ebd4.tar.bz2 external_mesa3d-a3ae5dc7dd5c2f8893f86a920247e690e550ebd4.zip | |
draw: make sure that the stages setup outputs
Calling the prepare outputs cleans up the slot assignments
for outputs, unfortunately aapoint and aaline didn't have
code to reset their slots after the initial setup, this
was messing up our slot assignments. The unfilled stage
was just missing the initial assignment of the face slot.
This fixes all of the reported piglit failures.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_aaline.c')
| -rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_aaline.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_aaline.c b/src/gallium/auxiliary/draw/draw_pipe_aaline.c index aa884596b3..c44c236bc5 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_aaline.c +++ b/src/gallium/auxiliary/draw/draw_pipe_aaline.c @@ -692,13 +692,7 @@ aaline_first_line(struct draw_stage *stage, struct prim_header *header) return; } - /* update vertex attrib info */ - aaline->pos_slot = draw_current_shader_position_output(draw);; - - /* allocate the extra post-transformed vertex attribute */ - aaline->tex_slot = draw_alloc_extra_vertex_attrib(draw, - TGSI_SEMANTIC_GENERIC, - aaline->fs->generic_attrib); + draw_aaline_prepare_outputs(draw, draw->pipeline.aaline); /* how many samplers? */ /* we'll use sampler/texture[pstip->sampler_unit] for the stipple */ @@ -953,6 +947,25 @@ aaline_set_sampler_views(struct pipe_context *pipe, } +void +draw_aaline_prepare_outputs(struct draw_context *draw, + struct draw_stage *stage) +{ + struct aaline_stage *aaline = aaline_stage(stage); + const struct pipe_rasterizer_state *rast = draw->rasterizer; + + /* update vertex attrib info */ + aaline->pos_slot = draw_current_shader_position_output(draw);; + + if (!rast->line_smooth) + return; + + /* allocate the extra post-transformed vertex attribute */ + aaline->tex_slot = draw_alloc_extra_vertex_attrib(draw, + TGSI_SEMANTIC_GENERIC, + aaline->fs->generic_attrib); +} + /** * Called by drivers that want to install this AA line prim stage * into the draw module's pipeline. This will not be used if the |
