From 072be58bc1c9a2e508539d3a14ffb4acf6dffc76 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 19 Feb 2021 11:51:16 -0500 Subject: [PATCH] panfrost: Raise TEXTURE_BUFFER_OFFSET_ALIGNMENT The blob advertises 64 for this, so let's use the same value. Small alignments are observed to raise an IMPRECISE_FAULT at least on Bifrost. As a bonus this forces cache line alignment which will help perf. Fixes dEQP-GLES31.functional.texture.texture_buffer.render.as_vertex_texture.offset_1_alignments Fixes: 5f7bafa316f ("panfrost: Enable ARB_texture_buffer_object") Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: (cherry picked from commit 3f21b089f8ee16f1b51ed64e9c203b073c015766) --- .pick_status.json | 2 +- src/gallium/drivers/panfrost/pan_screen.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 6a39abfd2b8..56578c6a610 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2596,7 +2596,7 @@ "description": "panfrost: Raise TEXTURE_BUFFER_OFFSET_ALIGNMENT", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "5f7bafa316f60ff79b9839cf88142b33f330a8e7" }, diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index e94534abb64..6822678ca1c 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -192,8 +192,9 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE: return 65536; + /* Must be at least 64 for correct behaviour */ case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT: - return 16; + return 64; case PIPE_CAP_QUERY_TIMESTAMP: return is_gl3;