Mesa (main): d3d12: Force emulation of all YUV formats using per-plane formats

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Dec 8 20:58:21 UTC 2021


Module: Mesa
Branch: main
Commit: fb6479544bd98e90cbffcfab6eb7c05e450625f2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fb6479544bd98e90cbffcfab6eb7c05e450625f2

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Sun Sep 26 08:24:10 2021 -0700

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

Reviewed-by: Sil Vilerino <sivileri at microsoft.com>
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);



More information about the mesa-commit mailing list