Replies: 1 comment 2 replies
-
WGSL doesn't support write-only storage buffers, at least not yet. If you look at https://gpuweb.github.io/gpuweb/wgsl/#storage-class table, it lists the allowed access qualifiers for each class. Storage class can only be |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I have a storage buffer that is used as an output in a render pass - WGSL allows me to specify its class as write-only, like so:
I can't find a way to specify the corresponding storage class on the native side - I can set the storage buffer to read only or read write, but not write only given the structure of
BindingType::Storage
This of course results in an error when I build the pipeline since the storage class is mismatched. For now I have set the buffer to
read_write
in the shader and this works fine, but I am not sure if I am missing how to specify a write-only class in native, or if indeed there is no way to do so. Since WGSL supports write-only I think it would make sense for wgpu to also have support.Thanks! :)
A=
Beta Was this translation helpful? Give feedback.
All reactions