From 4d4bd182c162842f0cb7af178ed04f1cc2124bc3 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 19 Jan 2019 02:28:25 +0100 Subject: [PATCH] [d3d11] Allow arbitrary back buffer formats for swap chains Doesn't match D3D11 behaviour, but shouldn't really break anything since D3D11 has a fixed set of swap chain-compatible formats. Might help DXUP in avoiding unnecessary framebuffer blits. --- src/d3d11/d3d11_swapchain.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/d3d11/d3d11_swapchain.cpp b/src/d3d11/d3d11_swapchain.cpp index 4b4e0b76..c72c9cfe 100644 --- a/src/d3d11/d3d11_swapchain.cpp +++ b/src/d3d11/d3d11_swapchain.cpp @@ -673,6 +673,9 @@ namespace dxvk { uint32_t n = 0; switch (Format) { + default: + Logger::warn(str::format("D3D11SwapChain: Unexpected format: ", m_desc.Format)); + case DXGI_FORMAT_R8G8B8A8_UNORM: case DXGI_FORMAT_B8G8R8A8_UNORM: { pDstFormats[n++] = { VK_FORMAT_R8G8B8A8_UNORM, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR }; @@ -693,9 +696,6 @@ namespace dxvk { case DXGI_FORMAT_R16G16B16A16_FLOAT: { pDstFormats[n++] = { VK_FORMAT_R16G16B16A16_SFLOAT, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR }; } break; - - default: - Logger::warn(str::format("VkD3DPresenter: Unknown format: ", m_desc.Format)); } return n;