From 3525ad7c4531fc68d91e0cf08cda979fc747f850 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 2 Jun 2021 15:45:51 -0400 Subject: [PATCH] panfrost: Fix vertex image attribute overrun Images take a continuation record, don't scribble zeroes over. Signed-off-by: Alyssa Rosenzweig Fixes: dc85f65e059 ("panfrost: emit shader image attribute descriptors") Part-of: --- src/gallium/drivers/panfrost/ci/deqp-panfrost-g52-fails.txt | 2 -- src/gallium/drivers/panfrost/pan_cmdstream.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gallium/drivers/panfrost/ci/deqp-panfrost-g52-fails.txt b/src/gallium/drivers/panfrost/ci/deqp-panfrost-g52-fails.txt index 0e6c1c8704d..e69de29bb2d 100644 --- a/src/gallium/drivers/panfrost/ci/deqp-panfrost-g52-fails.txt +++ b/src/gallium/drivers/panfrost/ci/deqp-panfrost-g52-fails.txt @@ -1,2 +0,0 @@ -dEQP-GLES31.functional.layout_binding.image.image2d.vertex_binding_max_array,Fail -dEQP-GLES31.functional.layout_binding.image.image3d.vertex_binding_max_array,Fail diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 7c8fa9b94a7..f3f5ac7215b 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -1796,7 +1796,7 @@ panfrost_emit_vertex_data(struct panfrost_batch *batch, k = ALIGN_POT(k, 2); emit_image_attribs(ctx, PIPE_SHADER_VERTEX, out + so->num_elements, k); emit_image_bufs(batch, PIPE_SHADER_VERTEX, bufs + k, k); - k += util_last_bit(ctx->image_mask[PIPE_SHADER_VERTEX]); + k += (util_last_bit(ctx->image_mask[PIPE_SHADER_VERTEX]) * 2); /* We need an empty attrib buf to stop the prefetching on Bifrost */ if (pan_is_bifrost(dev))