From ec54038e7c9c7f5dbb4b0c708bd2d000c09462e8 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Tue, 21 Jan 2020 14:13:27 -0500 Subject: [PATCH] Improve STORAGE_READ support for buffers --- wgpu-core/src/conv.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wgpu-core/src/conv.rs b/wgpu-core/src/conv.rs index 6bc7f182c..3057b8233 100644 --- a/wgpu-core/src/conv.rs +++ b/wgpu-core/src/conv.rs @@ -516,6 +516,9 @@ pub fn map_buffer_state(usage: resource::BufferUsage) -> hal::buffer::State { if usage.contains(W::UNIFORM) { access |= A::UNIFORM_READ | A::SHADER_READ; } + if usage.contains(W::STORAGE_READ) { + access |= A::SHADER_READ; + } if usage.contains(W::STORAGE) { access |= A::SHADER_WRITE; }