gallivm/nir: call end prim at end on all GS streams.
authorDave Airlie <airlied@redhat.com>
Thu, 26 Mar 2020 06:18:27 +0000 (16:18 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 7 Jul 2020 20:06:04 +0000 (06:06 +1000)
Fixes: KHR-GL45.transform_feedback.draw_xfb_stream_test
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5555>

src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c

index 22ac493d2e3f2c8d1e081f164b6bc4df0c79b1e5..1a28e21f457d8cd883be875f2842a631157d1839 100644 (file)
@@ -1904,8 +1904,9 @@ void lp_build_nir_soa(struct gallivm_state *gallivm,
       LLVMValueRef total_emitted_vertices_vec;
       LLVMValueRef emitted_prims_vec;
 
-      end_primitive_masked(&bld.bld_base, lp_build_mask_value(bld.mask), 0);
       for (int i = 0; i < PIPE_MAX_VERTEX_STREAMS; i++) {
+         end_primitive_masked(&bld.bld_base, lp_build_mask_value(bld.mask), i);
+
          total_emitted_vertices_vec =
             LLVMBuildLoad(builder, bld.total_emitted_vertices_vec_ptr[i], "");