How can I use VK_EXT_shader_atomic_float in a GLSL 4.6 compute shader?

I’m trying to write a compute shader that really needs to be able to use atomicAdd() on a floating point storage buffer. Unfortunately, GLSL 4.6 only supports atomicAdd for int and uint data types. However, VK_EXT_shader_atomic_float was added to the specification in 2020, so I’d expect to see it in the GLSL language. How can I take advantage of this? Is there a way I can use an atomicAdd() on a float in a GLSL shader?

VK_EXT_shader_atomic_float spec:
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_shader_atomic_float.html

Can you not just enable the GL_EXT_shader_atomic_float extension? You know, the one mentioned in the VK extension.

I’m trying to do this within the Godot environment which poses a lot of restrictions that aren’t present if you’re writing C++ and using the Vulkan API directly. I don’t think it provides any way to enable extensions through it’s UI. I was hoping there might be some other way to do it.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.