zink: correct emulation of luminance-alpha formats

util_format_luminance_to_red returns a red-alpha format, not a red-green
format, which is what we need in Vulkan. So let's also call
emulate_red_alpha so we can finish up with a valid format.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18596>
This commit is contained in:
Erik Faye-Lund 2022-09-14 10:19:29 +02:00 committed by Marge Bot
parent e7f192030c
commit c7ff9876d6

View file

@ -310,7 +310,7 @@ zink_format_get_emulated_alpha(enum pipe_format format)
if (format == PIPE_FORMAT_LATC2_SNORM)
return PIPE_FORMAT_RGTC2_SNORM;
return util_format_luminance_to_red(format);
format = util_format_luminance_to_red(format);
}
return emulate_red_alpha(format);