Open fintelia opened 2 years ago
Naga's GLSL frontend does not currently handle atomic operations. For example, this shader:
#version 460 core layout(std430, binding = 0) buffer Buffer { uint x; } buf; void main() { atomicAdd(buf.x, 1); }
Produces this error:
error: Unknown function 'atomicAdd' ┌─ shader.comp:8:5 │ 8 │ atomicAdd(buf.x, 1); │ ^^^^^^^^^^^^^^^^^^^
(I couldn't find an existing tracking issue for this, though gfx-rs/naga#1154 and gfx-rs/naga#929 are related.)
Would adding atomics for glsl mean that spirv gets atomics automatically?
No. The frontends are generally completely separate bits of code.
Naga's GLSL frontend does not currently handle atomic operations. For example, this shader:
Produces this error:
(I couldn't find an existing tracking issue for this, though gfx-rs/naga#1154 and gfx-rs/naga#929 are related.)