From 0e4c321c15823b9e44598f0268ee8d69a07bd9d5 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 31 Mar 2019 04:26:48 +0000 Subject: [PATCH] panfrost: Clean index state between indexed draws Fixes subsequent tests in dEQP-GLES2.functional.draw.draw_elements.indices.* Signed-off-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/pan_context.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 65019f8566e..973b9c6ae93 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -1452,6 +1452,9 @@ panfrost_draw_vbo( ctx->payload_tiler.prefix.unknown_draw &= ~(0x3000 | 0x18000); ctx->payload_tiler.prefix.unknown_draw |= (mode == PIPE_PRIM_POINTS || ctx->vertex_count > 65535) ? 0x3000 : 0x18000; + /* Clean index state */ + ctx->payload_tiler.prefix.unknown_draw &= ~MALI_DRAW_INDEXED_UINT32; + if (info->index_size) { /* Calculate the min/max index used so we can figure out how * many times to invoke the vertex shader */ @@ -1500,7 +1503,6 @@ panfrost_draw_vbo( ctx->payload_tiler.prefix.index_count = MALI_POSITIVE(ctx->vertex_count); /* Reverse index state */ - ctx->payload_tiler.prefix.unknown_draw &= ~MALI_DRAW_INDEXED_UINT32; ctx->payload_tiler.prefix.indices = (uintptr_t) NULL; } -- 2.30.2