summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-06-23 18:06:52 +0100
committerKeith Whitwell <keithw@vmware.com>2010-06-23 18:10:20 +0100
commit64682da8ab7aff7b4ce651db99a32ed1fd8b178c (patch)
treea216f21f6caa1628c7b25defd5a19a777226725c /src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c
parent292eecca8c4284cbb343d954b76586fcaa26de2a (diff)
draw: don't try to precalculate the pipeline output primitive
We were previously calculating a value which was either the geometry shader output primitive or the application's input primitive, and passing that to the various front/middle/back components for use as the ultimate rendering primtive. Unfortunately, this was not correct -- if the vcache decomposition path is active and geometry shaders are *not* active, we can end up with a third primitive -- specifically the decomposed version of the input primitive. Rather than trying to precalculate this, just let the individual components inform their successors about which primitive type they are recieving.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c
index 7d2de58e73..774fb7bf7a 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c
@@ -49,7 +49,6 @@ struct llvm_middle_end {
unsigned vertex_data_offset;
unsigned vertex_size;
unsigned input_prim;
- unsigned output_prim;
unsigned opt;
struct draw_llvm *llvm;
@@ -62,7 +61,6 @@ struct llvm_middle_end {
static void
llvm_middle_end_prepare( struct draw_pt_middle_end *middle,
unsigned in_prim,
- unsigned out_prim,
unsigned opt,
unsigned *max_vertices )
{
@@ -74,6 +72,11 @@ llvm_middle_end_prepare( struct draw_pt_middle_end *middle,
unsigned i;
unsigned instance_id_index = ~0;
+
+ unsigned out_prim = (draw->gs.geometry_shader ?
+ draw->gs.geometry_shader->output_primitive :
+ in_prim);
+
/* Add one to num_outputs because the pipeline occasionally tags on
* an additional texcoord, eg for AA lines.
*/
@@ -90,7 +93,6 @@ llvm_middle_end_prepare( struct draw_pt_middle_end *middle,
}
fpme->input_prim = in_prim;
- fpme->output_prim = out_prim;
fpme->opt = opt;
/* Always leave room for the vertex header whether we need it or