[d3d11] Disable DO_NOT_WAIT flag by default

Apparently this breaks Elder Scrolls Online as well, so we'll
just enable it explicitly for games which benefit from this
optimization and disable it by default.
This commit is contained in:
Philip Rebohle 2018-03-25 00:54:42 +01:00
parent 4ed007e9f6
commit 4e84a77896
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 12 additions and 3 deletions

View File

@ -345,7 +345,7 @@ namespace dxvk {
UINT MapFlags) {
// Some games (e.g. The Witcher 3) do not work correctly
// when a map fails with D3D11_MAP_FLAG_DO_NOT_WAIT set
if (m_parent->TestOption(D3D11Option::IgnoreMapFlagNoWait))
if (!m_parent->TestOption(D3D11Option::AllowMapFlagNoWait))
MapFlags &= ~D3D11_MAP_FLAG_DO_NOT_WAIT;
// Wait for the any pending D3D11 command to be executed

View File

@ -5,7 +5,7 @@
namespace dxvk {
const static std::unordered_map<std::string, D3D11OptionSet> g_d3d11AppOptions = {{
{ "witcher3.exe", D3D11OptionSet(D3D11Option::IgnoreMapFlagNoWait) },
{ "Dishonored2.exe", D3D11OptionSet(D3D11Option::AllowMapFlagNoWait) },
}};

View File

@ -5,11 +5,20 @@
namespace dxvk {
enum class D3D11Option : uint64_t {
IgnoreMapFlagNoWait = 0,
/**
* \brief Handle D3D11_MAP_FLAG_DO_NOT_WAIT properly
*
* This can offer substantial speedups, but some games
* (The Witcher 3, Elder Scrolls Online, possibly others)
* seem to make incorrect assumptions about when a map
* operation succeeds when that flag is set.
*/
AllowMapFlagNoWait = 0,
};
using D3D11OptionSet = Flags<D3D11Option>;
/**
* \brief Retrieves per-app options
*