draw: emit so primitives before ending empty pipeline.
authorDave Airlie <airlied@redhat.com>
Fri, 19 Jun 2020 04:37:19 +0000 (14:37 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 7 Jul 2020 20:06:04 +0000 (06:06 +1000)
There may be non-stream 0 emitted primitives that have to be processed.

Fixes:
KHR-GL42.transform_feedback_overflow_query_ARB.multiple-streams-one-buffer-per-stream
KHR-GL42.transform_feedback_overflow_query_ARB.multiple-streams-multiple-buffers-per-stream

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5555>

src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c

index d403e81c224d0d7f60a8035f9b27720b2174819b..d9a5862e4428ca1012f7bfa03c3cf4903bbdc5ac 100644 (file)
@@ -722,6 +722,10 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle,
          }
       }
    }
+
+   /* stream output needs to be done before clipping */
+   draw_pt_so_emit( fpme->so_emit, gshader ? gshader->num_vertex_streams : 1, vert_info, prim_info );
+
    if (prim_info->count == 0) {
       debug_printf("GS/IA didn't emit any vertices!\n");
 
@@ -733,9 +737,6 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle,
       return;
    }
 
-   /* stream output needs to be done before clipping */
-   draw_pt_so_emit( fpme->so_emit, gshader ? gshader->num_vertex_streams : 1, vert_info, prim_info );
-
    draw_stats_clipper_primitives(draw, prim_info);
 
    /*