From 9d1262e108dcd962cff4d564e9f0f62799414305 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: --- src/panfrost/lib/pan_format.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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