ac/surface: fix R32G3B32 image format regression for gfx6-8

This is a different fix from the one reviewed because that one broke gfx9.

Fixes: ea7c89d1f5 - ac/surface: move determing ADDR_FMT_* into a helper function
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22833>
This commit is contained in:
Marek Olšák 2023-06-01 02:58:39 -04:00 committed by Marge Bot
parent 15be2f554a
commit d6e70334ff

View file

@ -1127,6 +1127,10 @@ static int gfx6_compute_surface(ADDR_HANDLE addrlib, const struct radeon_info *i
if (!compressed) if (!compressed)
AddrDccIn.bpp = AddrSurfInfoIn.bpp = surf->bpe * 8; AddrDccIn.bpp = AddrSurfInfoIn.bpp = surf->bpe * 8;
/* Setting ADDR_FMT_32_32_32 breaks gfx6-8, while INVALID works. */
if (AddrSurfInfoIn.format == ADDR_FMT_32_32_32)
AddrSurfInfoIn.format = ADDR_FMT_INVALID;
AddrDccIn.numSamples = AddrSurfInfoIn.numSamples = MAX2(1, config->info.samples); AddrDccIn.numSamples = AddrSurfInfoIn.numSamples = MAX2(1, config->info.samples);
AddrSurfInfoIn.tileIndex = -1; AddrSurfInfoIn.tileIndex = -1;