zink: fix format conversion logic for the alpha emulation case

cc: mesa-stable

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Fixes: 252bff0f ("zink: use real A8_UNORM when possible")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40118>
This commit is contained in:
Luigi Santivetti 2026-02-26 12:27:32 +00:00 committed by Marge Bot
parent 6b464785b9
commit 640bc3bc53

View file

@ -1304,7 +1304,7 @@ zink_is_format_supported(struct pipe_screen *pscreen,
}
/* always use superset to determine feature support */
VkFormat vkformat = zink_get_format(screen, PIPE_FORMAT_A8_UNORM ? zink_format_get_emulated_alpha(format) : format);
VkFormat vkformat = zink_get_format(screen, format == PIPE_FORMAT_A8_UNORM ? zink_format_get_emulated_alpha(format) : format);
if (vkformat == VK_FORMAT_UNDEFINED)
return false;