draw/gs: fix up current verts in output fetching.
authorDave Airlie <airlied@redhat.com>
Fri, 19 Jun 2020 04:44:59 +0000 (14:44 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 7 Jul 2020 20:06:05 +0000 (06:06 +1000)
This was wrong since I added multi-stream support in
draw/gs: track emitted prims + verts 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_gs.c

index fd393ded62879adc6d6a3fe26ef9ae716e692881..b87e5d35f80cda54cb44b333e213bdd72c6a209e 100644 (file)
@@ -336,7 +336,7 @@ llvm_fetch_gs_outputs(struct draw_geometry_shader *shader,
 
    output_ptr += shader->stream[stream].emitted_vertices * shader->vertex_size;
    for (i = 0; i < shader->vector_length - 1; ++i) {
-      int current_verts = shader->llvm_emitted_vertices[i];
+      int current_verts = shader->llvm_emitted_vertices[i + (stream * shader->vector_length)];
       int next_verts = shader->llvm_emitted_vertices[i + 1 + (stream * shader->vector_length)];
 #if 0
       int j;