Add changes for SPV_EXT_shader_atomic_float_add
This commit is contained in:
parent
1c42d4ee7b
commit
79b93923d2
@ -35,5 +35,6 @@ static const char* const E_SPV_EXT_shader_viewport_index_layer = "SPV_EXT_shade
|
||||
static const char* const E_SPV_EXT_fragment_fully_covered = "SPV_EXT_fragment_fully_covered";
|
||||
static const char* const E_SPV_EXT_fragment_invocation_density = "SPV_EXT_fragment_invocation_density";
|
||||
static const char* const E_SPV_EXT_demote_to_helper_invocation = "SPV_EXT_demote_to_helper_invocation";
|
||||
static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_atomic_float_add";
|
||||
|
||||
#endif // #ifndef GLSLextEXT_H
|
||||
|
@ -6682,6 +6682,14 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
|
||||
case glslang::EOpImageAtomicAdd:
|
||||
case glslang::EOpAtomicCounterAdd:
|
||||
opCode = spv::OpAtomicIAdd;
|
||||
if (typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) {
|
||||
opCode = spv::OpAtomicFAddEXT;
|
||||
builder.addExtension(spv::E_SPV_EXT_shader_atomic_float_add);
|
||||
if (typeProxy == glslang::EbtFloat)
|
||||
builder.addCapability(spv::CapabilityAtomicFloat32AddEXT);
|
||||
else
|
||||
builder.addCapability(spv::CapabilityAtomicFloat64AddEXT);
|
||||
}
|
||||
break;
|
||||
case glslang::EOpAtomicCounterSubtract:
|
||||
opCode = spv::OpAtomicISub;
|
||||
|
@ -938,6 +938,9 @@ const char* CapabilityString(int info)
|
||||
|
||||
case CapabilityIntegerFunctions2INTEL: return "CapabilityIntegerFunctions2INTEL";
|
||||
|
||||
case CapabilityAtomicFloat32AddEXT: return "AtomicFloat32AddEXT";
|
||||
case CapabilityAtomicFloat64AddEXT: return "AtomicFloat64AddEXT";
|
||||
|
||||
default: return "Bad";
|
||||
}
|
||||
}
|
||||
@ -1313,6 +1316,8 @@ const char* OpcodeString(int op)
|
||||
case 4430: return "OpSubgroupAllEqualKHR";
|
||||
case 4432: return "OpSubgroupReadInvocationKHR";
|
||||
|
||||
case OpAtomicFAddEXT: return "OpAtomicFAddEXT";
|
||||
|
||||
case 5000: return "OpGroupIAddNonUniformAMD";
|
||||
case 5001: return "OpGroupFAddNonUniformAMD";
|
||||
case 5002: return "OpGroupFMinNonUniformAMD";
|
||||
@ -2260,6 +2265,11 @@ void Parameterize()
|
||||
InstructionDesc[OpAtomicIAdd].operands.push(OperandMemorySemantics, "'Semantics'");
|
||||
InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Value'");
|
||||
|
||||
InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Pointer'");
|
||||
InstructionDesc[OpAtomicFAddEXT].operands.push(OperandScope, "'Scope'");
|
||||
InstructionDesc[OpAtomicFAddEXT].operands.push(OperandMemorySemantics, "'Semantics'");
|
||||
InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Value'");
|
||||
|
||||
InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Pointer'");
|
||||
InstructionDesc[OpAtomicISub].operands.push(OperandScope, "'Scope'");
|
||||
InstructionDesc[OpAtomicISub].operands.push(OperandMemorySemantics, "'Semantics'");
|
||||
|
658
Test/baseResults/spv.atomicFloat.comp.out
Executable file
658
Test/baseResults/spv.atomicFloat.comp.out
Executable file
@ -0,0 +1,658 @@
|
||||
spv.atomicFloat.comp
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 470
|
||||
|
||||
Capability Shader
|
||||
Capability Float64
|
||||
Capability ImageCubeArray
|
||||
Capability ImageRect
|
||||
Capability Image1D
|
||||
Capability VulkanMemoryModelKHR
|
||||
Capability VulkanMemoryModelDeviceScopeKHR
|
||||
Capability AtomicFloat32AddEXT
|
||||
Capability AtomicFloat64AddEXT
|
||||
Extension "SPV_EXT_shader_atomic_float_add"
|
||||
Extension "SPV_KHR_vulkan_memory_model"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical VulkanKHR
|
||||
EntryPoint GLCompute 4 "main"
|
||||
ExecutionMode 4 LocalSize 16 16 1
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_EXT_shader_atomic_float"
|
||||
SourceExtension "GL_KHR_memory_scope_semantics"
|
||||
Name 4 "main"
|
||||
Name 8 "resultf"
|
||||
Name 11 "atomf"
|
||||
Name 25 "Buffer"
|
||||
MemberName 25(Buffer) 0 "dataf"
|
||||
MemberName 25(Buffer) 1 "datad"
|
||||
Name 27 "buf"
|
||||
Name 34 "resultd"
|
||||
Name 37 "atomd"
|
||||
Name 143 "fimage1D"
|
||||
Name 189 "fimage1DArray"
|
||||
Name 232 "fimage2D"
|
||||
Name 270 "fimage2DRect"
|
||||
Name 308 "fimage2DArray"
|
||||
Name 352 "fimageCube"
|
||||
Name 392 "fimageCubeArray"
|
||||
Name 430 "fimage3D"
|
||||
MemberDecorate 25(Buffer) 0 Offset 0
|
||||
MemberDecorate 25(Buffer) 1 Offset 8
|
||||
Decorate 25(Buffer) BufferBlock
|
||||
Decorate 27(buf) DescriptorSet 0
|
||||
Decorate 27(buf) Binding 0
|
||||
Decorate 143(fimage1D) Location 0
|
||||
Decorate 143(fimage1D) DescriptorSet 0
|
||||
Decorate 143(fimage1D) Binding 0
|
||||
Decorate 189(fimage1DArray) Location 1
|
||||
Decorate 189(fimage1DArray) DescriptorSet 0
|
||||
Decorate 189(fimage1DArray) Binding 1
|
||||
Decorate 232(fimage2D) Location 2
|
||||
Decorate 232(fimage2D) DescriptorSet 0
|
||||
Decorate 232(fimage2D) Binding 2
|
||||
Decorate 270(fimage2DRect) Location 4
|
||||
Decorate 270(fimage2DRect) DescriptorSet 0
|
||||
Decorate 270(fimage2DRect) Binding 4
|
||||
Decorate 308(fimage2DArray) Location 3
|
||||
Decorate 308(fimage2DArray) DescriptorSet 0
|
||||
Decorate 308(fimage2DArray) Binding 3
|
||||
Decorate 352(fimageCube) Location 5
|
||||
Decorate 352(fimageCube) DescriptorSet 0
|
||||
Decorate 352(fimageCube) Binding 5
|
||||
Decorate 392(fimageCubeArray) Location 6
|
||||
Decorate 392(fimageCubeArray) DescriptorSet 0
|
||||
Decorate 392(fimageCubeArray) Binding 6
|
||||
Decorate 430(fimage3D) Location 7
|
||||
Decorate 430(fimage3D) DescriptorSet 0
|
||||
Decorate 430(fimage3D) Binding 9
|
||||
Decorate 469 BuiltIn WorkgroupSize
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypePointer Function 6(float)
|
||||
9: 6(float) Constant 0
|
||||
10: TypePointer Workgroup 6(float)
|
||||
11(atomf): 10(ptr) Variable Workgroup
|
||||
12: 6(float) Constant 1077936128
|
||||
13: TypeInt 32 0
|
||||
14: 13(int) Constant 5
|
||||
15: 13(int) Constant 0
|
||||
17: 6(float) Constant 1083179008
|
||||
18: TypeInt 32 1
|
||||
19: 18(int) Constant 1
|
||||
20: 18(int) Constant 64
|
||||
21: 18(int) Constant 0
|
||||
22: 13(int) Constant 64
|
||||
24: TypeFloat 64
|
||||
25(Buffer): TypeStruct 6(float) 24(float64_t)
|
||||
26: TypePointer Uniform 25(Buffer)
|
||||
27(buf): 26(ptr) Variable Uniform
|
||||
28: TypePointer Uniform 6(float)
|
||||
33: TypePointer Function 24(float64_t)
|
||||
35:24(float64_t) Constant 0 0
|
||||
36: TypePointer Workgroup 24(float64_t)
|
||||
37(atomd): 36(ptr) Variable Workgroup
|
||||
38:24(float64_t) Constant 0 1074266112
|
||||
40:24(float64_t) Constant 0 1074921472
|
||||
42: TypePointer Uniform 24(float64_t)
|
||||
57: 18(int) Constant 256
|
||||
58: 13(int) Constant 256
|
||||
141: TypeImage 6(float) 1D nonsampled format:R32f
|
||||
142: TypePointer UniformConstant 141
|
||||
143(fimage1D): 142(ptr) Variable UniformConstant
|
||||
144: 6(float) Constant 1073741824
|
||||
145: TypePointer Image 6(float)
|
||||
147: 13(int) Constant 32768
|
||||
149: 13(int) Constant 2
|
||||
155: 18(int) Constant 2048
|
||||
157: 13(int) Constant 2048
|
||||
164: 6(float) Constant 1082130432
|
||||
179: 18(int) Constant 2
|
||||
187: TypeImage 6(float) 1D array nonsampled format:R32f
|
||||
188: TypePointer UniformConstant 187
|
||||
189(fimage1DArray): 188(ptr) Variable UniformConstant
|
||||
190: TypeVector 18(int) 2
|
||||
191: 190(ivec2) ConstantComposite 21 21
|
||||
199: 190(ivec2) ConstantComposite 19 19
|
||||
207: 190(ivec2) ConstantComposite 19 21
|
||||
222: 190(ivec2) ConstantComposite 179 179
|
||||
230: TypeImage 6(float) 2D nonsampled format:R32f
|
||||
231: TypePointer UniformConstant 230
|
||||
232(fimage2D): 231(ptr) Variable UniformConstant
|
||||
268: TypeImage 6(float) Rect nonsampled format:R32f
|
||||
269: TypePointer UniformConstant 268
|
||||
270(fimage2DRect): 269(ptr) Variable UniformConstant
|
||||
306: TypeImage 6(float) 2D array nonsampled format:R32f
|
||||
307: TypePointer UniformConstant 306
|
||||
308(fimage2DArray): 307(ptr) Variable UniformConstant
|
||||
309: TypeVector 18(int) 3
|
||||
310: 309(ivec3) ConstantComposite 21 21 21
|
||||
318: 309(ivec3) ConstantComposite 19 19 21
|
||||
326: 309(ivec3) ConstantComposite 19 21 19
|
||||
334: 309(ivec3) ConstantComposite 19 19 19
|
||||
342: 309(ivec3) ConstantComposite 179 179 21
|
||||
350: TypeImage 6(float) Cube nonsampled format:R32f
|
||||
351: TypePointer UniformConstant 350
|
||||
352(fimageCube): 351(ptr) Variable UniformConstant
|
||||
367: 309(ivec3) ConstantComposite 19 21 21
|
||||
382: 309(ivec3) ConstantComposite 179 179 19
|
||||
390: TypeImage 6(float) Cube array nonsampled format:R32f
|
||||
391: TypePointer UniformConstant 390
|
||||
392(fimageCubeArray): 391(ptr) Variable UniformConstant
|
||||
428: TypeImage 6(float) 3D nonsampled format:R32f
|
||||
429: TypePointer UniformConstant 428
|
||||
430(fimage3D): 429(ptr) Variable UniformConstant
|
||||
466: TypeVector 13(int) 3
|
||||
467: 13(int) Constant 16
|
||||
468: 13(int) Constant 1
|
||||
469: 466(ivec3) ConstantComposite 467 467 468
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(resultf): 7(ptr) Variable Function
|
||||
34(resultd): 33(ptr) Variable Function
|
||||
Store 8(resultf) 9
|
||||
16: 6(float) AtomicFAddEXT 11(atomf) 14 15 12
|
||||
Store 8(resultf) 16
|
||||
23: 6(float) AtomicFAddEXT 11(atomf) 19 22 17
|
||||
Store 8(resultf) 23
|
||||
29: 28(ptr) AccessChain 27(buf) 21
|
||||
30: 6(float) AtomicFAddEXT 29 14 15 12
|
||||
Store 8(resultf) 30
|
||||
31: 28(ptr) AccessChain 27(buf) 21
|
||||
32: 6(float) AtomicFAddEXT 31 19 22 17
|
||||
Store 8(resultf) 32
|
||||
Store 34(resultd) 35
|
||||
39:24(float64_t) AtomicFAddEXT 37(atomd) 14 15 38
|
||||
Store 34(resultd) 39
|
||||
41:24(float64_t) AtomicFAddEXT 37(atomd) 19 22 40
|
||||
Store 34(resultd) 41
|
||||
43: 42(ptr) AccessChain 27(buf) 19
|
||||
44:24(float64_t) AtomicFAddEXT 43 14 15 38
|
||||
Store 34(resultd) 44
|
||||
45: 42(ptr) AccessChain 27(buf) 19
|
||||
46:24(float64_t) AtomicFAddEXT 45 19 22 40
|
||||
Store 34(resultd) 46
|
||||
47: 28(ptr) AccessChain 27(buf) 21
|
||||
48: 6(float) Load 8(resultf)
|
||||
49: 6(float) AtomicExchange 47 14 15 48
|
||||
Store 8(resultf) 49
|
||||
50: 6(float) Load 8(resultf)
|
||||
51: 28(ptr) AccessChain 27(buf) 21
|
||||
52: 6(float) Load 51
|
||||
53: 6(float) FAdd 52 50
|
||||
54: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 54 53
|
||||
55: 28(ptr) AccessChain 27(buf) 21
|
||||
56: 6(float) Load 8(resultf)
|
||||
59: 6(float) AtomicExchange 55 19 58 56
|
||||
Store 8(resultf) 59
|
||||
60: 6(float) Load 8(resultf)
|
||||
61: 28(ptr) AccessChain 27(buf) 21
|
||||
62: 6(float) Load 61
|
||||
63: 6(float) FAdd 62 60
|
||||
64: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 64 63
|
||||
65: 6(float) Load 8(resultf)
|
||||
66: 6(float) AtomicExchange 11(atomf) 14 15 65
|
||||
Store 8(resultf) 66
|
||||
67: 6(float) Load 8(resultf)
|
||||
68: 28(ptr) AccessChain 27(buf) 21
|
||||
69: 6(float) Load 68
|
||||
70: 6(float) FAdd 69 67
|
||||
71: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 71 70
|
||||
72: 6(float) Load 8(resultf)
|
||||
73: 6(float) AtomicExchange 11(atomf) 19 58 72
|
||||
Store 8(resultf) 73
|
||||
74: 6(float) Load 8(resultf)
|
||||
75: 28(ptr) AccessChain 27(buf) 21
|
||||
76: 6(float) Load 75
|
||||
77: 6(float) FAdd 76 74
|
||||
78: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 78 77
|
||||
79: 42(ptr) AccessChain 27(buf) 19
|
||||
80:24(float64_t) Load 34(resultd)
|
||||
81:24(float64_t) AtomicExchange 79 14 15 80
|
||||
Store 34(resultd) 81
|
||||
82:24(float64_t) Load 34(resultd)
|
||||
83: 42(ptr) AccessChain 27(buf) 19
|
||||
84:24(float64_t) Load 83
|
||||
85:24(float64_t) FAdd 84 82
|
||||
86: 42(ptr) AccessChain 27(buf) 19
|
||||
Store 86 85
|
||||
87: 42(ptr) AccessChain 27(buf) 19
|
||||
88:24(float64_t) Load 34(resultd)
|
||||
89:24(float64_t) AtomicExchange 87 19 58 88
|
||||
Store 34(resultd) 89
|
||||
90:24(float64_t) Load 34(resultd)
|
||||
91: 42(ptr) AccessChain 27(buf) 19
|
||||
92:24(float64_t) Load 91
|
||||
93:24(float64_t) FAdd 92 90
|
||||
94: 42(ptr) AccessChain 27(buf) 19
|
||||
Store 94 93
|
||||
95:24(float64_t) Load 34(resultd)
|
||||
96:24(float64_t) AtomicExchange 37(atomd) 14 15 95
|
||||
Store 34(resultd) 96
|
||||
97:24(float64_t) Load 34(resultd)
|
||||
98: 42(ptr) AccessChain 27(buf) 19
|
||||
99:24(float64_t) Load 98
|
||||
100:24(float64_t) FAdd 99 97
|
||||
101: 42(ptr) AccessChain 27(buf) 19
|
||||
Store 101 100
|
||||
102:24(float64_t) Load 34(resultd)
|
||||
103:24(float64_t) AtomicExchange 37(atomd) 19 58 102
|
||||
Store 34(resultd) 103
|
||||
104:24(float64_t) Load 34(resultd)
|
||||
105: 42(ptr) AccessChain 27(buf) 19
|
||||
106:24(float64_t) Load 105
|
||||
107:24(float64_t) FAdd 106 104
|
||||
108: 42(ptr) AccessChain 27(buf) 19
|
||||
Store 108 107
|
||||
109: 28(ptr) AccessChain 27(buf) 21
|
||||
110: 6(float) AtomicLoad 109 19 58
|
||||
Store 8(resultf) 110
|
||||
111: 28(ptr) AccessChain 27(buf) 21
|
||||
112: 6(float) Load 8(resultf)
|
||||
AtomicStore 111 19 58 112
|
||||
113: 6(float) Load 8(resultf)
|
||||
114: 28(ptr) AccessChain 27(buf) 21
|
||||
115: 6(float) Load 114
|
||||
116: 6(float) FAdd 115 113
|
||||
117: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 117 116
|
||||
118: 6(float) AtomicLoad 11(atomf) 19 58
|
||||
Store 8(resultf) 118
|
||||
119: 6(float) Load 8(resultf)
|
||||
AtomicStore 11(atomf) 19 58 119
|
||||
120: 6(float) Load 8(resultf)
|
||||
121: 28(ptr) AccessChain 27(buf) 21
|
||||
122: 6(float) Load 121
|
||||
123: 6(float) FAdd 122 120
|
||||
124: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 124 123
|
||||
125: 42(ptr) AccessChain 27(buf) 19
|
||||
126:24(float64_t) AtomicLoad 125 19 58
|
||||
Store 34(resultd) 126
|
||||
127: 42(ptr) AccessChain 27(buf) 19
|
||||
128:24(float64_t) Load 34(resultd)
|
||||
AtomicStore 127 19 58 128
|
||||
129:24(float64_t) Load 34(resultd)
|
||||
130: 42(ptr) AccessChain 27(buf) 19
|
||||
131:24(float64_t) Load 130
|
||||
132:24(float64_t) FAdd 131 129
|
||||
133: 42(ptr) AccessChain 27(buf) 19
|
||||
Store 133 132
|
||||
134:24(float64_t) AtomicLoad 37(atomd) 19 58
|
||||
Store 34(resultd) 134
|
||||
135:24(float64_t) Load 34(resultd)
|
||||
AtomicStore 37(atomd) 19 58 135
|
||||
136:24(float64_t) Load 34(resultd)
|
||||
137: 42(ptr) AccessChain 27(buf) 19
|
||||
138:24(float64_t) Load 137
|
||||
139:24(float64_t) FAdd 138 136
|
||||
140: 42(ptr) AccessChain 27(buf) 19
|
||||
Store 140 139
|
||||
146: 145(ptr) ImageTexelPointer 143(fimage1D) 21 15
|
||||
148: 6(float) AtomicFAddEXT 146 14 147 144
|
||||
Store 11(atomf) 148 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
150: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
151: 28(ptr) AccessChain 27(buf) 21
|
||||
152: 6(float) Load 151
|
||||
153: 6(float) FAdd 152 150
|
||||
154: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 154 153
|
||||
156: 145(ptr) ImageTexelPointer 143(fimage1D) 19 15
|
||||
158: 6(float) AtomicFAddEXT 156 19 157 12
|
||||
Store 11(atomf) 158 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
159: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
160: 28(ptr) AccessChain 27(buf) 21
|
||||
161: 6(float) Load 160
|
||||
162: 6(float) FAdd 161 159
|
||||
163: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 163 162
|
||||
165: 145(ptr) ImageTexelPointer 143(fimage1D) 19 15
|
||||
166: 6(float) AtomicExchange 165 19 157 164
|
||||
Store 11(atomf) 166 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
167: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
168: 28(ptr) AccessChain 27(buf) 21
|
||||
169: 6(float) Load 168
|
||||
170: 6(float) FAdd 169 167
|
||||
171: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 171 170
|
||||
172: 145(ptr) ImageTexelPointer 143(fimage1D) 19 15
|
||||
173: 6(float) AtomicLoad 172 19 157
|
||||
Store 11(atomf) 173 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
174: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
175: 28(ptr) AccessChain 27(buf) 21
|
||||
176: 6(float) Load 175
|
||||
177: 6(float) FAdd 176 174
|
||||
178: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 178 177
|
||||
180: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
181: 145(ptr) ImageTexelPointer 143(fimage1D) 179 15
|
||||
AtomicStore 181 19 157 180
|
||||
182: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
183: 28(ptr) AccessChain 27(buf) 21
|
||||
184: 6(float) Load 183
|
||||
185: 6(float) FAdd 184 182
|
||||
186: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 186 185
|
||||
192: 145(ptr) ImageTexelPointer 189(fimage1DArray) 191 15
|
||||
193: 6(float) AtomicFAddEXT 192 14 147 144
|
||||
Store 11(atomf) 193 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
194: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
195: 28(ptr) AccessChain 27(buf) 21
|
||||
196: 6(float) Load 195
|
||||
197: 6(float) FAdd 196 194
|
||||
198: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 198 197
|
||||
200: 145(ptr) ImageTexelPointer 189(fimage1DArray) 199 15
|
||||
201: 6(float) AtomicFAddEXT 200 19 157 12
|
||||
Store 11(atomf) 201 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
202: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
203: 28(ptr) AccessChain 27(buf) 21
|
||||
204: 6(float) Load 203
|
||||
205: 6(float) FAdd 204 202
|
||||
206: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 206 205
|
||||
208: 145(ptr) ImageTexelPointer 189(fimage1DArray) 207 15
|
||||
209: 6(float) AtomicExchange 208 19 157 164
|
||||
Store 11(atomf) 209 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
210: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
211: 28(ptr) AccessChain 27(buf) 21
|
||||
212: 6(float) Load 211
|
||||
213: 6(float) FAdd 212 210
|
||||
214: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 214 213
|
||||
215: 145(ptr) ImageTexelPointer 189(fimage1DArray) 199 15
|
||||
216: 6(float) AtomicLoad 215 19 157
|
||||
Store 11(atomf) 216 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
217: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
218: 28(ptr) AccessChain 27(buf) 21
|
||||
219: 6(float) Load 218
|
||||
220: 6(float) FAdd 219 217
|
||||
221: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 221 220
|
||||
223: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
224: 145(ptr) ImageTexelPointer 189(fimage1DArray) 222 15
|
||||
AtomicStore 224 19 157 223
|
||||
225: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
226: 28(ptr) AccessChain 27(buf) 21
|
||||
227: 6(float) Load 226
|
||||
228: 6(float) FAdd 227 225
|
||||
229: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 229 228
|
||||
233: 145(ptr) ImageTexelPointer 232(fimage2D) 191 15
|
||||
234: 6(float) AtomicFAddEXT 233 14 147 144
|
||||
Store 11(atomf) 234 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
235: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
236: 28(ptr) AccessChain 27(buf) 21
|
||||
237: 6(float) Load 236
|
||||
238: 6(float) FAdd 237 235
|
||||
239: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 239 238
|
||||
240: 145(ptr) ImageTexelPointer 232(fimage2D) 199 15
|
||||
241: 6(float) AtomicFAddEXT 240 19 157 12
|
||||
Store 11(atomf) 241 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
242: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
243: 28(ptr) AccessChain 27(buf) 21
|
||||
244: 6(float) Load 243
|
||||
245: 6(float) FAdd 244 242
|
||||
246: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 246 245
|
||||
247: 145(ptr) ImageTexelPointer 232(fimage2D) 207 15
|
||||
248: 6(float) AtomicExchange 247 19 157 164
|
||||
Store 11(atomf) 248 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
249: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
250: 28(ptr) AccessChain 27(buf) 21
|
||||
251: 6(float) Load 250
|
||||
252: 6(float) FAdd 251 249
|
||||
253: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 253 252
|
||||
254: 145(ptr) ImageTexelPointer 232(fimage2D) 199 15
|
||||
255: 6(float) AtomicLoad 254 19 157
|
||||
Store 11(atomf) 255 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
256: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
257: 28(ptr) AccessChain 27(buf) 21
|
||||
258: 6(float) Load 257
|
||||
259: 6(float) FAdd 258 256
|
||||
260: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 260 259
|
||||
261: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
262: 145(ptr) ImageTexelPointer 232(fimage2D) 222 15
|
||||
AtomicStore 262 19 157 261
|
||||
263: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
264: 28(ptr) AccessChain 27(buf) 21
|
||||
265: 6(float) Load 264
|
||||
266: 6(float) FAdd 265 263
|
||||
267: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 267 266
|
||||
271: 145(ptr) ImageTexelPointer 270(fimage2DRect) 191 15
|
||||
272: 6(float) AtomicFAddEXT 271 14 147 144
|
||||
Store 11(atomf) 272 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
273: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
274: 28(ptr) AccessChain 27(buf) 21
|
||||
275: 6(float) Load 274
|
||||
276: 6(float) FAdd 275 273
|
||||
277: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 277 276
|
||||
278: 145(ptr) ImageTexelPointer 270(fimage2DRect) 199 15
|
||||
279: 6(float) AtomicFAddEXT 278 19 157 12
|
||||
Store 11(atomf) 279 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
280: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
281: 28(ptr) AccessChain 27(buf) 21
|
||||
282: 6(float) Load 281
|
||||
283: 6(float) FAdd 282 280
|
||||
284: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 284 283
|
||||
285: 145(ptr) ImageTexelPointer 270(fimage2DRect) 207 15
|
||||
286: 6(float) AtomicExchange 285 19 157 164
|
||||
Store 11(atomf) 286 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
287: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
288: 28(ptr) AccessChain 27(buf) 21
|
||||
289: 6(float) Load 288
|
||||
290: 6(float) FAdd 289 287
|
||||
291: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 291 290
|
||||
292: 145(ptr) ImageTexelPointer 270(fimage2DRect) 199 15
|
||||
293: 6(float) AtomicLoad 292 19 157
|
||||
Store 11(atomf) 293 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
294: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
295: 28(ptr) AccessChain 27(buf) 21
|
||||
296: 6(float) Load 295
|
||||
297: 6(float) FAdd 296 294
|
||||
298: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 298 297
|
||||
299: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
300: 145(ptr) ImageTexelPointer 270(fimage2DRect) 222 15
|
||||
AtomicStore 300 19 157 299
|
||||
301: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
302: 28(ptr) AccessChain 27(buf) 21
|
||||
303: 6(float) Load 302
|
||||
304: 6(float) FAdd 303 301
|
||||
305: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 305 304
|
||||
311: 145(ptr) ImageTexelPointer 308(fimage2DArray) 310 15
|
||||
312: 6(float) AtomicFAddEXT 311 14 147 144
|
||||
Store 11(atomf) 312 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
313: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
314: 28(ptr) AccessChain 27(buf) 21
|
||||
315: 6(float) Load 314
|
||||
316: 6(float) FAdd 315 313
|
||||
317: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 317 316
|
||||
319: 145(ptr) ImageTexelPointer 308(fimage2DArray) 318 15
|
||||
320: 6(float) AtomicFAddEXT 319 19 157 12
|
||||
Store 11(atomf) 320 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
321: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
322: 28(ptr) AccessChain 27(buf) 21
|
||||
323: 6(float) Load 322
|
||||
324: 6(float) FAdd 323 321
|
||||
325: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 325 324
|
||||
327: 145(ptr) ImageTexelPointer 308(fimage2DArray) 326 15
|
||||
328: 6(float) AtomicExchange 327 19 157 164
|
||||
Store 11(atomf) 328 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
329: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
330: 28(ptr) AccessChain 27(buf) 21
|
||||
331: 6(float) Load 330
|
||||
332: 6(float) FAdd 331 329
|
||||
333: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 333 332
|
||||
335: 145(ptr) ImageTexelPointer 308(fimage2DArray) 334 15
|
||||
336: 6(float) AtomicLoad 335 19 157
|
||||
Store 11(atomf) 336 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
337: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
338: 28(ptr) AccessChain 27(buf) 21
|
||||
339: 6(float) Load 338
|
||||
340: 6(float) FAdd 339 337
|
||||
341: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 341 340
|
||||
343: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
344: 145(ptr) ImageTexelPointer 308(fimage2DArray) 342 15
|
||||
AtomicStore 344 19 157 343
|
||||
345: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
346: 28(ptr) AccessChain 27(buf) 21
|
||||
347: 6(float) Load 346
|
||||
348: 6(float) FAdd 347 345
|
||||
349: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 349 348
|
||||
353: 145(ptr) ImageTexelPointer 352(fimageCube) 310 15
|
||||
354: 6(float) AtomicFAddEXT 353 14 147 144
|
||||
Store 11(atomf) 354 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
355: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
356: 28(ptr) AccessChain 27(buf) 21
|
||||
357: 6(float) Load 356
|
||||
358: 6(float) FAdd 357 355
|
||||
359: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 359 358
|
||||
360: 145(ptr) ImageTexelPointer 352(fimageCube) 318 15
|
||||
361: 6(float) AtomicFAddEXT 360 19 157 12
|
||||
Store 11(atomf) 361 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
362: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
363: 28(ptr) AccessChain 27(buf) 21
|
||||
364: 6(float) Load 363
|
||||
365: 6(float) FAdd 364 362
|
||||
366: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 366 365
|
||||
368: 145(ptr) ImageTexelPointer 352(fimageCube) 367 15
|
||||
369: 6(float) AtomicExchange 368 19 157 164
|
||||
Store 11(atomf) 369 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
370: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
371: 28(ptr) AccessChain 27(buf) 21
|
||||
372: 6(float) Load 371
|
||||
373: 6(float) FAdd 372 370
|
||||
374: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 374 373
|
||||
375: 145(ptr) ImageTexelPointer 352(fimageCube) 334 15
|
||||
376: 6(float) AtomicLoad 375 19 157
|
||||
Store 11(atomf) 376 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
377: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
378: 28(ptr) AccessChain 27(buf) 21
|
||||
379: 6(float) Load 378
|
||||
380: 6(float) FAdd 379 377
|
||||
381: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 381 380
|
||||
383: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
384: 145(ptr) ImageTexelPointer 352(fimageCube) 382 15
|
||||
AtomicStore 384 19 157 383
|
||||
385: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
386: 28(ptr) AccessChain 27(buf) 21
|
||||
387: 6(float) Load 386
|
||||
388: 6(float) FAdd 387 385
|
||||
389: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 389 388
|
||||
393: 145(ptr) ImageTexelPointer 392(fimageCubeArray) 310 15
|
||||
394: 6(float) AtomicFAddEXT 393 14 147 144
|
||||
Store 11(atomf) 394 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
395: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
396: 28(ptr) AccessChain 27(buf) 21
|
||||
397: 6(float) Load 396
|
||||
398: 6(float) FAdd 397 395
|
||||
399: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 399 398
|
||||
400: 145(ptr) ImageTexelPointer 392(fimageCubeArray) 318 15
|
||||
401: 6(float) AtomicFAddEXT 400 19 157 12
|
||||
Store 11(atomf) 401 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
402: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
403: 28(ptr) AccessChain 27(buf) 21
|
||||
404: 6(float) Load 403
|
||||
405: 6(float) FAdd 404 402
|
||||
406: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 406 405
|
||||
407: 145(ptr) ImageTexelPointer 392(fimageCubeArray) 326 15
|
||||
408: 6(float) AtomicExchange 407 19 157 164
|
||||
Store 11(atomf) 408 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
409: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
410: 28(ptr) AccessChain 27(buf) 21
|
||||
411: 6(float) Load 410
|
||||
412: 6(float) FAdd 411 409
|
||||
413: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 413 412
|
||||
414: 145(ptr) ImageTexelPointer 392(fimageCubeArray) 334 15
|
||||
415: 6(float) AtomicLoad 414 19 157
|
||||
Store 11(atomf) 415 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
416: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
417: 28(ptr) AccessChain 27(buf) 21
|
||||
418: 6(float) Load 417
|
||||
419: 6(float) FAdd 418 416
|
||||
420: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 420 419
|
||||
421: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
422: 145(ptr) ImageTexelPointer 392(fimageCubeArray) 342 15
|
||||
AtomicStore 422 19 157 421
|
||||
423: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
424: 28(ptr) AccessChain 27(buf) 21
|
||||
425: 6(float) Load 424
|
||||
426: 6(float) FAdd 425 423
|
||||
427: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 427 426
|
||||
431: 145(ptr) ImageTexelPointer 430(fimage3D) 310 15
|
||||
432: 6(float) AtomicFAddEXT 431 14 147 144
|
||||
Store 11(atomf) 432 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
433: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
434: 28(ptr) AccessChain 27(buf) 21
|
||||
435: 6(float) Load 434
|
||||
436: 6(float) FAdd 435 433
|
||||
437: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 437 436
|
||||
438: 145(ptr) ImageTexelPointer 430(fimage3D) 318 15
|
||||
439: 6(float) AtomicFAddEXT 438 19 157 12
|
||||
Store 11(atomf) 439 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
440: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
441: 28(ptr) AccessChain 27(buf) 21
|
||||
442: 6(float) Load 441
|
||||
443: 6(float) FAdd 442 440
|
||||
444: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 444 443
|
||||
445: 145(ptr) ImageTexelPointer 430(fimage3D) 326 15
|
||||
446: 6(float) AtomicExchange 445 19 157 164
|
||||
Store 11(atomf) 446 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
447: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
448: 28(ptr) AccessChain 27(buf) 21
|
||||
449: 6(float) Load 448
|
||||
450: 6(float) FAdd 449 447
|
||||
451: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 451 450
|
||||
452: 145(ptr) ImageTexelPointer 430(fimage3D) 334 15
|
||||
453: 6(float) AtomicLoad 452 19 157
|
||||
Store 11(atomf) 453 MakePointerAvailableKHR NonPrivatePointerKHR 149
|
||||
454: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
455: 28(ptr) AccessChain 27(buf) 21
|
||||
456: 6(float) Load 455
|
||||
457: 6(float) FAdd 456 454
|
||||
458: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 458 457
|
||||
459: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
460: 145(ptr) ImageTexelPointer 430(fimage3D) 342 15
|
||||
AtomicStore 460 19 157 459
|
||||
461: 6(float) Load 11(atomf) MakePointerVisibleKHR NonPrivatePointerKHR 149
|
||||
462: 28(ptr) AccessChain 27(buf) 21
|
||||
463: 6(float) Load 462
|
||||
464: 6(float) FAdd 463 461
|
||||
465: 28(ptr) AccessChain 27(buf) 21
|
||||
Store 465 464
|
||||
Return
|
||||
FunctionEnd
|
57
Test/baseResults/spv.atomicFloat_Error.comp.out
Executable file
57
Test/baseResults/spv.atomicFloat_Error.comp.out
Executable file
@ -0,0 +1,57 @@
|
||||
spv.atomicFloat_Error.comp
|
||||
ERROR: 0:25: 'atomicAdd' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:26: 'atomicAdd' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:27: 'atomicAdd' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:28: 'atomicAdd' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:31: 'atomicAdd' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:32: 'atomicAdd' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:33: 'atomicAdd' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:34: 'atomicAdd' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:37: 'atomicExchange' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:38: 'atomicExchange' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:39: 'atomicExchange' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:40: 'atomicExchange' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:43: 'atomicExchange' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:44: 'atomicExchange' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:45: 'atomicExchange' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:46: 'atomicExchange' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:50: 'atomicLoad' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:51: 'atomicStore' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:52: 'atomicLoad' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:53: 'atomicStore' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:56: 'atomicLoad' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:57: 'atomicStore' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:58: 'atomicLoad' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:59: 'atomicStore' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:63: 'imageAtomicAdd' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:64: 'imageAtomicAdd' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:66: 'imageAtomicLoad' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:67: 'imageAtomicStore' : required extension not requested: GL_EXT_shader_atomic_float
|
||||
ERROR: 0:80: 'atomicAdd' : no matching overloaded function found
|
||||
ERROR: 0:81: 'atomicAdd' : no matching overloaded function found
|
||||
ERROR: 0:82: 'atomicAdd' : no matching overloaded function found
|
||||
ERROR: 0:83: 'atomicAdd' : no matching overloaded function found
|
||||
ERROR: 0:86: 'atomicExchange' : no matching overloaded function found
|
||||
ERROR: 0:87: 'atomicExchange' : no matching overloaded function found
|
||||
ERROR: 0:88: 'atomicExchange' : no matching overloaded function found
|
||||
ERROR: 0:89: 'atomicExchange' : no matching overloaded function found
|
||||
ERROR: 0:90: 'atomicExchange' : no matching overloaded function found
|
||||
ERROR: 0:91: 'atomicExchange' : no matching overloaded function found
|
||||
ERROR: 0:95: 'atomicLoad' : no matching overloaded function found
|
||||
ERROR: 0:96: 'atomicStore' : no matching overloaded function found
|
||||
ERROR: 0:99: 'imageAtomicAdd' : no matching overloaded function found
|
||||
ERROR: 0:100: 'imageAtomicAdd' : no matching overloaded function found
|
||||
ERROR: 0:101: 'imageAtomicAdd' : no matching overloaded function found
|
||||
ERROR: 0:102: 'imageAtomicExchange' : no matching overloaded function found
|
||||
ERROR: 0:103: 'imageAtomicExchange' : no matching overloaded function found
|
||||
ERROR: 0:104: 'imageAtomicExchange' : no matching overloaded function found
|
||||
ERROR: 0:105: 'imageAtomicLoad' : no matching overloaded function found
|
||||
ERROR: 0:106: 'imageAtomicLoad' : no matching overloaded function found
|
||||
ERROR: 0:107: 'imageAtomicLoad' : no matching overloaded function found
|
||||
ERROR: 0:108: 'imageAtomicStore' : no matching overloaded function found
|
||||
ERROR: 0:109: 'imageAtomicStore' : no matching overloaded function found
|
||||
ERROR: 0:110: 'imageAtomicStore' : no matching overloaded function found
|
||||
ERROR: 52 compilation errors. No code generated.
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
197
Test/spv.atomicFloat.comp
Executable file
197
Test/spv.atomicFloat.comp
Executable file
@ -0,0 +1,197 @@
|
||||
#version 450 core
|
||||
|
||||
#extension GL_KHR_memory_scope_semantics : enable
|
||||
#extension GL_EXT_shader_atomic_float: enable
|
||||
#pragma use_vulkan_memory_model
|
||||
|
||||
layout(local_size_x = 16, local_size_y = 16) in;
|
||||
|
||||
layout(binding = 0) buffer Buffer
|
||||
{
|
||||
float dataf;
|
||||
double datad;
|
||||
} buf;
|
||||
|
||||
shared float atomf;
|
||||
shared double atomd;
|
||||
|
||||
layout(binding = 0, r32f) volatile coherent uniform image1D fimage1D;
|
||||
layout(binding = 1, r32f) volatile coherent uniform image1DArray fimage1DArray;
|
||||
layout(binding = 2, r32f) volatile coherent uniform image2D fimage2D;
|
||||
layout(binding = 3, r32f) volatile coherent uniform image2DArray fimage2DArray;
|
||||
layout(binding = 4, r32f) volatile coherent uniform image2DRect fimage2DRect;
|
||||
layout(binding = 5, r32f) volatile coherent uniform imageCube fimageCube;
|
||||
layout(binding = 6, r32f) volatile coherent uniform imageCubeArray fimageCubeArray;
|
||||
layout(binding = 9, r32f) volatile coherent uniform image3D fimage3D;
|
||||
|
||||
void main()
|
||||
{
|
||||
//atomicAdd
|
||||
float resultf = 0;
|
||||
resultf = atomicAdd(atomf, 3.0);
|
||||
resultf = atomicAdd(atomf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||
resultf = atomicAdd(buf.dataf, 3.0);
|
||||
resultf = atomicAdd(buf.dataf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||
|
||||
double resultd = 0;
|
||||
resultd = atomicAdd(atomd, 3.0);
|
||||
resultd = atomicAdd(atomd, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||
resultd = atomicAdd(buf.datad, 3.0);
|
||||
resultd = atomicAdd(buf.datad, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||
|
||||
//atomicExchange
|
||||
resultf = atomicExchange(buf.dataf, resultf);
|
||||
buf.dataf += resultf;
|
||||
resultf = atomicExchange(buf.dataf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
buf.dataf += resultf;
|
||||
resultf = atomicExchange(atomf, resultf);
|
||||
buf.dataf += resultf;
|
||||
resultf = atomicExchange(atomf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
buf.dataf += resultf;
|
||||
|
||||
resultd = atomicExchange(buf.datad, resultd);
|
||||
buf.datad += resultd;
|
||||
resultd = atomicExchange(buf.datad, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
buf.datad += resultd;
|
||||
resultd = atomicExchange(atomd, resultd);
|
||||
buf.datad += resultd;
|
||||
resultd = atomicExchange(atomd, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
buf.datad += resultd;
|
||||
|
||||
//atomic load/store
|
||||
resultf = atomicLoad(buf.dataf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
atomicStore(buf.dataf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
buf.dataf += resultf;
|
||||
|
||||
resultf = atomicLoad(atomf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
atomicStore(atomf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
buf.dataf += resultf;
|
||||
|
||||
resultd = atomicLoad(buf.datad, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
atomicStore(buf.datad, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
buf.datad += resultd;
|
||||
|
||||
resultd = atomicLoad(atomd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
atomicStore(atomd, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
buf.datad += resultd;
|
||||
|
||||
// image atomics on 1D:
|
||||
atomf = imageAtomicAdd(fimage1D, int(0), 2.0);
|
||||
buf.dataf += atomf;
|
||||
atomf = imageAtomicAdd(fimage1D, int(1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
atomf = imageAtomicExchange(fimage1D, int(1), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
atomf = imageAtomicLoad(fimage1D, int(1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
imageAtomicStore(fimage1D, int(2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
// image atomics on 1D Array:
|
||||
atomf = imageAtomicAdd(fimage1DArray, ivec2(0,0), 2.0);
|
||||
buf.dataf += atomf;
|
||||
atomf = imageAtomicAdd(fimage1DArray, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
atomf = imageAtomicExchange(fimage1DArray, ivec2(1,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
atomf = imageAtomicLoad(fimage1DArray, ivec2(1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
imageAtomicStore(fimage1DArray, ivec2(2,2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
// image atomics on 2D:
|
||||
atomf = imageAtomicAdd(fimage2D, ivec2(0,0), 2.0);
|
||||
buf.dataf += atomf;
|
||||
atomf = imageAtomicAdd(fimage2D, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
atomf = imageAtomicExchange(fimage2D, ivec2(1,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
atomf = imageAtomicLoad(fimage2D, ivec2(1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
imageAtomicStore(fimage2D, ivec2(2,2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
// image atomics on 2D Rect:
|
||||
atomf = imageAtomicAdd(fimage2DRect, ivec2(0,0), 2.0);
|
||||
buf.dataf += atomf;
|
||||
atomf = imageAtomicAdd(fimage2DRect, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
atomf = imageAtomicExchange(fimage2DRect, ivec2(1,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
atomf = imageAtomicLoad(fimage2DRect, ivec2(1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
imageAtomicStore(fimage2DRect, ivec2(2,2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
// image atomics on 2D Array:
|
||||
atomf = imageAtomicAdd(fimage2DArray, ivec3(0,0,0), 2.0);
|
||||
buf.dataf += atomf;
|
||||
atomf = imageAtomicAdd(fimage2DArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
atomf = imageAtomicExchange(fimage2DArray, ivec3(1,0,1), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
atomf = imageAtomicLoad(fimage2DArray, ivec3(1,1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
imageAtomicStore(fimage2DArray, ivec3(2,2,0), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
// image atomics on Cube:
|
||||
atomf = imageAtomicAdd(fimageCube, ivec3(0,0,0), 2.0);
|
||||
buf.dataf += atomf;
|
||||
atomf = imageAtomicAdd(fimageCube, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
atomf = imageAtomicExchange(fimageCube, ivec3(1,0,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
atomf = imageAtomicLoad(fimageCube, ivec3(1,1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
imageAtomicStore(fimageCube, ivec3(2,2,1), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
// image atomics on Cube Array:
|
||||
atomf = imageAtomicAdd(fimageCubeArray, ivec3(0,0,0), 2.0);
|
||||
buf.dataf += atomf;
|
||||
atomf = imageAtomicAdd(fimageCubeArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
atomf = imageAtomicExchange(fimageCubeArray, ivec3(1,0,1), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
atomf = imageAtomicLoad(fimageCubeArray, ivec3(1,1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
imageAtomicStore(fimageCubeArray, ivec3(2,2,0), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
// image atomics on 3D:
|
||||
atomf = imageAtomicAdd(fimage3D, ivec3(0,0,0), 2.0);
|
||||
buf.dataf += atomf;
|
||||
atomf = imageAtomicAdd(fimage3D, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
atomf = imageAtomicExchange(fimage3D, ivec3(1,0,1), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
atomf = imageAtomicLoad(fimage3D, ivec3(1,1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
|
||||
imageAtomicStore(fimage3D, ivec3(2,2,0), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
}
|
112
Test/spv.atomicFloat_Error.comp
Executable file
112
Test/spv.atomicFloat_Error.comp
Executable file
@ -0,0 +1,112 @@
|
||||
#version 450 core
|
||||
#extension GL_KHR_memory_scope_semantics : enable
|
||||
#pragma use_vulkan_memory_model
|
||||
|
||||
layout(local_size_x = 16, local_size_y = 16) in;
|
||||
|
||||
layout(binding = 0) buffer Buffer
|
||||
{
|
||||
int datai;
|
||||
float dataf;
|
||||
double datad;
|
||||
} buf;
|
||||
|
||||
shared int atomi;
|
||||
shared float atomf;
|
||||
shared double atomd;
|
||||
|
||||
layout(binding = 0, r32f) volatile coherent uniform image1D fimage1D;
|
||||
layout(binding = 1, r32f) volatile coherent uniform image2D fimage2D;
|
||||
|
||||
void undeclared_errors()
|
||||
{
|
||||
//atomicAdd
|
||||
float resultf = 0;
|
||||
resultf = atomicAdd(atomf, 3.0);
|
||||
resultf = atomicAdd(atomf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||
resultf = atomicAdd(buf.dataf, 3.0);
|
||||
resultf = atomicAdd(buf.dataf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||
|
||||
double resultd = 0;
|
||||
resultd = atomicAdd(atomd, 3.0);
|
||||
resultd = atomicAdd(atomd, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||
resultd = atomicAdd(buf.datad, 3.0);
|
||||
resultd = atomicAdd(buf.datad, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||
|
||||
//atomicExchange
|
||||
resultf = atomicExchange(buf.dataf, resultf);
|
||||
resultf = atomicExchange(buf.dataf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
resultf = atomicExchange(atomf, resultf);
|
||||
resultf = atomicExchange(atomf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
buf.dataf += resultf;
|
||||
|
||||
resultd = atomicExchange(buf.datad, resultd);
|
||||
resultd = atomicExchange(buf.datad, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
resultd = atomicExchange(atomd, resultd);
|
||||
resultd = atomicExchange(atomd, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
buf.datad += resultd;
|
||||
|
||||
//atomic load/store
|
||||
resultf = atomicLoad(buf.dataf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
atomicStore(buf.dataf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
resultf = atomicLoad(atomf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
atomicStore(atomf, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
buf.dataf += resultf;
|
||||
|
||||
resultd = atomicLoad(buf.datad, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
atomicStore(buf.datad, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
resultd = atomicLoad(atomd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
atomicStore(atomd, resultd, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
buf.datad += resultd;
|
||||
|
||||
// image atomics:
|
||||
atomf = imageAtomicAdd(fimage2D, ivec2(0,0), 2.0);
|
||||
atomf = imageAtomicAdd(fimage2D, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||
atomf = imageAtomicExchange(fimage2D, ivec2(1,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
atomf = imageAtomicLoad(fimage2D, ivec2(1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
imageAtomicStore(fimage2D, ivec2(2,2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
}
|
||||
|
||||
#extension GL_EXT_shader_atomic_float: enable
|
||||
|
||||
void main()
|
||||
{
|
||||
float resultf = 0;
|
||||
double resultd = 0;
|
||||
int resulti = 0;
|
||||
|
||||
//atomicAdd
|
||||
resultf = atomicAdd(atomi);
|
||||
resultf = atomicAdd(atomi, 3.0);
|
||||
resultf = atomicAdd(atomi, resultf, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||
resultf = atomicAdd(atomi, resultf, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||
|
||||
//atomicExchange
|
||||
resultf = atomicExchange(buf.datai);
|
||||
resultf = atomicExchange(buf.datai, resultf);
|
||||
resultf = atomicExchange(buf.datai, resultf, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
resultf = atomicExchange(buf.datai, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
resultf = atomicExchange(atomi, resultf);
|
||||
resultf = atomicExchange(atomi, resultf, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
buf.dataf += resultf;
|
||||
|
||||
//atomic load/store
|
||||
resultf = atomicLoad(buf.datai, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
atomicStore(buf.datai, resulti, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||
|
||||
// image atomics:
|
||||
atomf = imageAtomicAdd(fimage1D, ivec2(0,0), 2.0);
|
||||
atomf = imageAtomicAdd(fimage2D, ivec3(0,0,0), 2.0);
|
||||
atomf = imageAtomicAdd(fimage2D, 2.0);
|
||||
atomf = imageAtomicExchange(fimage1D, ivec2(1,0), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
atomf = imageAtomicExchange(fimage2D, 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
atomf = imageAtomicExchange(fimage2D, ivec3(1,0,1), 4.0, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
atomf = imageAtomicLoad(fimage1D, ivec2(1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
atomf = imageAtomicLoad(fimage2D, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
atomf = imageAtomicLoad(fimage2D, ivec3(1,1,1), gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
imageAtomicStore(fimage1D, ivec2(2,2), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
imageAtomicStore(fimage2D, atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
imageAtomicStore(fimage2D, ivec3(2,2,1), atomf, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
|
||||
buf.dataf += atomf;
|
||||
}
|
@ -1241,11 +1241,19 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
" int64_t atomicAdd(coherent volatile inout int64_t, int64_t);"
|
||||
"uint64_t atomicAdd(coherent volatile inout uint64_t, uint64_t, int, int, int);"
|
||||
" int64_t atomicAdd(coherent volatile inout int64_t, int64_t, int, int, int);"
|
||||
" float atomicAdd(coherent volatile inout float, float);"
|
||||
" float atomicAdd(coherent volatile inout float, float, int, int, int);"
|
||||
" double atomicAdd(coherent volatile inout double, double);"
|
||||
" double atomicAdd(coherent volatile inout double, double, int, int, int);"
|
||||
|
||||
"uint64_t atomicExchange(coherent volatile inout uint64_t, uint64_t);"
|
||||
" int64_t atomicExchange(coherent volatile inout int64_t, int64_t);"
|
||||
"uint64_t atomicExchange(coherent volatile inout uint64_t, uint64_t, int, int, int);"
|
||||
" int64_t atomicExchange(coherent volatile inout int64_t, int64_t, int, int, int);"
|
||||
" float atomicExchange(coherent volatile inout float, float);"
|
||||
" float atomicExchange(coherent volatile inout float, float, int, int, int);"
|
||||
" double atomicExchange(coherent volatile inout double, double);"
|
||||
" double atomicExchange(coherent volatile inout double, double, int, int, int);"
|
||||
|
||||
"uint64_t atomicCompSwap(coherent volatile inout uint64_t, uint64_t, uint64_t);"
|
||||
" int64_t atomicCompSwap(coherent volatile inout int64_t, int64_t, int64_t);"
|
||||
@ -1254,9 +1262,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
|
||||
"uint64_t atomicLoad(coherent volatile in uint64_t, int, int, int);"
|
||||
" int64_t atomicLoad(coherent volatile in int64_t, int, int, int);"
|
||||
" float atomicLoad(coherent volatile in float, int, int, int);"
|
||||
" double atomicLoad(coherent volatile in double, int, int, int);"
|
||||
|
||||
"void atomicStore(coherent volatile out uint64_t, uint64_t, int, int, int);"
|
||||
"void atomicStore(coherent volatile out int64_t, int64_t, int, int, int);"
|
||||
"void atomicStore(coherent volatile out float, float, int, int, int);"
|
||||
"void atomicStore(coherent volatile out double, double, int, int, int);"
|
||||
"\n");
|
||||
}
|
||||
#endif
|
||||
@ -6013,12 +6025,39 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int
|
||||
// not int or uint
|
||||
// GL_ARB_ES3_1_compatibility
|
||||
// TODO: spec issue: are there restrictions on the kind of layout() that can be used? what about dropping memory qualifiers?
|
||||
if ((profile != EEsProfile && version >= 450) ||
|
||||
(profile == EEsProfile && version >= 310)) {
|
||||
if (profile == EEsProfile && version >= 310) {
|
||||
commonBuiltins.append("float imageAtomicExchange(volatile coherent ");
|
||||
commonBuiltins.append(imageParams);
|
||||
commonBuiltins.append(", float);\n");
|
||||
}
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
commonBuiltins.append("float imageAtomicAdd(volatile coherent ");
|
||||
commonBuiltins.append(imageParams);
|
||||
commonBuiltins.append(", float);\n");
|
||||
|
||||
commonBuiltins.append("float imageAtomicAdd(volatile coherent ");
|
||||
commonBuiltins.append(imageParams);
|
||||
commonBuiltins.append(", float");
|
||||
commonBuiltins.append(", int, int, int);\n");
|
||||
|
||||
commonBuiltins.append("float imageAtomicExchange(volatile coherent ");
|
||||
commonBuiltins.append(imageParams);
|
||||
commonBuiltins.append(", float);\n");
|
||||
|
||||
commonBuiltins.append("float imageAtomicExchange(volatile coherent ");
|
||||
commonBuiltins.append(imageParams);
|
||||
commonBuiltins.append(", float");
|
||||
commonBuiltins.append(", int, int, int);\n");
|
||||
|
||||
commonBuiltins.append("float imageAtomicLoad(readonly volatile coherent ");
|
||||
commonBuiltins.append(imageParams);
|
||||
commonBuiltins.append(", int, int, int);\n");
|
||||
|
||||
commonBuiltins.append("void imageAtomicStore(writeonly volatile coherent ");
|
||||
commonBuiltins.append(imageParams);
|
||||
commonBuiltins.append(", float");
|
||||
commonBuiltins.append(", int, int, int);\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2110,7 +2110,14 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
|
||||
if (imageType.getQualifier().getFormat() != ElfR32i && imageType.getQualifier().getFormat() != ElfR32ui)
|
||||
error(loc, "only supported on image with format r32i or r32ui", fnCandidate.getName().c_str(), "");
|
||||
} else {
|
||||
if (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") != 0)
|
||||
bool isImageAtomicOnFloatAllowed = ((fnCandidate.getName().compare(0, 14, "imageAtomicAdd") == 0) ||
|
||||
(fnCandidate.getName().compare(0, 15, "imageAtomicLoad") == 0) ||
|
||||
(fnCandidate.getName().compare(0, 16, "imageAtomicStore") == 0) ||
|
||||
(fnCandidate.getName().compare(0, 19, "imageAtomicExchange") == 0));
|
||||
if (imageType.getSampler().type == EbtFloat && isImageAtomicOnFloatAllowed &&
|
||||
(fnCandidate.getName().compare(0, 19, "imageAtomicExchange") != 0)) // imageAtomicExchange doesn't require GL_EXT_shader_atomic_float
|
||||
requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str());
|
||||
if (!isImageAtomicOnFloatAllowed)
|
||||
error(loc, "only supported on integer images", fnCandidate.getName().c_str(), "");
|
||||
else if (imageType.getQualifier().getFormat() != ElfR32f && isEsProfile())
|
||||
error(loc, "only supported on image with format r32f", fnCandidate.getName().c_str(), "");
|
||||
@ -2139,10 +2146,18 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
|
||||
if (argp->size() > 3) {
|
||||
requireExtensions(loc, 1, &E_GL_KHR_memory_scope_semantics, fnCandidate.getName().c_str());
|
||||
memorySemanticsCheck(loc, fnCandidate, callNode);
|
||||
if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange ||
|
||||
callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpAtomicStore) &&
|
||||
(arg0->getType().isFloatingDomain())) {
|
||||
requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str());
|
||||
}
|
||||
} else if (arg0->getType().getBasicType() == EbtInt64 || arg0->getType().getBasicType() == EbtUint64) {
|
||||
const char* const extensions[2] = { E_GL_NV_shader_atomic_int64,
|
||||
E_GL_EXT_shader_atomic_int64 };
|
||||
requireExtensions(loc, 2, extensions, fnCandidate.getName().c_str());
|
||||
} else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange) &&
|
||||
(arg0->getType().isFloatingDomain())) {
|
||||
requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -347,6 +347,7 @@ void TParseVersions::initializeExtensionBehavior()
|
||||
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_int16] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_int64] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_float16] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_shader_atomic_float] = EBhDisable;
|
||||
}
|
||||
|
||||
#endif // GLSLANG_WEB
|
||||
@ -520,6 +521,8 @@ void TParseVersions::getPreamble(std::string& preamble)
|
||||
"#define GL_EXT_shader_subgroup_extended_types_int16 1\n"
|
||||
"#define GL_EXT_shader_subgroup_extended_types_int64 1\n"
|
||||
"#define GL_EXT_shader_subgroup_extended_types_float16 1\n"
|
||||
|
||||
"#define GL_EXT_shader_atomic_float 1\n"
|
||||
;
|
||||
|
||||
if (version >= 150) {
|
||||
|
@ -298,6 +298,8 @@ const char* const E_GL_EXT_shader_subgroup_extended_types_int16 = "GL_EXT_shad
|
||||
const char* const E_GL_EXT_shader_subgroup_extended_types_int64 = "GL_EXT_shader_subgroup_extended_types_int64";
|
||||
const char* const E_GL_EXT_shader_subgroup_extended_types_float16 = "GL_EXT_shader_subgroup_extended_types_float16";
|
||||
|
||||
const char* const E_GL_EXT_shader_atomic_float = "GL_EXT_shader_atomic_float";
|
||||
|
||||
// Arrays of extensions for the above AEP duplications
|
||||
|
||||
const char* const AEP_geometry_shader[] = { E_GL_EXT_geometry_shader, E_GL_OES_geometry_shader };
|
||||
|
@ -603,6 +603,8 @@ INSTANTIATE_TEST_CASE_P(
|
||||
"spv.460.vert",
|
||||
"spv.460.comp",
|
||||
"spv.atomic.comp",
|
||||
"spv.atomicFloat.comp",
|
||||
"spv.atomicFloat_Error.comp",
|
||||
"spv.glFragColor.frag",
|
||||
"spv.rankShift.comp",
|
||||
"spv.specConst.vert",
|
||||
|
@ -5,14 +5,14 @@
|
||||
"site" : "github",
|
||||
"subrepo" : "KhronosGroup/SPIRV-Tools",
|
||||
"subdir" : "External/spirv-tools",
|
||||
"commit" : "a1fb255a2a6856bba1e5a8486469ac93fca518c2"
|
||||
"commit" : "e4aebf99fa14f2cd00026a56b21f7a0cf9940bbd"
|
||||
},
|
||||
{
|
||||
"name" : "spirv-tools/external/spirv-headers",
|
||||
"site" : "github",
|
||||
"subrepo" : "KhronosGroup/SPIRV-Headers",
|
||||
"subdir" : "External/spirv-tools/external/spirv-headers",
|
||||
"commit" : "ac638f1815425403e946d0ab78bac71d2bdbf3be"
|
||||
"commit" : "979924c8bc839e4cb1b69d03d48398551f369ce7"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user