1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[d3d9] Implement apitraceMode option

This commit is contained in:
Robin Kertels 2020-12-14 17:40:13 +01:00 committed by Joshie
parent 4b6632764f
commit 6a54d86f25
3 changed files with 10 additions and 0 deletions

View File

@ -105,6 +105,11 @@ namespace dxvk {
memoryFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
}
if (memoryFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT && m_parent->GetOptions()->apitraceMode) {
memoryFlags |= VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
| VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
}
return m_parent->GetDXVKDevice()->createBuffer(info, memoryFlags);
}

View File

@ -73,6 +73,8 @@ namespace dxvk {
this->tearFree = config.getOption<Tristate> ("d3d9.tearFree", Tristate::Auto);
this->alphaTestWiggleRoom = config.getOption<bool> ("d3d9.alphaTestWiggleRoom", false);
this->apitraceMode = config.getOption<bool>("d3d9.apitraceMode", false);
// If we are not Nvidia, enable general hazards.
this->generalHazards = adapter == nullptr || !adapter->matchesDriver(DxvkGpuVendor::Nvidia, VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR, 0, 0);
applyTristate(this->generalHazards, config.getOption<Tristate>("d3d9.generalHazards", Tristate::Auto));

View File

@ -151,6 +151,9 @@ namespace dxvk {
/// Workaround for games using alpha test == 1.0, etc due to wonky interpolation or
/// misc. imprecision on some vendors
bool alphaTestWiggleRoom;
/// Apitrace mode: Maps all buffers in cached memory.
bool apitraceMode;
};
}