mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 01:24:11 +01:00
[dxvk] Disable defragmentation on ANV
This commit is contained in:
parent
8584fc7722
commit
b0ba60adfb
@ -390,9 +390,10 @@
|
|||||||
#
|
#
|
||||||
# Supported values:
|
# Supported values:
|
||||||
# - True: Enable defragmentation
|
# - True: Enable defragmentation
|
||||||
|
# - Auto: Enable defragmentation, except on blocked drivers
|
||||||
# - False: Disable defragmentation
|
# - False: Disable defragmentation
|
||||||
|
|
||||||
# dxvk.enableMemoryDefrag = True
|
# dxvk.enableMemoryDefrag = Auto
|
||||||
|
|
||||||
|
|
||||||
# Sets enabled HUD elements
|
# Sets enabled HUD elements
|
||||||
|
@ -2316,7 +2316,13 @@ namespace dxvk {
|
|||||||
m_memTypes[i].sharedCache->cleanupUnusedFromLockedAllocator(currentTime);
|
m_memTypes[i].sharedCache->cleanupUnusedFromLockedAllocator(currentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_device->config().enableMemoryDefrag) {
|
// For unknown reasons, defragmentation seems to break Genshin Impact and
|
||||||
|
// possibly other games on ANV while working fine on other drivers even in
|
||||||
|
// a stress-test scenario, see https://github.com/doitsujin/dxvk/issues/4395.
|
||||||
|
bool enableDefrag = !m_device->adapter()->matchesDriver(VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA);
|
||||||
|
applyTristate(enableDefrag, m_device->config().enableMemoryDefrag);
|
||||||
|
|
||||||
|
if (enableDefrag) {
|
||||||
// Periodically defragment device-local memory types. We cannot
|
// Periodically defragment device-local memory types. We cannot
|
||||||
// do anything about mapped allocations since we rely on pointer
|
// do anything about mapped allocations since we rely on pointer
|
||||||
// stability there.
|
// stability there.
|
||||||
|
@ -5,7 +5,7 @@ namespace dxvk {
|
|||||||
DxvkOptions::DxvkOptions(const Config& config) {
|
DxvkOptions::DxvkOptions(const Config& config) {
|
||||||
enableDebugUtils = config.getOption<bool> ("dxvk.enableDebugUtils", false);
|
enableDebugUtils = config.getOption<bool> ("dxvk.enableDebugUtils", false);
|
||||||
enableStateCache = config.getOption<bool> ("dxvk.enableStateCache", true);
|
enableStateCache = config.getOption<bool> ("dxvk.enableStateCache", true);
|
||||||
enableMemoryDefrag = config.getOption<bool> ("dxvk.enableMemoryDefrag", true);
|
enableMemoryDefrag = config.getOption<Tristate>("dxvk.enableMemoryDefrag", Tristate::Auto);
|
||||||
numCompilerThreads = config.getOption<int32_t> ("dxvk.numCompilerThreads", 0);
|
numCompilerThreads = config.getOption<int32_t> ("dxvk.numCompilerThreads", 0);
|
||||||
enableGraphicsPipelineLibrary = config.getOption<Tristate>("dxvk.enableGraphicsPipelineLibrary", Tristate::Auto);
|
enableGraphicsPipelineLibrary = config.getOption<Tristate>("dxvk.enableGraphicsPipelineLibrary", Tristate::Auto);
|
||||||
trackPipelineLifetime = config.getOption<Tristate>("dxvk.trackPipelineLifetime", Tristate::Auto);
|
trackPipelineLifetime = config.getOption<Tristate>("dxvk.trackPipelineLifetime", Tristate::Auto);
|
||||||
|
@ -15,7 +15,7 @@ namespace dxvk {
|
|||||||
bool enableStateCache = true;
|
bool enableStateCache = true;
|
||||||
|
|
||||||
/// Enable memory defragmentation
|
/// Enable memory defragmentation
|
||||||
bool enableMemoryDefrag = true;
|
Tristate enableMemoryDefrag = Tristate::Auto;
|
||||||
|
|
||||||
/// Number of compiler threads
|
/// Number of compiler threads
|
||||||
/// when using the state cache
|
/// when using the state cache
|
||||||
|
Loading…
Reference in New Issue
Block a user