1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-03 04:24:11 +01:00

[dxvk] Relax compute shader barriers for read-only storage buffers

This commit is contained in:
Philip Rebohle 2018-12-13 22:42:36 +01:00
parent a0de90861c
commit 0bc2498570
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -3123,7 +3123,8 @@ namespace dxvk {
switch (binding.type) {
case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER:
case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC:
access.set(DxvkAccess::Write);
if (binding.access & VK_ACCESS_SHADER_WRITE_BIT)
access.set(DxvkAccess::Write);
/* fall through */
case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER:
@ -3133,7 +3134,8 @@ namespace dxvk {
break;
case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER:
access.set(DxvkAccess::Write);
if (binding.access & VK_ACCESS_SHADER_WRITE_BIT)
access.set(DxvkAccess::Write);
/* fall through */
case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER:
@ -3142,7 +3144,8 @@ namespace dxvk {
break;
case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE:
access.set(DxvkAccess::Write);
if (binding.access & VK_ACCESS_SHADER_WRITE_BIT)
access.set(DxvkAccess::Write);
/* fall through */
case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE:
@ -3177,7 +3180,8 @@ namespace dxvk {
switch (binding.type) {
case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER:
case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC:
access |= VK_ACCESS_SHADER_WRITE_BIT;
if (binding.access & VK_ACCESS_SHADER_WRITE_BIT)
access |= VK_ACCESS_SHADER_WRITE_BIT;
/* fall through */
case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER:
@ -3190,7 +3194,8 @@ namespace dxvk {
break;
case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER:
access |= VK_ACCESS_SHADER_WRITE_BIT;
if (binding.access & VK_ACCESS_SHADER_WRITE_BIT)
access |= VK_ACCESS_SHADER_WRITE_BIT;
/* fall through */
case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER:
@ -3202,7 +3207,8 @@ namespace dxvk {
break;
case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE:
access |= VK_ACCESS_SHADER_WRITE_BIT;
if (binding.access & VK_ACCESS_SHADER_WRITE_BIT)
access |= VK_ACCESS_SHADER_WRITE_BIT;
/* fall through */
case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE: