Module: Mesa Branch: main Commit: fb6479544bd98e90cbffcfab6eb7c05e450625f2 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fb6479544bd98e90cbffcfab6eb7c05e450625f2
Author: Jesse Natalie <[email protected]> Date: Sun Sep 26 08:24:10 2021 -0700 d3d12: Force emulation of all YUV formats using per-plane formats Reviewed-by: Sil Vilerino <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14123> --- 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);
