Module: Mesa Branch: main Commit: d9fada16b919aa04ec18cfd58134cde1f84bd1c8 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d9fada16b919aa04ec18cfd58134cde1f84bd1c8
Author: Jesse Natalie <jenat...@microsoft.com> Date: Tue Oct 31 14:05:01 2023 -0700 d3d12: Don't support displaytargets that can't be supported by GDI/DXGI Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25979> --- src/gallium/drivers/d3d12/d3d12_screen.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/d3d12/d3d12_screen.cpp b/src/gallium/drivers/d3d12/d3d12_screen.cpp index 4377361f826..a2a45e6d7cc 100644 --- a/src/gallium/drivers/d3d12/d3d12_screen.cpp +++ b/src/gallium/drivers/d3d12/d3d12_screen.cpp @@ -610,6 +610,11 @@ d3d12_is_format_supported(struct pipe_screen *pscreen, unreachable("Unknown target"); } + if (bind & PIPE_BIND_DISPLAY_TARGET) { + if (!screen->winsys->is_displaytarget_format_supported(screen->winsys, bind, format)) + return false; + } + D3D12_FEATURE_DATA_FORMAT_SUPPORT fmt_info; fmt_info.Format = d3d12_get_resource_rt_format(format); if (FAILED(screen->dev->CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT,