1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +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:
Philip Rebohle 2019-10-30 10:58:05 +01:00
parent e95bc3256f
commit 1780c549e5
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -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) {