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@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16154>
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user