summaryrefslogtreecommitdiff
path: root/appendices/VK_EXT_shader_atomic_float2.adoc
blob: 2ee46d35090a931da262064b6e8ca0f7fa2d0e91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright 2018-2023 The Khronos Group Inc.
//
// SPDX-License-Identifier: CC-BY-4.0

include::{generated}/meta/{refprefix}VK_EXT_shader_atomic_float2.adoc[]

=== Other Extension Metadata

*Last Modified Date*::
    2020-08-14
*IP Status*::
    No known IP claims.
*Interactions and External Dependencies*::
  - This extension requires the VK_EXT_shader_atomic_float extension.
  - This extension requires
    {spirv}/EXT/SPV_EXT_shader_atomic_float_min_max.html[`SPV_EXT_shader_atomic_float_min_max`]
    and
    {spirv}/EXT/SPV_EXT_shader_atomic_float16_add.html[`SPV_EXT_shader_atomic_float16_add`]
  - This extension provides API support for
    {GLSLregistry}/ext/GLSL_EXT_shader_atomic_float2.txt[`GLSL_EXT_shader_atomic_float2`]
*Contributors*::
  - Faith Ekstrand, Intel

=== Description

This extension allows a shader to perform 16-bit floating-point atomic
operations on buffer and workgroup memory as well as floating-point atomic
minimum and maximum operations on buffer, workgroup, and image memory.
It advertises the SPIR-V code:AtomicFloat16AddEXT capability which allows
atomic add operations on 16-bit floating-point numbers and the SPIR-V
code:AtomicFloat16MinMaxEXT, code:AtomicFloat32MinMaxEXT and
code:AtomicFloat64MinMaxEXT capabilities which allow atomic minimum and
maximum operations on floating-point numbers.
The supported operations include code:OpAtomicFAddEXT, code:OpAtomicFMinEXT
and code:OpAtomicFMaxEXT.

include::{generated}/interfaces/VK_EXT_shader_atomic_float2.adoc[]

=== Issues

1) Should this extension add support for 16-bit image atomics?

*RESOLVED*: No.
While Vulkan supports creating storage images with
ename:VK_FORMAT_R16_SFLOAT and doing load and store on them, the data in the
shader has a 32-bit representation.
Vulkan currently has no facility for even basic reading or writing such
images using 16-bit float values in the shader.
Adding such functionality would be required before 16-bit image atomics
would make sense and is outside the scope of this extension.

=== New SPIR-V Capabilities

  * <<spirvenv-capabilities-table-AtomicFloat16AddEXT,
    code:AtomicFloat32MinMaxEXT>>
  * <<spirvenv-capabilities-table-AtomicFloat16MinMaxEXT,
    code:AtomicFloat32MinMaxEXT>>
  * <<spirvenv-capabilities-table-AtomicFloat32MinMaxEXT,
    code:AtomicFloat32MinMaxEXT>>
  * <<spirvenv-capabilities-table-AtomicFloat64MinMaxEXT,
    code:AtomicFloat64MinMaxEXT>>

=== Version History

  * Revision 1, 2020-08-14 (Faith Ekstrand)
  ** Internal revisions