mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[d3d11] Allocate mapped buffers for staging images on cached memory
These will most likely be used for reading, so we should put them on a memory type which allows reading.
This commit is contained in:
parent
51f229530b
commit
56300ff9b7
@ -424,9 +424,13 @@ namespace dxvk {
|
|||||||
info.access = VK_ACCESS_TRANSFER_READ_BIT
|
info.access = VK_ACCESS_TRANSFER_READ_BIT
|
||||||
| VK_ACCESS_TRANSFER_WRITE_BIT;
|
| VK_ACCESS_TRANSFER_WRITE_BIT;
|
||||||
|
|
||||||
return m_device->GetDXVKDevice()->createBuffer(info,
|
VkMemoryPropertyFlags memType = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
|
||||||
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
|
| VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
|
||||||
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);
|
|
||||||
|
if (m_desc.Usage == D3D11_USAGE_STAGING)
|
||||||
|
memType |= VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
|
||||||
|
|
||||||
|
return m_device->GetDXVKDevice()->createBuffer(info, memType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user