-
Are there any plans/scheludes to implement atomic types and control barriers on wgsl? It seems the use of atomicAdd and barrier are working in GLSL => SPIR-V when I disable the shader validations (tested only with Vulkan/linux/win10). The wgpu-rs logs some warnings: WARN [wgpu_core::device] Failed to parse shader SPIR-V code: UnsupportedInstruction(Function, ControlBarrier) What aren't these instructions supported? Some undefined behavior, compatibility issues? I converted my marching cubes GLSL shader to wgsl, but it looks like there are no implementation for https://github.com/jaankaup/wgpu_rs_project/blob/main/shaders_wgsl/mc_test.wgsl The atomic types and atomicAdd seems to be the bottleneck in this case. If I comment out atomic related stuff, it compiles. I'm really excited to get these compute shaders to work on web some day : ) . |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 1 reply
-
WGSL's specification for these have been merged very recently, see: We are in process of adding support for these into Naga's IR, and consequently - the validation will recognize these constructs. |
Beta Was this translation helpful? Give feedback.
WGSL's specification for these have been merged very recently, see:
We are in process of adding support for these into Naga's IR, and consequently - the validation will recognize these constructs.
gfx-rs/naga#817