1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-04 10:29:15 +01:00

[dxvk] Add option to disable VK_NV_low_latency2

This commit is contained in:
Philip Rebohle 2025-01-19 02:26:17 +01:00 committed by Philip Rebohle
parent 859117797f
commit c700d76477
4 changed files with 23 additions and 0 deletions

View File

@ -106,6 +106,16 @@
# dxvk.latencyTolerance = 1000 # dxvk.latencyTolerance = 1000
# Disables the use of VK_NV_low_latency2. This will make Reflex unavailable
# in games, and if dxvk.latencySleep is set to True, a custom algorithm will
# be used for latency control. By default, the extension will not be used in
# 32-bit applications due to driver issues.
#
# Supported values: Auto, True, False
# dxvk.disableNvLowLatency2 = Auto
# Override PCI vendor and device IDs reported to the application. Can # Override PCI vendor and device IDs reported to the application. Can
# cause the app to adjust behaviour depending on the selected values. # cause the app to adjust behaviour depending on the selected values.
# #

View File

@ -293,6 +293,14 @@ namespace dxvk {
enabledFeatures.vk12.bufferDeviceAddress = VK_TRUE; enabledFeatures.vk12.bufferDeviceAddress = VK_TRUE;
} }
// Disable NV_low_latency2 on 32-bit due to buggy latency sleep
// behaviour, or if explicitly set via the onfig file.
bool disableNvLowLatency2 = env::is32BitHostPlatform();
applyTristate(disableNvLowLatency2, instance->options().disableNvLowLatency2);
if (disableNvLowLatency2)
devExtensions.nvLowLatency2.setMode(DxvkExtMode::Disabled);
// If we don't have pageable device memory support, at least use // If we don't have pageable device memory support, at least use
// the legacy AMD extension to ensure we can oversubscribe VRAM // the legacy AMD extension to ensure we can oversubscribe VRAM
if (!m_deviceExtensions.supports(devExtensions.extPageableDeviceLocalMemory.name())) if (!m_deviceExtensions.supports(devExtensions.extPageableDeviceLocalMemory.name()))

View File

@ -14,6 +14,7 @@ namespace dxvk {
tearFree = config.getOption<Tristate>("dxvk.tearFree", Tristate::Auto); tearFree = config.getOption<Tristate>("dxvk.tearFree", Tristate::Auto);
latencySleep = config.getOption<Tristate>("dxvk.latencySleep", Tristate::Auto); latencySleep = config.getOption<Tristate>("dxvk.latencySleep", Tristate::Auto);
latencyTolerance = config.getOption<int32_t> ("dxvk.latencyTolerance", 1000); latencyTolerance = config.getOption<int32_t> ("dxvk.latencyTolerance", 1000);
disableNvLowLatency2 = config.getOption<Tristate>("dxvk.disableNvLowLatency2", Tristate::Auto);
hideIntegratedGraphics = config.getOption<bool> ("dxvk.hideIntegratedGraphics", false); hideIntegratedGraphics = config.getOption<bool> ("dxvk.hideIntegratedGraphics", false);
zeroMappedMemory = config.getOption<bool> ("dxvk.zeroMappedMemory", false); zeroMappedMemory = config.getOption<bool> ("dxvk.zeroMappedMemory", false);
allowFse = config.getOption<bool> ("dxvk.allowFse", false); allowFse = config.getOption<bool> ("dxvk.allowFse", false);

View File

@ -43,6 +43,10 @@ namespace dxvk {
/// Latency tolerance, in microseconds /// Latency tolerance, in microseconds
int32_t latencyTolerance = 0u; int32_t latencyTolerance = 0u;
/// Disable VK_NV_low_latency2. This extension
/// appears to be all sorts of broken on 32-bit.
Tristate disableNvLowLatency2 = Tristate::Auto;
// Hides integrated GPUs if dedicated GPUs are // Hides integrated GPUs if dedicated GPUs are
// present. May be necessary for some games that // present. May be necessary for some games that
// incorrectly assume monitor layouts. // incorrectly assume monitor layouts.