From fb6479544bd98e90cbffcfab6eb7c05e450625f2 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Sun, 26 Sep 2021 08:24:10 -0700 Subject: [PATCH] d3d12: Force emulation of all YUV formats using per-plane formats Reviewed-by: Sil Vilerino Part-of: --- src/gallium/drivers/d3d12/d3d12_screen.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/d3d12/d3d12_screen.cpp b/src/gallium/drivers/d3d12/d3d12_screen.cpp index 6bc8cd0fb5b..e0f631494a9 100644 --- a/src/gallium/drivers/d3d12/d3d12_screen.cpp +++ b/src/gallium/drivers/d3d12/d3d12_screen.cpp @@ -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);