mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-12 04:54:17 +01:00
[d3d11] Allocate DYNAMIC buffers on device-local host-visible memory
Improves performance on AMD cards when GPU-bound. ~5% FPS increase in The Witcher 3.
This commit is contained in:
parent
a9eff13b92
commit
c600b43d73
@ -139,6 +139,14 @@ namespace dxvk {
|
|||||||
| VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
|
| VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AMD cards have a device-local, host-visible memory type where
|
||||||
|
// we can put dynamic resources that need fast access by the GPU
|
||||||
|
if ((pDesc->Usage == D3D11_USAGE_DYNAMIC) && (pDesc->BindFlags & (
|
||||||
|
D3D11_BIND_VERTEX_BUFFER | D3D11_BIND_INDEX_BUFFER |
|
||||||
|
D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_UNORDERED_ACCESS |
|
||||||
|
D3D11_BIND_CONSTANT_BUFFER)))
|
||||||
|
memoryFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
|
||||||
|
|
||||||
return m_device->GetDXVKDevice()->createBuffer(info, memoryFlags);
|
return m_device->GetDXVKDevice()->createBuffer(info, memoryFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user