mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 10:54:16 +01:00
[d3d9] Add option to use device local memory for constant buffers
Useful for testing performance.
This commit is contained in:
parent
eec4481ca0
commit
50d223e614
12
dxvk.conf
12
dxvk.conf
@ -342,3 +342,15 @@
|
||||
# - True/False
|
||||
|
||||
# d3d9.alphaTestWiggleRoom = False
|
||||
|
||||
# Device Local Constant Buffers
|
||||
#
|
||||
# Enables using device local, host accessible memory for constant buffers in D3D9.
|
||||
# This tends to actually be slower for some reason on AMD,
|
||||
# and the exact same performance on NVIDIA.
|
||||
#
|
||||
# Supported values:
|
||||
# - True/False
|
||||
|
||||
# d3d9.deviceLocalConstantBuffers = False
|
||||
|
||||
|
@ -4627,6 +4627,9 @@ namespace dxvk {
|
||||
VkMemoryPropertyFlags memoryFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
|
||||
| VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
|
||||
|
||||
if (m_d3d9Options.deviceLocalConstantBuffers)
|
||||
memoryFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
|
||||
|
||||
Rc<DxvkBuffer> buffer = m_dxvkDevice->createBuffer(info, memoryFlags);
|
||||
|
||||
const uint32_t slotId = computeResourceSlotId(
|
||||
|
@ -75,6 +75,8 @@ namespace dxvk {
|
||||
|
||||
this->apitraceMode = config.getOption<bool>("d3d9.apitraceMode", false);
|
||||
|
||||
this->deviceLocalConstantBuffers = config.getOption<bool>("d3d9.deviceLocalConstantBuffers", 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));
|
||||
|
@ -154,6 +154,9 @@ namespace dxvk {
|
||||
|
||||
/// Apitrace mode: Maps all buffers in cached memory.
|
||||
bool apitraceMode;
|
||||
|
||||
/// Use device local memory for constant buffers.
|
||||
bool deviceLocalConstantBuffers;
|
||||
};
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user