From 3b43c1c183e5a1ab741010509c73e4d72bb9e940 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 17 Mar 2018 09:20:06 +0100 Subject: [PATCH] [dxgi] Support more formats in the presenter Should surpress "Unsupported format" warnings in games based on Unreal Engine 4 and Frostbite Engine. --- src/dxgi/dxgi_presenter.cpp | 9 +++++++++ src/dxvk/dxvk_context.cpp | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/dxgi/dxgi_presenter.cpp b/src/dxgi/dxgi_presenter.cpp index 8cdc96bb..9b20dc85 100644 --- a/src/dxgi/dxgi_presenter.cpp +++ b/src/dxgi/dxgi_presenter.cpp @@ -320,6 +320,15 @@ namespace dxvk { formats.push_back({ VK_FORMAT_B8G8R8A8_SRGB, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR }); } break; + case DXGI_FORMAT_R10G10B10A2_UNORM: { + formats.push_back({ VK_FORMAT_A2B10G10R10_UNORM_PACK32, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR }); + formats.push_back({ VK_FORMAT_A2R10G10B10_UNORM_PACK32, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR }); + } break; + + case DXGI_FORMAT_R16G16B16A16_FLOAT: { + formats.push_back({ VK_FORMAT_R16G16B16A16_SFLOAT, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR }); + } break; + default: Logger::warn(str::format("DxgiPresenter: Unknown format: ", fmt)); } diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index 215d6489..b2e7ea05 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -331,9 +331,9 @@ namespace dxvk { VkDeviceSize numBytes) { if (numBytes == 0) return; - + this->renderPassEnd(); - + auto dstSlice = dstBuffer->subSlice(dstOffset, numBytes); auto srcSlice = srcBuffer->subSlice(srcOffset, numBytes);