panfrost: Explicitly reject AFBC(Z32)

We are about to extend pan_afbc_format() to support AFBC(Z32),
but the the AFBC(Z32) + S8 combination doesn't work on v7-, so
we need to filter AFBC(Z32) out in panfrost_should_afbc() on
v7-.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37158>
This commit is contained in:
Boris Brezillon
2025-09-10 13:17:46 +02:00
committed by Marge Bot
parent 42b90f858e
commit 05c2d45c3c
@@ -606,6 +606,13 @@ panfrost_should_afbc(struct panfrost_device *dev,
if (pres->base.bind & PIPE_BIND_CONST_BW)
return false;
/* We can't do AFBC(Z32)+S8 on v7- because the AFBC ZS target layout overlaps
* the S target layout. Since we don't know at this point if the Z32 buffer
* will be attached an S8 buffer, we have to reject AFBC(Z32)
* unconditionally. */
if (dev->arch <= 7 && fmt == PIPE_FORMAT_Z32_FLOAT)
return false;
/* Only a small selection of formats are AFBC'able */
if (!pan_afbc_supports_format(dev->arch, fmt))
return false;