Skip to content

Commit

Permalink
[dxvk] Disable state cache for Anno 2205
Browse files Browse the repository at this point in the history
Fixes #686.
  • Loading branch information
doitsujin committed Nov 24, 2018
1 parent 10b272b commit 2d55852
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/dxvk/dxvk_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace dxvk {

DxvkOptions::DxvkOptions(const Config& config) {
allowMemoryOvercommit = config.getOption<bool> ("dxvk.allowMemoryOvercommit", false);
enableStateCache = config.getOption<bool> ("dxvk.enableStateCache", true);
numCompilerThreads = config.getOption<int32_t> ("dxvk.numCompilerThreads", 0);
}

Expand Down
3 changes: 3 additions & 0 deletions src/dxvk/dxvk_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ namespace dxvk {
/// a heap than the device supports.
bool allowMemoryOvercommit;

/// Enable state cache
bool enableStateCache;

/// Number of compiler threads
/// when using the state cache
int32_t numCompilerThreads;
Expand Down
2 changes: 1 addition & 1 deletion src/dxvk/dxvk_pipemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace dxvk {
m_cache (new DxvkPipelineCache(device->vkd())) {
std::string useStateCache = env::getEnvVar("DXVK_STATE_CACHE");

if (useStateCache != "0")
if (useStateCache != "0" && device->config().enableStateCache)
m_stateCache = new DxvkStateCache(device, this, passManager);
}

Expand Down
4 changes: 4 additions & 0 deletions src/util/config/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ namespace dxvk {
{ "QuantumBreak.exe", {{
{ "d3d11.zeroInitWorkgroupMemory", "True" },
}} },
/* Anno 2205 */
{ "anno2205.exe", {{
{ "dxvk.enableStateCache", "False" },
}} },
}};


Expand Down

0 comments on commit 2d55852

Please sign in to comment.