diff options
author | José Fonseca <[email protected]> | 2012-11-15 20:35:20 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2012-12-04 19:35:18 +0000 |
commit | 32e899ab8b3e0cc717c740e95e05f5e9d11e8224 (patch) | |
tree | fef13ad8238e18646d01737aa234860e7e4433c6 /src/gallium | |
parent | b636204ae82768f561f8b7f3e6e70eb982bbac1f (diff) |
draw: Consider the geometry shader when choosing the vertex size.
A single vertex size is chosen for the whole pipeline. So the number of
geometry shader outputs must also be taken in consideration.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c index 27420f06798..053ea7db729 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c @@ -59,12 +59,11 @@ static void fetch_pipeline_prepare( struct draw_pt_middle_end *middle, struct fetch_pipeline_middle_end *fpme = (struct fetch_pipeline_middle_end *)middle; struct draw_context *draw = fpme->draw; struct draw_vertex_shader *vs = draw->vs.vertex_shader; + struct draw_geometry_shader *gs = draw->gs.geometry_shader; unsigned i; unsigned instance_id_index = ~0; - unsigned gs_out_prim = (draw->gs.geometry_shader ? - draw->gs.geometry_shader->output_primitive : - prim); + unsigned gs_out_prim = (gs ? gs->output_primitive : prim); /* Add one to num_outputs because the pipeline occasionally tags on * an additional texcoord, eg for AA lines. @@ -72,6 +71,10 @@ static void fetch_pipeline_prepare( struct draw_pt_middle_end *middle, unsigned nr = MAX2( vs->info.num_inputs, vs->info.num_outputs + 1 ); + if (gs) { + nr = MAX2(nr, gs->info.num_outputs + 1); + } + /* Scan for instanceID system value. */ for (i = 0; i < vs->info.num_inputs; i++) { |