mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[d3d11] Only add storage buffer usage flag to constant buffers if needed
Otherwise, the backend optimization for dynamic uniform buffers will not kick in.
This commit is contained in:
parent
e95bc3256f
commit
1780c549e5
@ -34,10 +34,12 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
if (pDesc->BindFlags & D3D11_BIND_CONSTANT_BUFFER) {
|
||||
info.usage |= VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT
|
||||
| VK_BUFFER_USAGE_STORAGE_BUFFER_BIT;
|
||||
info.usage |= VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT;
|
||||
info.stages |= m_device->GetEnabledShaderStages();
|
||||
info.access |= VK_ACCESS_UNIFORM_READ_BIT;
|
||||
|
||||
if (m_device->GetOptions()->constantBufferRangeCheck)
|
||||
info.usage |= VK_BUFFER_USAGE_STORAGE_BUFFER_BIT;
|
||||
}
|
||||
|
||||
if (pDesc->BindFlags & D3D11_BIND_SHADER_RESOURCE) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user