From 518f052e9813eda746d12e857b119de935dc30d9 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Tue, 22 Apr 2025 22:02:49 +0200 Subject: [PATCH] pan/format: Disable image storage on A8_UNORM A8_UNORM on v9+ is using RGBA8_UNORM as a pixel format with the A8_UNORM clump format to dealing with the diffences between RGBA8 and the actual A8 in-memory layout. The problem is, LEA_TEX only loads the InternalConversionDescriptor which contains only the pixel format, and that's what ST_CVT uses to do the conversion, so we'll actually store 4 components instead of one. This shows up with dEQP-VK.image.load_store.without_any_format.buffer.a8_unorm* after enabling maintenance5. For now I've turned off the image storage capability for A8_UNORM on all gens, but I'd be fine disabling it only on v9+ if you think that's preferable. Fixes: d95423686fda ("pan/format: Add PAN_BIND_STORAGE_IMAGE flag") Signed-off-by: Boris Brezillon Reviewed-by: Lars-Ivar Hesselberg Simonsen Acked-by: Erik Faye-Lund Part-of: (cherry picked from commit 9d1262e108dcd962cff4d564e9f0f62799414305) --- .pick_status.json | 2 +- src/panfrost/lib/pan_format.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 4212b1c1f55..9e1b3f4ad4d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -994,7 +994,7 @@ "description": "pan/format: Disable image storage on A8_UNORM", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "d95423686fda6c8a96702b1535a967132f8887f8", "notes": null diff --git a/src/panfrost/lib/pan_format.c b/src/panfrost/lib/pan_format.c index c9d79d6839a..e86b61f82e3 100644 --- a/src/panfrost/lib/pan_format.c +++ b/src/panfrost/lib/pan_format.c @@ -512,7 +512,7 @@ const struct panfrost_format GENX(panfrost_pipe_format)[PIPE_FORMAT_COUNT] = { FMT(X24S8_UINT, RGBA8UI, AAAA, L, _T_Z_), FMT(S8_UINT, R8UI, RRRR, L, _T_Z_), - FMT(A8_UNORM, R8_UNORM, 000R, L, VTR_I), + FMT(A8_UNORM, R8_UNORM, 000R, L, VTR__), FMT(L8A8_UNORM, RG8_UNORM, RRRG, L, VTR_I), FMT(L8A8_SRGB, RG8_UNORM, RRRG, S, VTR_I), @@ -549,7 +549,7 @@ const struct panfrost_format GENX(panfrost_pipe_format)[PIPE_FORMAT_COUNT] = { /* similarly, the interchange format is RGBA8, but we only actually store 1 component in memory here */ - FMT(A8_UNORM, RGBA8_UNORM, 000A, L, VTR_I), + FMT(A8_UNORM, RGBA8_UNORM, 000A, L, VTR__), #else /* Specify real formats on Bifrost */ FMT(Z32_FLOAT_S8X24_UINT, Z32_X32, RGBA, L, _T_Z_), @@ -558,7 +558,7 @@ const struct panfrost_format GENX(panfrost_pipe_format)[PIPE_FORMAT_COUNT] = { FMT(S8_UINT, S8, GRBA, L, _T_Z_), /* Obsolete formats removed in Valhall */ - FMT(A8_UNORM, A8_UNORM, 000A, L, VTR_I), + FMT(A8_UNORM, A8_UNORM, 000A, L, VTR__), FMT(L8A8_UNORM, R8A8_UNORM, RRRA, L, VTR_I), FMT(L8A8_SRGB, R8A8_UNORM, RRRA, S, VTR_I), #endif