pvr: fix transfer fast clear color for srgb formats

Seen in dEQP-VK.renderpass.suballocation.formats.r8g8b8a8_srgb.load.clear

Signed-off-by: SoroushIMG <soroush.kashani@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
SoroushIMG 2023-05-14 21:01:01 +01:00 committed by Marge Bot
parent fcea07ccda
commit 7fdcb6acc0

View file

@ -2244,6 +2244,10 @@ static VkResult pvr_pack_clear_color(VkFormat format,
uint32_t pbe_pack_mode = pvr_get_pbe_packmode(format);
const bool pbe_norm = pvr_vk_format_is_fully_normalized(format);
/* TODO: Use PBE Accum format NOT PBE pack format! */
if (vk_format_is_srgb(format))
pbe_pack_mode = ROGUE_PBESTATE_PACKMODE_F16F16F16F16;
if (pbe_pack_mode == ROGUE_PBESTATE_PACKMODE_INVALID)
return vk_error(NULL, VK_ERROR_FORMAT_NOT_SUPPORTED);