1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-12 13:08:50 +01:00

[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.
This commit is contained in:
Philip Rebohle 2019-01-19 02:28:25 +01:00
parent 4dac8e7233
commit 4d4bd182c1
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -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;