summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2013-03-02 02:49:28 +0100
committerRoland Scheidegger <[email protected]>2013-03-02 02:54:31 +0100
commitea8b2ae8a50432a8dd51f144f4b981c592254de8 (patch)
tree7fee8869382441c49a8dd93eab55651b403385aa /src/gallium/auxiliary/draw
parentde0593e33346609d85b8ab9f9f40d0b91171c1dd (diff)
draw: fix no position output in non-llvm pipeline.
It seems easiest (and best) if we simply skip all the later stages (after stream output). (This is different to the llvm case at least for now where we will simply try to render garbage, though both behaviors should be correct.) Fixes piglit glsl-1.40-tf-no-position with softpipe. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c38
1 files changed, 19 insertions, 19 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 2fc82204528..45d964da4fa 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
@@ -284,27 +284,27 @@ static void fetch_pipeline_generic( struct draw_pt_middle_end *middle,
* XXX: Stream output surely needs to respect the prim_info->elt
* lists.
*/
- draw_pt_so_emit( fpme->so_emit,
- vert_info,
- prim_info );
-
- if (draw_pt_post_vs_run( fpme->post_vs,
- vert_info ))
- {
- opt |= PT_PIPELINE;
- }
+ draw_pt_so_emit( fpme->so_emit, vert_info, prim_info );
- /* Do we need to run the pipeline?
+ /*
+ * if there's no position, need to stop now, or the latter stages
+ * will try to access non-existent position output.
*/
- if (opt & PT_PIPELINE) {
- pipeline( fpme,
- vert_info,
- prim_info );
- }
- else {
- emit( fpme->emit,
- vert_info,
- prim_info );
+ if (draw_current_shader_position_output(draw) != -1) {
+
+ if (draw_pt_post_vs_run( fpme->post_vs, vert_info ))
+ {
+ opt |= PT_PIPELINE;
+ }
+
+ /* Do we need to run the pipeline?
+ */
+ if (opt & PT_PIPELINE) {
+ pipeline( fpme, vert_info, prim_info );
+ }
+ else {
+ emit( fpme->emit, vert_info, prim_info );
+ }
}
FREE(vert_info->verts);
}