gallivm/nir: end primitive for all streams.
authorDave Airlie <airlied@redhat.com>
Fri, 19 Jun 2020 05:03:25 +0000 (15:03 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 7 Jul 2020 20:06:05 +0000 (06:06 +1000)
Call the end primitive for all streams so it can be accounted properly

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 7da701f06d8244d1974f1ddea4e9ed75417d4b88..a363571a2cd015bcf51fd4ecf38cf46c87f5c304 100644 (file)
@@ -1634,10 +1634,9 @@ end_primitive_masked(struct lp_build_nir_context * bld_base,
                                             emitted_vertices_vec,
                                             uint_bld->zero);
    mask = LLVMBuildAnd(builder, mask, emitted_mask, "");
-   if (stream_id == 0)
-      bld->gs_iface->end_primitive(bld->gs_iface, &bld->bld_base.base,
-                                   total_emitted_vertices_vec,
-                                   emitted_vertices_vec, emitted_prims_vec, mask, 0);
+   bld->gs_iface->end_primitive(bld->gs_iface, &bld->bld_base.base,
+                               total_emitted_vertices_vec,
+                               emitted_vertices_vec, emitted_prims_vec, mask, stream_id);
    increment_vec_ptr_by_mask(bld_base, bld->emitted_prims_vec_ptr[stream_id],
                              mask);
    clear_uint_vec_ptr_from_mask(bld_base, bld->emitted_vertices_vec_ptr[stream_id],