mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-15 07:29:17 +01:00
[d3d9] Only use DEVICE_LOCAL memory for small dynamic buffers
Tomb Raider Legend writes to multiple 128KB dynamic buffers and one 512KB one every frame.
This commit is contained in:
parent
2714cb952d
commit
f3a82a0bcc
@ -92,10 +92,12 @@ namespace dxvk {
|
||||
|
||||
if (!(m_desc.Usage & D3DUSAGE_WRITEONLY))
|
||||
info.access |= VK_ACCESS_HOST_READ_BIT;
|
||||
|
||||
|
||||
memoryFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
|
||||
| VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
|
||||
| VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
|
||||
| VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
|
||||
|
||||
if (m_desc.Size <= DeviceLocalThreshold)
|
||||
memoryFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
|
||||
}
|
||||
else {
|
||||
info.stages |= VK_PIPELINE_STAGE_TRANSFER_BIT;
|
||||
|
@ -68,6 +68,7 @@ namespace dxvk {
|
||||
|
||||
class D3D9CommonBuffer {
|
||||
static constexpr VkDeviceSize BufferSliceAlignment = 64;
|
||||
static constexpr VkDeviceSize DeviceLocalThreshold = 4096;
|
||||
public:
|
||||
|
||||
D3D9CommonBuffer(
|
||||
|
Loading…
x
Reference in New Issue
Block a user