From 7d82bb0e41dbfb706d86c030779de31316f8cd7e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 19 Jun 2020 14:37:19 +1000 Subject: [PATCH] draw: emit so primitives before ending empty pipeline. 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 Part-of: --- .../auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c | 7 ++++--- 1 file changed, 4 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 d403e81c224..d9a5862e442 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 @@ -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); /* -- 2.30.2