panfrost: Fix indexed draws
authorBoris Brezillon <boris.brezillon@collabora.com>
Wed, 18 Sep 2019 13:22:24 +0000 (15:22 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Mon, 23 Sep 2019 07:47:41 +0000 (09:47 +0200)
->padded_count should be large enough to cover all vertices pointed by
the index array. Use the local vertex_count variable that contains the
updated vertex_count value for the indexed draw case.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_context.c

index 08b799b66bf837501663768dc0301bb499f40347..1b8558c1c2c14900f2594e0735605126b86b76c4 100644 (file)
@@ -1601,7 +1601,7 @@ panfrost_draw_vbo(
 
                 ctx->padded_count = pan_expand_shift_odd(so);
         } else {
-                ctx->padded_count = ctx->vertex_count;
+                ctx->padded_count = vertex_count;
 
                 /* Reset instancing state */
                 ctx->payloads[PIPE_SHADER_VERTEX].instance_shift = 0;