diff --git a/src/dawn_native/vulkan/BufferVk.cpp b/src/dawn_native/vulkan/BufferVk.cpp index 9e3a67bfd7..cc2ebb6c2c 100644 --- a/src/dawn_native/vulkan/BufferVk.cpp +++ b/src/dawn_native/vulkan/BufferVk.cpp @@ -45,7 +45,7 @@ namespace dawn_native { namespace vulkan { if (usage & wgpu::BufferUsage::Uniform) { flags |= VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT; } - if (usage & wgpu::BufferUsage::Storage) { + if (usage & (wgpu::BufferUsage::Storage | kReadOnlyStorageBuffer)) { flags |= VK_BUFFER_USAGE_STORAGE_BUFFER_BIT; } if (usage & wgpu::BufferUsage::Indirect) { @@ -116,6 +116,9 @@ namespace dawn_native { namespace vulkan { if (usage & wgpu::BufferUsage::Storage) { flags |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT; } + if (usage & kReadOnlyStorageBuffer) { + flags |= VK_ACCESS_SHADER_READ_BIT; + } if (usage & wgpu::BufferUsage::Indirect) { flags |= VK_ACCESS_INDIRECT_COMMAND_READ_BIT; }