summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2013-03-02 02:29:22 +0100
committerRoland Scheidegger <[email protected]>2013-03-02 02:54:31 +0100
commitc7c7186045ec617c53f7899280cbe12e59503e4d (patch)
tree4af22a71438d14ff976e438c7dbdc1c35c4adf37
parentea8b2ae8a50432a8dd51f144f4b981c592254de8 (diff)
draw: additional fix for the no-position case with llvm
Similar fix to what is done for the non-llvm case, we could otherwise still hit the stages (near certainly with gs) which crash. It is probably a much better idea to skip trying to draw at that point anyway. Reviewed-by: Brian Paul <[email protected]>
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c40
1 files changed, 20 insertions, 20 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 b0c18ed14dc..687dfa40459 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
@@ -300,31 +300,31 @@ llvm_pipeline_generic( struct draw_pt_middle_end *middle,
FREE(vert_info->verts);
vert_info = &gs_vert_info;
prim_info = &gs_prim_info;
-
- clipped = draw_pt_post_vs_run( fpme->post_vs, vert_info );
-
}
/* stream output needs to be done before clipping */
- draw_pt_so_emit( fpme->so_emit,
- vert_info,
- prim_info );
-
- if (clipped) {
- opt |= PT_PIPELINE;
- }
+ draw_pt_so_emit( fpme->so_emit, vert_info, prim_info );
- /* Do we need to run the pipeline? Now will come here if clipped
+ /*
+ * 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 ((opt & PT_SHADE) && gshader) {
+ clipped = draw_pt_post_vs_run( fpme->post_vs, vert_info );
+ }
+ if (clipped) {
+ opt |= PT_PIPELINE;
+ }
+
+ /* Do we need to run the pipeline? Now will come here if clipped
+ */
+ if (opt & PT_PIPELINE) {
+ pipeline( fpme, vert_info, prim_info );
+ }
+ else {
+ emit( fpme->emit, vert_info, prim_info );
+ }
}
FREE(vert_info->verts);
}