mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-13 19:29:14 +01:00
[dxvk] Add option to disable workaround for NVIDIA HVV bug
Adds a new dxvk.halveNvidiaHVVHeap option. Reviewed-by: Arthur Huillet <ahuillet@nvidia.com>
This commit is contained in:
parent
3acdf6e22a
commit
b25d6ba615
14
dxvk.conf
14
dxvk.conf
@ -206,6 +206,20 @@
|
||||
# dxvk.useEarlyDiscard = Auto
|
||||
|
||||
|
||||
# Controls workaround for NVIDIA HVV Heap bug.
|
||||
#
|
||||
# Limits the budget of NVIDIA's HVV (host-visible,
|
||||
# device-local) heap to be half of the reported size. This is
|
||||
# needed to avoid NVIDIA driver bug 3114283, and defaults to
|
||||
# being enabled on all affected drivers.
|
||||
#
|
||||
# Supported values:
|
||||
# - Auto: Don't change the default
|
||||
# - True, False: Always enable / disable
|
||||
|
||||
# dxvk.halveNvidiaHVVHeap = Auto
|
||||
|
||||
|
||||
# Sets enabled HUD elements
|
||||
#
|
||||
# Behaves like the DXVK_HUD environment variable if the
|
||||
|
@ -180,7 +180,11 @@ namespace dxvk {
|
||||
/* Work around an issue on Nvidia drivers where using the entire
|
||||
* device_local | host_visible heap can cause crashes, presumably
|
||||
* due to subsequent internal driver allocations failing */
|
||||
if (m_device->properties().core.properties.vendorID == uint16_t(DxvkGpuVendor::Nvidia)) {
|
||||
bool nvidiaBug3114283Active = true;
|
||||
applyTristate(nvidiaBug3114283Active, device->config().halveNvidiaHVVHeap);
|
||||
|
||||
if ((m_device->properties().core.properties.vendorID == uint16_t(DxvkGpuVendor::Nvidia))
|
||||
&& (nvidiaBug3114283Active)) {
|
||||
for (uint32_t i = 0; i < m_memProps.memoryTypeCount; i++) {
|
||||
constexpr VkMemoryPropertyFlags flags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
|
||||
|
||||
@ -432,4 +436,4 @@ namespace dxvk {
|
||||
return chunkSize;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,8 @@ namespace dxvk {
|
||||
numCompilerThreads = config.getOption<int32_t> ("dxvk.numCompilerThreads", 0);
|
||||
useRawSsbo = config.getOption<Tristate>("dxvk.useRawSsbo", Tristate::Auto);
|
||||
useEarlyDiscard = config.getOption<Tristate>("dxvk.useEarlyDiscard", Tristate::Auto);
|
||||
halveNvidiaHVVHeap = config.getOption<Tristate>("dxvk.halveNvidiaHVVHeap", Tristate::Auto);
|
||||
hud = config.getOption<std::string>("dxvk.hud", "");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -25,8 +25,14 @@ namespace dxvk {
|
||||
Tristate useRawSsbo;
|
||||
Tristate useEarlyDiscard;
|
||||
|
||||
/// Workaround for NVIDIA driver
|
||||
/// bug 3114283. Cut usable HVV
|
||||
/// (Host-Visible Vidmem) heap
|
||||
/// in half to avoid crash
|
||||
Tristate halveNvidiaHVVHeap;
|
||||
|
||||
/// HUD elements
|
||||
std::string hud;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user