d3d12: Force emulation of all YUV formats using per-plane formats

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14123>
This commit is contained in:
Jesse Natalie
2021-09-26 08:24:10 -07:00
committed by Marge Bot
parent 7f34b70474
commit fb6479544b

View File

@@ -503,10 +503,12 @@ d3d12_is_format_supported(struct pipe_screen *pscreen,
/* Don't advertise alpha/luminance_alpha formats because they can't be used
* for render targets (except A8_UNORM) and can't be emulated by R/RG formats.
* Let the state tracker choose an RGBA format instead. */
* Let the state tracker choose an RGBA format instead. For YUV formats, we
* want the state tracker to lower these to individual planes. */
if (format != PIPE_FORMAT_A8_UNORM &&
(util_format_is_alpha(format) ||
util_format_is_luminance_alpha(format)))
util_format_is_luminance_alpha(format) ||
util_format_is_yuv(format)))
return false;
DXGI_FORMAT dxgi_format = d3d12_get_format(format);