Mesa (main): d3d12: Don't block DISPLAY based on format for non-Windows
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 28 17:51:30 UTC 2022
Module: Mesa
Branch: main
Commit: 6db7dd64b61d47ade6a967d3ba49ddf3dc981182
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6db7dd64b61d47ade6a967d3ba49ddf3dc981182
Author: Jesse Natalie <jenatali at microsoft.com>
Date: Mon Apr 25 13:38:40 2022 -0700
d3d12: Don't block DISPLAY based on format for non-Windows
On platforms where we're not using DXGI swapchains, there's no reason
to disallow DISPLAY for formats like B5G6R5. In fact, on Android,
we need to support this format as BIND_DISPLAY.
Reviewed-by: Bill Kristiansen <billkris at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16154>
---
src/gallium/drivers/d3d12/d3d12_screen.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gallium/drivers/d3d12/d3d12_screen.cpp b/src/gallium/drivers/d3d12/d3d12_screen.cpp
index 63655ea1aa4..53b8f6b5f1a 100644
--- a/src/gallium/drivers/d3d12/d3d12_screen.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_screen.cpp
@@ -654,6 +654,7 @@ d3d12_is_format_supported(struct pipe_screen *pscreen,
} else
fmt_info_sv = fmt_info;
+#ifdef _WIN32
if (bind & PIPE_BIND_DISPLAY_TARGET &&
(!(fmt_info.Support1 & D3D12_FORMAT_SUPPORT1_DISPLAY) ||
// Disable formats that don't support flip model
@@ -662,6 +663,7 @@ d3d12_is_format_supported(struct pipe_screen *pscreen,
dxgi_format == DXGI_FORMAT_B5G6R5_UNORM ||
dxgi_format == DXGI_FORMAT_B4G4R4A4_UNORM))
return false;
+#endif
if (bind & PIPE_BIND_DEPTH_STENCIL &&
!(fmt_info.Support1 & D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL))
More information about the mesa-commit
mailing list