Mesa (master): panfrost: Clean index state between indexed draws

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Mar 31 04:43:10 UTC 2019


Module: Mesa
Branch: master
Commit: 0e4c321c15823b9e44598f0268ee8d69a07bd9d5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0e4c321c15823b9e44598f0268ee8d69a07bd9d5

Author: Alyssa Rosenzweig <alyssa at rosenzweig.io>
Date:   Sun Mar 31 04:26:48 2019 +0000

panfrost: Clean index state between indexed draws

Fixes subsequent tests in
dEQP-GLES2.functional.draw.draw_elements.indices.*

Signed-off-by: Alyssa Rosenzweig <alyssa at rosenzweig.io>

---

 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;
         }
 




More information about the mesa-commit mailing list