From bfb7e54218b938da852d4a4c501a917a6cd76c50 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 20 Nov 2018 10:51:09 +0100 Subject: [PATCH] [d3d11] Rename dcMapSpeedHack to dcSingleUseMode --- src/d3d11/d3d11_cmdlist.cpp | 4 ++-- src/d3d11/d3d11_context_def.cpp | 6 +++--- src/d3d11/d3d11_options.cpp | 2 +- src/d3d11/d3d11_options.h | 2 +- src/util/config/config.cpp | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/d3d11/d3d11_cmdlist.cpp b/src/d3d11/d3d11_cmdlist.cpp index 714ba27f..c49cb3b8 100644 --- a/src/d3d11/d3d11_cmdlist.cpp +++ b/src/d3d11/d3d11_cmdlist.cpp @@ -66,10 +66,10 @@ namespace dxvk { void D3D11CommandList::MarkSubmitted() { if (m_submitted.exchange(true) && !m_warned.exchange(true) - && m_device->GetOptions()->dcMapSpeedHack) { + && m_device->GetOptions()->dcSingleUseMode) { Logger::warn( "D3D11: Command list submitted multiple times,\n" - " but d3d11.dcMapSpeedHack is enabled"); + " but d3d11.dcSingleUseMode is enabled"); } } diff --git a/src/d3d11/d3d11_context_def.cpp b/src/d3d11/d3d11_context_def.cpp index 6f77ca94..e77b1ec4 100644 --- a/src/d3d11/d3d11_context_def.cpp +++ b/src/d3d11/d3d11_context_def.cpp @@ -170,7 +170,7 @@ namespace dxvk { pMapEntry->RowPitch = pBuffer->Desc()->ByteWidth; pMapEntry->DepthPitch = pBuffer->Desc()->ByteWidth; - if (pBuffer->Desc()->Usage == D3D11_USAGE_DYNAMIC && m_parent->GetOptions()->dcMapSpeedHack) { + if (pBuffer->Desc()->Usage == D3D11_USAGE_DYNAMIC && m_csFlags.test(DxvkCsChunkFlag::SingleUse)) { // For resources that cannot be written by the GPU, // we may write to the buffer resource directly and // just swap in the physical buffer slice as needed. @@ -237,7 +237,7 @@ namespace dxvk { const D3D11DeferredContextMapEntry* pMapEntry) { D3D11Buffer* pBuffer = static_cast(pResource); - if (pBuffer->Desc()->Usage == D3D11_USAGE_DYNAMIC && m_parent->GetOptions()->dcMapSpeedHack) { + if (pBuffer->Desc()->Usage == D3D11_USAGE_DYNAMIC && m_csFlags.test(DxvkCsChunkFlag::SingleUse)) { EmitCs([ cDstBuffer = pBuffer->GetBuffer(), cPhysSlice = pMapEntry->BufferSlice @@ -301,7 +301,7 @@ namespace dxvk { DxvkCsChunkFlags D3D11DeferredContext::GetCsChunkFlags( D3D11Device* pDevice) { - return pDevice->GetOptions()->dcMapSpeedHack + return pDevice->GetOptions()->dcSingleUseMode ? DxvkCsChunkFlags(DxvkCsChunkFlag::SingleUse) : DxvkCsChunkFlags(); } diff --git a/src/d3d11/d3d11_options.cpp b/src/d3d11/d3d11_options.cpp index 45072c1d..6ec510ca 100644 --- a/src/d3d11/d3d11_options.cpp +++ b/src/d3d11/d3d11_options.cpp @@ -6,7 +6,7 @@ namespace dxvk { D3D11Options::D3D11Options(const Config& config) { this->allowMapFlagNoWait = config.getOption("d3d11.allowMapFlagNoWait", false); - this->dcMapSpeedHack = config.getOption("d3d11.dcMapSpeedHack", true); + this->dcSingleUseMode = config.getOption("d3d11.dcSingleUseMode", true); this->fakeStreamOutSupport = config.getOption("d3d11.fakeStreamOutSupport", false); this->maxTessFactor = config.getOption("d3d11.maxTessFactor", 0); this->samplerAnisotropy = config.getOption("d3d11.samplerAnisotropy", -1); diff --git a/src/d3d11/d3d11_options.h b/src/d3d11/d3d11_options.h index 58a59a51..1aaed8a5 100644 --- a/src/d3d11/d3d11_options.h +++ b/src/d3d11/d3d11_options.h @@ -31,7 +31,7 @@ namespace dxvk { /// This can substantially speed up some games, but may /// cause issues if the game submits command lists more /// than once. - bool dcMapSpeedHack; + bool dcSingleUseMode; /// Fakes stream output support. /// diff --git a/src/util/config/config.cpp b/src/util/config/config.cpp index 04af481d..ba749292 100644 --- a/src/util/config/config.cpp +++ b/src/util/config/config.cpp @@ -34,11 +34,11 @@ namespace dxvk { }} }, /* The Evil Within */ { "EvilWithin.exe", {{ - { "d3d11.dcMapSpeedHack", "False" }, + { "d3d11.dcSingleUseMode", "False" }, }} }, /* The Evil Within Demo */ { "EvilWithinDemo.exe", {{ - { "d3d11.dcMapSpeedHack", "False" }, + { "d3d11.dcSingleUseMode", "False" }, }} }, /* F1 2015 */ { "F1_2015.exe", {{