Dependencies
This extension is written against the SPIR-V Specification, Version 1.6 Revision 3.
This extension requires SPIR-V 1.0.
This extension reuses instructions from extensions
SPV_EXT_shader_atomic_float_add and SPV_EXT_shader_atomic_float_min_max
but does not require them to be supported or enabled.
Overview
This extension adds support for atomic add, min, max and exchange instructions on float16 vectors with 2 or 4 components.
Extension Name
To use this extension within a SPIR-V module, the following OpExtension must be present in the module:
OpExtension "SPV_NV_shader_atomic_fp16_vector"
Modifications to the SPIR-V Specification, Version 1.5
Modify Section 3.31, "Capability", adding this row to the Capability table:
| Capability | Implicitly Declares | |
|---|---|---|
6095 |
AtomicFloat16VectorNV |
|
Modify section 3.49.18, Atomic Instructions:
Add the AtomicFloat16VectorNV capability to the OpAtomicFAddEXT, OpAtomicFMinEXT, and OpAtomicFMaxEXT instructions,
Modify each of the instructions OpAtomicFAddEXT, OpAtomicFMinEXT, OpAtomicFMaxEXT, and OpAtomicExchange to allow the Result Type to be a vector of float16 with two or four components. Atomic operations on vectors only guarantee atomicity of each component.
Validation Rules
An OpExtension must be added to the SPIR-V for validation layers to check legal use of this extension:
OpExtension "SPV_NV_shader_atomic_fp16_vector"
-
When using OpAtomicFAddEXT, OpAtomicExchange, OpAtomicFMinEXT or OpAtomicFMaxEXT float16 vector with 2 or 4 components are allowed.
-
If OpAtomicFAddEXT, OpAtomicExchange, OpAtomicFMinEXT or OpAtomicFMaxEXT is used with float16 vector with 2 or 4 components, the AtomicFloat16VectorNV capability must be declared.