For OpenGL, the Nvidia extension NV_shader_atomic_float
[1] exists which enables atomic read-modify-write operations to buffer or texture memory with floating-point components in GLSL shaders.
Does this functionality also exist with Vulkan? I couldn't find information about any extension which would enable that. Is that functionality not provided via a Vulkan extension?
[1] https://www.khronos.org/registry/OpenGL/extensions/NV/NV_shader_atomic_float.txt
No, there is no Vulkan extension that provides atomic floating-point operations (yet?). Presumably Nvidia could create such an extension if they saw enough developer demand for it.
SPIR-V supports atomic instructions with floating-point types, but SPIR-V modules that contain those are currently forbidden by Vulkan's SPIR-V environment spec:
Atomic instructions must declare a scalar 32-bit integer type, or a scalar 64-bit integer type if the
Int64Atomics
capability is enabled, for the value pointed to by Pointer.
Here it is: VK_EXT_shader_atomic_float
The extension has been added in July 2020 by NVIDIA and is compatible with all Vulkan versions.
Citing the spec. description:
This extension allows a shader to contain floating-point atomic operations on buffer, workgroup, and image memory. It also advertises the SPIR-V AtomicFloat32AddEXT and AtomicFloat64AddEXT capabilities that allows atomic addition on floating-points numbers. The supported operations include OpAtomicFAddEXT, OpAtomicExchange, OpAtomicLoad and OpAtomicStore.
There are already some entries on gpuinfo.org indicating support for the extension. Applears like NVIDIA drivers 451.79.0.0 or later are required.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With