Add GL_EXT_shader_image_int64 support (#2409)

This commit is contained in:
Tobski 2020-11-04 16:24:23 +00:00 committed by GitHub
parent 478b232952
commit 8c1a3a06b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 5349 additions and 3697 deletions

View File

@ -36,5 +36,6 @@ static const char* const E_SPV_EXT_fragment_fully_covered = "SPV_EXT_fragment_fu
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";
static const char* const E_SPV_EXT_shader_image_int64 = "SPV_EXT_shader_image_int64";
#endif // #ifndef GLSLextEXT_H

View File

@ -1088,6 +1088,10 @@ spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TTy
builder.addCapability(spv::CapabilityStorageImageExtendedFormats);
break;
case glslang::ElfR64ui:
case glslang::ElfR64i:
builder.addExtension(spv::E_SPV_EXT_shader_image_int64);
builder.addCapability(spv::CapabilityInt64ImageEXT);
default:
break;
}
@ -1134,6 +1138,8 @@ spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TTy
case glslang::ElfRg8ui: return spv::ImageFormatRg8ui;
case glslang::ElfR16ui: return spv::ImageFormatR16ui;
case glslang::ElfR8ui: return spv::ImageFormatR8ui;
case glslang::ElfR64ui: return spv::ImageFormatR64ui;
case glslang::ElfR64i: return spv::ImageFormatR64i;
default: return spv::ImageFormatMax;
}
}
@ -3594,6 +3600,12 @@ spv::Id TGlslangToSpvTraverser::getSampledType(const glslang::TSampler& sampler)
builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float_fetch);
builder.addCapability(spv::CapabilityFloat16ImageAMD);
return builder.makeFloatType(16);
case glslang::EbtInt64: return builder.makeIntType(64);
builder.addExtension(spv::E_SPV_EXT_shader_image_int64);
builder.addCapability(spv::CapabilityFloat16ImageAMD);
case glslang::EbtUint64: return builder.makeUintType(64);
builder.addExtension(spv::E_SPV_EXT_shader_image_int64);
builder.addCapability(spv::CapabilityFloat16ImageAMD);
#endif
default:
assert(0);

View File

@ -523,6 +523,8 @@ const char* ImageFormatString(int format)
case 37: return "Rg8ui";
case 38: return "R16ui";
case 39: return "R8ui";
case 40: return "R64ui";
case 41: return "R64i";
default:
return "Bad";
@ -958,6 +960,7 @@ const char* CapabilityString(int info)
case CapabilityDemoteToHelperInvocationEXT: return "DemoteToHelperInvocationEXT";
case CapabilityShaderClockKHR: return "ShaderClockKHR";
case CapabilityInt64ImageEXT: return "Int64ImageEXT";
case CapabilityIntegerFunctions2INTEL: return "CapabilityIntegerFunctions2INTEL";

View File

@ -0,0 +1,634 @@
spv.imageAtomic64.frag
Validation failed
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 503
Capability Shader
Capability Int64
Capability Int64Atomics
Capability StorageImageMultisample
Capability ImageCubeArray
Capability ImageRect
Capability SparseResidency
Capability Image1D
Capability ImageBuffer
Capability ImageMSArray
Capability Int64ImageEXT
Extension "SPV_EXT_shader_image_int64"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
SourceExtension "GL_ARB_gpu_shader_int64"
SourceExtension "GL_ARB_sparse_texture2"
SourceExtension "GL_EXT_shader_image_int64"
SourceExtension "GL_KHR_memory_scope_semantics"
Name 4 "main"
Name 12 "Buf"
MemberName 12(Buf) 0 "i64"
MemberName 12(Buf) 1 "u64"
MemberName 12(Buf) 2 "i64v4"
MemberName 12(Buf) 3 "u64v4"
MemberName 12(Buf) 4 "i32v4"
Name 14 ""
Name 18 "i1D"
Name 35 "i3D"
Name 48 "iBuf"
Name 58 "i2DArray"
Name 69 "i2DRect"
Name 81 "i2DMSArray"
Name 194 "u2D"
Name 207 "uCube"
Name 218 "u1DArray"
Name 229 "uCubeArray"
Name 240 "u2DMS"
Name 458 "ResType"
Name 483 "ResType"
MemberDecorate 12(Buf) 0 Offset 0
MemberDecorate 12(Buf) 1 Offset 8
MemberDecorate 12(Buf) 2 Offset 32
MemberDecorate 12(Buf) 3 Offset 64
MemberDecorate 12(Buf) 4 Offset 96
Decorate 12(Buf) BufferBlock
Decorate 14 DescriptorSet 0
Decorate 14 Binding 11
Decorate 18(i1D) DescriptorSet 0
Decorate 18(i1D) Binding 0
Decorate 35(i3D) DescriptorSet 0
Decorate 35(i3D) Binding 2
Decorate 48(iBuf) DescriptorSet 0
Decorate 48(iBuf) Binding 4
Decorate 58(i2DArray) DescriptorSet 0
Decorate 58(i2DArray) Binding 6
Decorate 69(i2DRect) DescriptorSet 0
Decorate 69(i2DRect) Binding 8
Decorate 81(i2DMSArray) DescriptorSet 0
Decorate 81(i2DMSArray) Binding 10
Decorate 194(u2D) DescriptorSet 0
Decorate 194(u2D) Binding 1
Decorate 207(uCube) DescriptorSet 0
Decorate 207(uCube) Binding 3
Decorate 218(u1DArray) DescriptorSet 0
Decorate 218(u1DArray) Binding 5
Decorate 229(uCubeArray) DescriptorSet 0
Decorate 229(uCubeArray) Binding 7
Decorate 240(u2DMS) DescriptorSet 0
Decorate 240(u2DMS) Binding 9
2: TypeVoid
3: TypeFunction 2
6: TypeInt 64 1
7: TypeInt 64 0
8: TypeVector 6(int64_t) 4
9: TypeVector 7(int64_t) 4
10: TypeInt 32 1
11: TypeVector 10(int) 4
12(Buf): TypeStruct 6(int64_t) 7(int64_t) 8(i64vec4) 9(i64vec4) 11(ivec4)
13: TypePointer Uniform 12(Buf)
14: 13(ptr) Variable Uniform
15: 10(int) Constant 0
16: TypeImage 6(int64_t) 1D nonsampled format:R64i
17: TypePointer UniformConstant 16
18(i1D): 17(ptr) Variable UniformConstant
19: 10(int) Constant 4
20: TypeInt 32 0
21: 20(int) Constant 0
22: TypePointer Uniform 10(int)
25: TypePointer Uniform 6(int64_t)
28: TypePointer Image 6(int64_t)
30: 20(int) Constant 1
33: TypeImage 6(int64_t) 3D nonsampled format:R64i
34: TypePointer UniformConstant 33
35(i3D): 34(ptr) Variable UniformConstant
36: TypeVector 10(int) 3
37: TypePointer Uniform 11(ivec4)
46: TypeImage 6(int64_t) Buffer nonsampled format:R64i
47: TypePointer UniformConstant 46
48(iBuf): 47(ptr) Variable UniformConstant
56: TypeImage 6(int64_t) 2D array nonsampled format:R64i
57: TypePointer UniformConstant 56
58(i2DArray): 57(ptr) Variable UniformConstant
67: TypeImage 6(int64_t) Rect nonsampled format:R64i
68: TypePointer UniformConstant 67
69(i2DRect): 68(ptr) Variable UniformConstant
70: TypeVector 10(int) 2
79: TypeImage 6(int64_t) 2D array multi-sampled nonsampled format:R64i
80: TypePointer UniformConstant 79
81(i2DMSArray): 80(ptr) Variable UniformConstant
85: 20(int) Constant 3
107: 6(int64_t) Constant 1 0
116: 10(int) Constant 1
117: 10(int) Constant 2048
119: 20(int) Constant 2048
192: TypeImage 7(int64_t) 2D nonsampled format:R64ui
193: TypePointer UniformConstant 192
194(u2D): 193(ptr) Variable UniformConstant
198: TypePointer Uniform 7(int64_t)
201: TypePointer Image 7(int64_t)
205: TypeImage 7(int64_t) Cube nonsampled format:R64ui
206: TypePointer UniformConstant 205
207(uCube): 206(ptr) Variable UniformConstant
216: TypeImage 7(int64_t) 1D array nonsampled format:R64ui
217: TypePointer UniformConstant 216
218(u1DArray): 217(ptr) Variable UniformConstant
227: TypeImage 7(int64_t) Cube array nonsampled format:R64ui
228: TypePointer UniformConstant 227
229(uCubeArray): 228(ptr) Variable UniformConstant
238: TypeImage 7(int64_t) 2D multi-sampled nonsampled format:R64ui
239: TypePointer UniformConstant 238
240(u2DMS): 239(ptr) Variable UniformConstant
244: 20(int) Constant 2
275: 7(int64_t) Constant 1 0
363: 10(int) Constant 2
368: TypePointer Uniform 8(i64vec4)
423: 10(int) Constant 3
424: TypePointer Uniform 9(i64vec4)
458(ResType): TypeStruct 10(int) 8(i64vec4)
483(ResType): TypeStruct 10(int) 9(i64vec4)
4(main): 2 Function None 3
5: Label
23: 22(ptr) AccessChain 14 19 21
24: 10(int) Load 23
26: 25(ptr) AccessChain 14 15
27: 6(int64_t) Load 26
29: 28(ptr) ImageTexelPointer 18(i1D) 24 21
31: 6(int64_t) AtomicIAdd 29 30 21 27
32: 25(ptr) AccessChain 14 15
Store 32 31
38: 37(ptr) AccessChain 14 19
39: 11(ivec4) Load 38
40: 36(ivec3) VectorShuffle 39 39 0 1 2
41: 25(ptr) AccessChain 14 15
42: 6(int64_t) Load 41
43: 28(ptr) ImageTexelPointer 35(i3D) 40 21
44: 6(int64_t) AtomicSMin 43 30 21 42
45: 25(ptr) AccessChain 14 15
Store 45 44
49: 22(ptr) AccessChain 14 19 21
50: 10(int) Load 49
51: 25(ptr) AccessChain 14 15
52: 6(int64_t) Load 51
53: 28(ptr) ImageTexelPointer 48(iBuf) 50 21
54: 6(int64_t) AtomicSMax 53 30 21 52
55: 25(ptr) AccessChain 14 15
Store 55 54
59: 37(ptr) AccessChain 14 19
60: 11(ivec4) Load 59
61: 36(ivec3) VectorShuffle 60 60 0 1 2
62: 25(ptr) AccessChain 14 15
63: 6(int64_t) Load 62
64: 28(ptr) ImageTexelPointer 58(i2DArray) 61 21
65: 6(int64_t) AtomicAnd 64 30 21 63
66: 25(ptr) AccessChain 14 15
Store 66 65
71: 37(ptr) AccessChain 14 19
72: 11(ivec4) Load 71
73: 70(ivec2) VectorShuffle 72 72 0 1
74: 25(ptr) AccessChain 14 15
75: 6(int64_t) Load 74
76: 28(ptr) ImageTexelPointer 69(i2DRect) 73 21
77: 6(int64_t) AtomicOr 76 30 21 75
78: 25(ptr) AccessChain 14 15
Store 78 77
82: 37(ptr) AccessChain 14 19
83: 11(ivec4) Load 82
84: 36(ivec3) VectorShuffle 83 83 0 1 2
86: 22(ptr) AccessChain 14 19 85
87: 10(int) Load 86
88: 25(ptr) AccessChain 14 15
89: 6(int64_t) Load 88
90: 28(ptr) ImageTexelPointer 81(i2DMSArray) 84 87
91: 6(int64_t) AtomicXor 90 30 21 89
92: 25(ptr) AccessChain 14 15
Store 92 91
93: 22(ptr) AccessChain 14 19 21
94: 10(int) Load 93
95: 25(ptr) AccessChain 14 15
96: 6(int64_t) Load 95
97: 28(ptr) ImageTexelPointer 18(i1D) 94 21
98: 6(int64_t) AtomicExchange 97 30 21 96
99: 25(ptr) AccessChain 14 15
Store 99 98
100: 37(ptr) AccessChain 14 19
101: 11(ivec4) Load 100
102: 36(ivec3) VectorShuffle 101 101 0 1 2
103: 25(ptr) AccessChain 14 15
104: 6(int64_t) Load 103
105: 25(ptr) AccessChain 14 15
106: 6(int64_t) Load 105
108: 6(int64_t) IAdd 106 107
109: 28(ptr) ImageTexelPointer 35(i3D) 102 21
110: 6(int64_t) AtomicCompareExchange 109 30 21 21 108 104
111: 25(ptr) AccessChain 14 15
Store 111 110
112: 22(ptr) AccessChain 14 19 21
113: 10(int) Load 112
114: 25(ptr) AccessChain 14 15
115: 6(int64_t) Load 114
118: 28(ptr) ImageTexelPointer 18(i1D) 113 21
120: 6(int64_t) AtomicIAdd 118 116 119 115
121: 25(ptr) AccessChain 14 15
Store 121 120
122: 37(ptr) AccessChain 14 19
123: 11(ivec4) Load 122
124: 36(ivec3) VectorShuffle 123 123 0 1 2
125: 25(ptr) AccessChain 14 15
126: 6(int64_t) Load 125
127: 28(ptr) ImageTexelPointer 35(i3D) 124 21
128: 6(int64_t) AtomicSMin 127 116 119 126
129: 25(ptr) AccessChain 14 15
Store 129 128
130: 22(ptr) AccessChain 14 19 21
131: 10(int) Load 130
132: 25(ptr) AccessChain 14 15
133: 6(int64_t) Load 132
134: 28(ptr) ImageTexelPointer 48(iBuf) 131 21
135: 6(int64_t) AtomicSMax 134 116 119 133
136: 25(ptr) AccessChain 14 15
Store 136 135
137: 37(ptr) AccessChain 14 19
138: 11(ivec4) Load 137
139: 36(ivec3) VectorShuffle 138 138 0 1 2
140: 25(ptr) AccessChain 14 15
141: 6(int64_t) Load 140
142: 28(ptr) ImageTexelPointer 58(i2DArray) 139 21
143: 6(int64_t) AtomicAnd 142 116 119 141
144: 25(ptr) AccessChain 14 15
Store 144 143
145: 37(ptr) AccessChain 14 19
146: 11(ivec4) Load 145
147: 70(ivec2) VectorShuffle 146 146 0 1
148: 25(ptr) AccessChain 14 15
149: 6(int64_t) Load 148
150: 28(ptr) ImageTexelPointer 69(i2DRect) 147 21
151: 6(int64_t) AtomicOr 150 116 119 149
152: 25(ptr) AccessChain 14 15
Store 152 151
153: 37(ptr) AccessChain 14 19
154: 11(ivec4) Load 153
155: 36(ivec3) VectorShuffle 154 154 0 1 2
156: 22(ptr) AccessChain 14 19 85
157: 10(int) Load 156
158: 25(ptr) AccessChain 14 15
159: 6(int64_t) Load 158
160: 28(ptr) ImageTexelPointer 81(i2DMSArray) 155 157
161: 6(int64_t) AtomicXor 160 116 119 159
162: 25(ptr) AccessChain 14 15
Store 162 161
163: 22(ptr) AccessChain 14 19 21
164: 10(int) Load 163
165: 25(ptr) AccessChain 14 15
166: 6(int64_t) Load 165
167: 28(ptr) ImageTexelPointer 18(i1D) 164 21
168: 6(int64_t) AtomicExchange 167 116 119 166
169: 25(ptr) AccessChain 14 15
Store 169 168
170: 37(ptr) AccessChain 14 19
171: 11(ivec4) Load 170
172: 36(ivec3) VectorShuffle 171 171 0 1 2
173: 25(ptr) AccessChain 14 15
174: 6(int64_t) Load 173
175: 25(ptr) AccessChain 14 15
176: 6(int64_t) Load 175
177: 6(int64_t) IAdd 176 107
178: 28(ptr) ImageTexelPointer 35(i3D) 172 21
179: 6(int64_t) AtomicCompareExchange 178 116 119 119 177 174
180: 25(ptr) AccessChain 14 15
Store 180 179
181: 22(ptr) AccessChain 14 19 21
182: 10(int) Load 181
183: 28(ptr) ImageTexelPointer 48(iBuf) 182 21
184: 6(int64_t) AtomicLoad 183 116 119
185: 25(ptr) AccessChain 14 15
Store 185 184
186: 37(ptr) AccessChain 14 19
187: 11(ivec4) Load 186
188: 36(ivec3) VectorShuffle 187 187 0 1 2
189: 25(ptr) AccessChain 14 15
190: 6(int64_t) Load 189
191: 28(ptr) ImageTexelPointer 58(i2DArray) 188 21
AtomicStore 191 116 119 190
195: 37(ptr) AccessChain 14 19
196: 11(ivec4) Load 195
197: 70(ivec2) VectorShuffle 196 196 0 1
199: 198(ptr) AccessChain 14 116
200: 7(int64_t) Load 199
202: 201(ptr) ImageTexelPointer 194(u2D) 197 21
203: 7(int64_t) AtomicIAdd 202 30 21 200
204: 198(ptr) AccessChain 14 116
Store 204 203
208: 37(ptr) AccessChain 14 19
209: 11(ivec4) Load 208
210: 36(ivec3) VectorShuffle 209 209 0 1 2
211: 198(ptr) AccessChain 14 116
212: 7(int64_t) Load 211
213: 201(ptr) ImageTexelPointer 207(uCube) 210 21
214: 7(int64_t) AtomicUMin 213 30 21 212
215: 198(ptr) AccessChain 14 116
Store 215 214
219: 37(ptr) AccessChain 14 19
220: 11(ivec4) Load 219
221: 70(ivec2) VectorShuffle 220 220 0 1
222: 198(ptr) AccessChain 14 116
223: 7(int64_t) Load 222
224: 201(ptr) ImageTexelPointer 218(u1DArray) 221 21
225: 7(int64_t) AtomicUMax 224 30 21 223
226: 198(ptr) AccessChain 14 116
Store 226 225
230: 37(ptr) AccessChain 14 19
231: 11(ivec4) Load 230
232: 36(ivec3) VectorShuffle 231 231 0 1 2
233: 198(ptr) AccessChain 14 116
234: 7(int64_t) Load 233
235: 201(ptr) ImageTexelPointer 229(uCubeArray) 232 21
236: 7(int64_t) AtomicAnd 235 30 21 234
237: 198(ptr) AccessChain 14 116
Store 237 236
241: 37(ptr) AccessChain 14 19
242: 11(ivec4) Load 241
243: 70(ivec2) VectorShuffle 242 242 0 1
245: 22(ptr) AccessChain 14 19 244
246: 10(int) Load 245
247: 198(ptr) AccessChain 14 116
248: 7(int64_t) Load 247
249: 201(ptr) ImageTexelPointer 240(u2DMS) 243 246
250: 7(int64_t) AtomicOr 249 30 21 248
251: 198(ptr) AccessChain 14 116
Store 251 250
252: 37(ptr) AccessChain 14 19
253: 11(ivec4) Load 252
254: 70(ivec2) VectorShuffle 253 253 0 1
255: 198(ptr) AccessChain 14 116
256: 7(int64_t) Load 255
257: 201(ptr) ImageTexelPointer 194(u2D) 254 21
258: 7(int64_t) AtomicXor 257 30 21 256
259: 198(ptr) AccessChain 14 116
Store 259 258
260: 37(ptr) AccessChain 14 19
261: 11(ivec4) Load 260
262: 36(ivec3) VectorShuffle 261 261 0 1 2
263: 198(ptr) AccessChain 14 116
264: 7(int64_t) Load 263
265: 201(ptr) ImageTexelPointer 207(uCube) 262 21
266: 7(int64_t) AtomicExchange 265 30 21 264
267: 198(ptr) AccessChain 14 116
Store 267 266
268: 37(ptr) AccessChain 14 19
269: 11(ivec4) Load 268
270: 70(ivec2) VectorShuffle 269 269 0 1
271: 198(ptr) AccessChain 14 116
272: 7(int64_t) Load 271
273: 198(ptr) AccessChain 14 116
274: 7(int64_t) Load 273
276: 7(int64_t) IAdd 274 275
277: 201(ptr) ImageTexelPointer 218(u1DArray) 270 21
278: 7(int64_t) AtomicCompareExchange 277 30 21 21 276 272
279: 198(ptr) AccessChain 14 116
Store 279 278
280: 37(ptr) AccessChain 14 19
281: 11(ivec4) Load 280
282: 70(ivec2) VectorShuffle 281 281 0 1
283: 198(ptr) AccessChain 14 116
284: 7(int64_t) Load 283
285: 201(ptr) ImageTexelPointer 194(u2D) 282 21
286: 7(int64_t) AtomicIAdd 285 116 119 284
287: 198(ptr) AccessChain 14 116
Store 287 286
288: 37(ptr) AccessChain 14 19
289: 11(ivec4) Load 288
290: 36(ivec3) VectorShuffle 289 289 0 1 2
291: 198(ptr) AccessChain 14 116
292: 7(int64_t) Load 291
293: 201(ptr) ImageTexelPointer 207(uCube) 290 21
294: 7(int64_t) AtomicUMin 293 116 119 292
295: 198(ptr) AccessChain 14 116
Store 295 294
296: 37(ptr) AccessChain 14 19
297: 11(ivec4) Load 296
298: 70(ivec2) VectorShuffle 297 297 0 1
299: 198(ptr) AccessChain 14 116
300: 7(int64_t) Load 299
301: 201(ptr) ImageTexelPointer 218(u1DArray) 298 21
302: 7(int64_t) AtomicUMax 301 116 119 300
303: 198(ptr) AccessChain 14 116
Store 303 302
304: 37(ptr) AccessChain 14 19
305: 11(ivec4) Load 304
306: 36(ivec3) VectorShuffle 305 305 0 1 2
307: 198(ptr) AccessChain 14 116
308: 7(int64_t) Load 307
309: 201(ptr) ImageTexelPointer 229(uCubeArray) 306 21
310: 7(int64_t) AtomicAnd 309 116 119 308
311: 198(ptr) AccessChain 14 116
Store 311 310
312: 37(ptr) AccessChain 14 19
313: 11(ivec4) Load 312
314: 70(ivec2) VectorShuffle 313 313 0 1
315: 22(ptr) AccessChain 14 19 244
316: 10(int) Load 315
317: 198(ptr) AccessChain 14 116
318: 7(int64_t) Load 317
319: 201(ptr) ImageTexelPointer 240(u2DMS) 314 316
320: 7(int64_t) AtomicOr 319 116 119 318
321: 198(ptr) AccessChain 14 116
Store 321 320
322: 37(ptr) AccessChain 14 19
323: 11(ivec4) Load 322
324: 70(ivec2) VectorShuffle 323 323 0 1
325: 198(ptr) AccessChain 14 116
326: 7(int64_t) Load 325
327: 201(ptr) ImageTexelPointer 194(u2D) 324 21
328: 7(int64_t) AtomicXor 327 116 119 326
329: 198(ptr) AccessChain 14 116
Store 329 328
330: 37(ptr) AccessChain 14 19
331: 11(ivec4) Load 330
332: 36(ivec3) VectorShuffle 331 331 0 1 2
333: 198(ptr) AccessChain 14 116
334: 7(int64_t) Load 333
335: 201(ptr) ImageTexelPointer 207(uCube) 332 21
336: 7(int64_t) AtomicExchange 335 116 119 334
337: 198(ptr) AccessChain 14 116
Store 337 336
338: 37(ptr) AccessChain 14 19
339: 11(ivec4) Load 338
340: 70(ivec2) VectorShuffle 339 339 0 1
341: 198(ptr) AccessChain 14 116
342: 7(int64_t) Load 341
343: 198(ptr) AccessChain 14 116
344: 7(int64_t) Load 343
345: 7(int64_t) IAdd 344 275
346: 201(ptr) ImageTexelPointer 218(u1DArray) 340 21
347: 7(int64_t) AtomicCompareExchange 346 116 119 119 345 342
348: 198(ptr) AccessChain 14 116
Store 348 347
349: 37(ptr) AccessChain 14 19
350: 11(ivec4) Load 349
351: 36(ivec3) VectorShuffle 350 350 0 1 2
352: 201(ptr) ImageTexelPointer 229(uCubeArray) 351 21
353: 7(int64_t) AtomicLoad 352 116 119
354: 198(ptr) AccessChain 14 116
Store 354 353
355: 37(ptr) AccessChain 14 19
356: 11(ivec4) Load 355
357: 70(ivec2) VectorShuffle 356 356 0 1
358: 22(ptr) AccessChain 14 19 244
359: 10(int) Load 358
360: 198(ptr) AccessChain 14 116
361: 7(int64_t) Load 360
362: 201(ptr) ImageTexelPointer 240(u2DMS) 357 359
AtomicStore 362 116 119 361
364: 16 Load 18(i1D)
365: 22(ptr) AccessChain 14 19 21
366: 10(int) Load 365
367: 8(i64vec4) ImageRead 364 366
369: 368(ptr) AccessChain 14 363
370: 8(i64vec4) Load 369
371: 8(i64vec4) IAdd 370 367
372: 368(ptr) AccessChain 14 363
Store 372 371
373: 33 Load 35(i3D)
374: 37(ptr) AccessChain 14 19
375: 11(ivec4) Load 374
376: 36(ivec3) VectorShuffle 375 375 0 1 2
377: 8(i64vec4) ImageRead 373 376
378: 368(ptr) AccessChain 14 363
379: 8(i64vec4) Load 378
380: 8(i64vec4) IAdd 379 377
381: 368(ptr) AccessChain 14 363
Store 381 380
382: 46 Load 48(iBuf)
383: 22(ptr) AccessChain 14 19 21
384: 10(int) Load 383
385: 8(i64vec4) ImageRead 382 384
386: 368(ptr) AccessChain 14 363
387: 8(i64vec4) Load 386
388: 8(i64vec4) IAdd 387 385
389: 368(ptr) AccessChain 14 363
Store 389 388
390: 56 Load 58(i2DArray)
391: 37(ptr) AccessChain 14 19
392: 11(ivec4) Load 391
393: 36(ivec3) VectorShuffle 392 392 0 1 2
394: 8(i64vec4) ImageRead 390 393
395: 368(ptr) AccessChain 14 363
396: 8(i64vec4) Load 395
397: 8(i64vec4) IAdd 396 394
398: 368(ptr) AccessChain 14 363
Store 398 397
399: 67 Load 69(i2DRect)
400: 37(ptr) AccessChain 14 19
401: 11(ivec4) Load 400
402: 70(ivec2) VectorShuffle 401 401 0 1
403: 8(i64vec4) ImageRead 399 402
404: 368(ptr) AccessChain 14 363
405: 8(i64vec4) Load 404
406: 8(i64vec4) IAdd 405 403
407: 368(ptr) AccessChain 14 363
Store 407 406
408: 79 Load 81(i2DMSArray)
409: 37(ptr) AccessChain 14 19
410: 11(ivec4) Load 409
411: 36(ivec3) VectorShuffle 410 410 0 1 2
412: 22(ptr) AccessChain 14 19 85
413: 10(int) Load 412
414: 8(i64vec4) ImageRead 408 411 Sample 413
415: 368(ptr) AccessChain 14 363
416: 8(i64vec4) Load 415
417: 8(i64vec4) IAdd 416 414
418: 368(ptr) AccessChain 14 363
Store 418 417
419: 192 Load 194(u2D)
420: 37(ptr) AccessChain 14 19
421: 11(ivec4) Load 420
422: 70(ivec2) VectorShuffle 421 421 0 1
425: 424(ptr) AccessChain 14 423
426: 9(i64vec4) Load 425
ImageWrite 419 422 426
427: 205 Load 207(uCube)
428: 37(ptr) AccessChain 14 19
429: 11(ivec4) Load 428
430: 36(ivec3) VectorShuffle 429 429 0 1 2
431: 424(ptr) AccessChain 14 423
432: 9(i64vec4) Load 431
ImageWrite 427 430 432
433: 216 Load 218(u1DArray)
434: 37(ptr) AccessChain 14 19
435: 11(ivec4) Load 434
436: 70(ivec2) VectorShuffle 435 435 0 1
437: 424(ptr) AccessChain 14 423
438: 9(i64vec4) Load 437
ImageWrite 433 436 438
439: 227 Load 229(uCubeArray)
440: 37(ptr) AccessChain 14 19
441: 11(ivec4) Load 440
442: 36(ivec3) VectorShuffle 441 441 0 1 2
443: 424(ptr) AccessChain 14 423
444: 9(i64vec4) Load 443
ImageWrite 439 442 444
445: 238 Load 240(u2DMS)
446: 37(ptr) AccessChain 14 19
447: 11(ivec4) Load 446
448: 70(ivec2) VectorShuffle 447 447 0 1
449: 22(ptr) AccessChain 14 19 244
450: 10(int) Load 449
451: 424(ptr) AccessChain 14 423
452: 9(i64vec4) Load 451
ImageWrite 445 448 452 Sample 450
453: 33 Load 35(i3D)
454: 37(ptr) AccessChain 14 19
455: 11(ivec4) Load 454
456: 36(ivec3) VectorShuffle 455 455 0 1 2
457: 368(ptr) AccessChain 14 363
459:458(ResType) ImageSparseRead 453 456
460: 8(i64vec4) CompositeExtract 459 1
Store 457 460
461: 10(int) CompositeExtract 459 0
462: 56 Load 58(i2DArray)
463: 37(ptr) AccessChain 14 19
464: 11(ivec4) Load 463
465: 36(ivec3) VectorShuffle 464 464 0 1 2
466: 368(ptr) AccessChain 14 363
467:458(ResType) ImageSparseRead 462 465
468: 8(i64vec4) CompositeExtract 467 1
Store 466 468
469: 10(int) CompositeExtract 467 0
470: 67 Load 69(i2DRect)
471: 37(ptr) AccessChain 14 19
472: 11(ivec4) Load 471
473: 70(ivec2) VectorShuffle 472 472 0 1
474: 368(ptr) AccessChain 14 363
475:458(ResType) ImageSparseRead 470 473
476: 8(i64vec4) CompositeExtract 475 1
Store 474 476
477: 10(int) CompositeExtract 475 0
478: 192 Load 194(u2D)
479: 37(ptr) AccessChain 14 19
480: 11(ivec4) Load 479
481: 70(ivec2) VectorShuffle 480 480 0 1
482: 424(ptr) AccessChain 14 423
484:483(ResType) ImageSparseRead 478 481
485: 9(i64vec4) CompositeExtract 484 1
Store 482 485
486: 10(int) CompositeExtract 484 0
487: 205 Load 207(uCube)
488: 37(ptr) AccessChain 14 19
489: 11(ivec4) Load 488
490: 36(ivec3) VectorShuffle 489 489 0 1 2
491: 424(ptr) AccessChain 14 423
492:483(ResType) ImageSparseRead 487 490
493: 9(i64vec4) CompositeExtract 492 1
Store 491 493
494: 10(int) CompositeExtract 492 0
495: 227 Load 229(uCubeArray)
496: 37(ptr) AccessChain 14 19
497: 11(ivec4) Load 496
498: 36(ivec3) VectorShuffle 497 497 0 1 2
499: 424(ptr) AccessChain 14 423
500:483(ResType) ImageSparseRead 495 498
501: 9(i64vec4) CompositeExtract 500 1
Store 499 501
502: 10(int) CompositeExtract 500 0
Return
FunctionEnd

View File

@ -1,20 +1,25 @@
spv.imageLoadStoreLod.frag
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 82
// Id's are bound by 148
Capability Shader
Capability Int64
Capability ImageCubeArray
Capability SparseResidency
Capability Image1D
Capability ImageReadWriteLodAMD
Capability Int64ImageEXT
Extension "SPV_AMD_shader_image_load_store_lod"
Extension "SPV_EXT_shader_image_int64"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 77
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
SourceExtension "GL_AMD_shader_image_load_store_lod"
SourceExtension "GL_ARB_gpu_shader_int64"
SourceExtension "GL_EXT_shader_image_int64"
Name 4 "main"
Name 9 "f4"
Name 14 "i1D"
@ -27,6 +32,18 @@ spv.imageLoadStoreLod.frag
Name 65 "ResType"
Name 71 "uiCubeArray"
Name 77 "fragColor"
Name 86 "Buf"
MemberName 86(Buf) 0 "i64v4"
MemberName 86(Buf) 1 "u64v4"
Name 88 ""
Name 92 "i64i1D"
Name 102 "i64i2D"
Name 111 "i64i3D"
Name 120 "u64iCube"
Name 127 "u64i1DArray"
Name 133 "u64i2DArray"
Name 136 "ResType"
Name 142 "u64iCubeArray"
Decorate 14(i1D) DescriptorSet 0
Decorate 14(i1D) Binding 0
Decorate 24(i2D) DescriptorSet 0
@ -42,6 +59,25 @@ spv.imageLoadStoreLod.frag
Decorate 71(uiCubeArray) DescriptorSet 0
Decorate 71(uiCubeArray) Binding 6
Decorate 77(fragColor) Location 0
MemberDecorate 86(Buf) 0 Offset 0
MemberDecorate 86(Buf) 1 Offset 32
Decorate 86(Buf) BufferBlock
Decorate 88 DescriptorSet 0
Decorate 88 Binding 14
Decorate 92(i64i1D) DescriptorSet 0
Decorate 92(i64i1D) Binding 7
Decorate 102(i64i2D) DescriptorSet 0
Decorate 102(i64i2D) Binding 8
Decorate 111(i64i3D) DescriptorSet 0
Decorate 111(i64i3D) Binding 9
Decorate 120(u64iCube) DescriptorSet 0
Decorate 120(u64iCube) Binding 10
Decorate 127(u64i1DArray) DescriptorSet 0
Decorate 127(u64i1DArray) Binding 11
Decorate 133(u64i2DArray) DescriptorSet 0
Decorate 133(u64i2DArray) Binding 12
Decorate 142(u64iCubeArray) DescriptorSet 0
Decorate 142(u64iCubeArray) Binding 13
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -88,6 +124,38 @@ spv.imageLoadStoreLod.frag
71(uiCubeArray): 70(ptr) Variable UniformConstant
76: TypePointer Output 7(fvec4)
77(fragColor): 76(ptr) Variable Output
82: TypeInt 64 1
83: TypeVector 82(int64_t) 4
84: TypeInt 64 0
85: TypeVector 84(int64_t) 4
86(Buf): TypeStruct 83(i64vec4) 85(i64vec4)
87: TypePointer Uniform 86(Buf)
88: 87(ptr) Variable Uniform
89: 16(int) Constant 0
90: TypeImage 82(int64_t) 1D nonsampled format:R64i
91: TypePointer UniformConstant 90
92(i64i1D): 91(ptr) Variable UniformConstant
95: TypePointer Uniform 83(i64vec4)
100: TypeImage 82(int64_t) 2D nonsampled format:R64i
101: TypePointer UniformConstant 100
102(i64i2D): 101(ptr) Variable UniformConstant
109: TypeImage 82(int64_t) 3D nonsampled format:R64i
110: TypePointer UniformConstant 109
111(i64i3D): 110(ptr) Variable UniformConstant
118: TypeImage 84(int64_t) Cube nonsampled format:R64ui
119: TypePointer UniformConstant 118
120(u64iCube): 119(ptr) Variable UniformConstant
122: TypePointer Uniform 85(i64vec4)
125: TypeImage 84(int64_t) 1D array nonsampled format:R64ui
126: TypePointer UniformConstant 125
127(u64i1DArray): 126(ptr) Variable UniformConstant
131: TypeImage 84(int64_t) 2D array nonsampled format:R64ui
132: TypePointer UniformConstant 131
133(u64i2DArray): 132(ptr) Variable UniformConstant
136(ResType): TypeStruct 16(int) 85(i64vec4)
140: TypeImage 84(int64_t) Cube array nonsampled format:R64ui
141: TypePointer UniformConstant 140
142(u64iCubeArray): 141(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(f4): 8(ptr) Variable Function
@ -131,5 +199,46 @@ spv.imageLoadStoreLod.frag
80: 7(fvec4) ConvertUToF 79
81: 7(fvec4) FAdd 78 80
Store 77(fragColor) 81
93: 90 Load 92(i64i1D)
94: 83(i64vec4) ImageRead 93 17 Lod 18
96: 95(ptr) AccessChain 88 89
97: 83(i64vec4) Load 96
98: 83(i64vec4) IAdd 97 94
99: 95(ptr) AccessChain 88 89
Store 99 98
103: 100 Load 102(i64i2D)
104: 83(i64vec4) ImageRead 103 28 Lod 18
105: 95(ptr) AccessChain 88 89
106: 83(i64vec4) Load 105
107: 83(i64vec4) IAdd 106 104
108: 95(ptr) AccessChain 88 89
Store 108 107
112: 109 Load 111(i64i3D)
113: 83(i64vec4) ImageRead 112 40 Lod 18
114: 95(ptr) AccessChain 88 89
115: 83(i64vec4) Load 114
116: 83(i64vec4) IAdd 115 113
117: 95(ptr) AccessChain 88 89
Store 117 116
121: 118 Load 120(u64iCube)
123: 122(ptr) AccessChain 88 17
124: 85(i64vec4) Load 123
ImageWrite 121 40 124 Lod 18
128: 125 Load 127(u64i1DArray)
129: 122(ptr) AccessChain 88 17
130: 85(i64vec4) Load 129
ImageWrite 128 28 130 Lod 18
134: 131 Load 133(u64i2DArray)
135: 122(ptr) AccessChain 88 17
137:136(ResType) ImageSparseRead 134 40 Lod 18
138: 85(i64vec4) CompositeExtract 137 1
Store 135 138
139: 16(int) CompositeExtract 137 0
143: 140 Load 142(u64iCubeArray)
144: 122(ptr) AccessChain 88 17
145:136(ResType) ImageSparseRead 143 40 Lod 18
146: 85(i64vec4) CompositeExtract 145 1
Store 144 146
147: 16(int) CompositeExtract 145 0
Return
FunctionEnd

View File

@ -0,0 +1,92 @@
#version 450 core
#extension GL_ARB_gpu_shader_int64: enable
#extension GL_EXT_shader_image_int64: enable
#extension GL_KHR_memory_scope_semantics: enable
#extension GL_ARB_sparse_texture2: enable
layout(binding = 0, r64i) uniform i64image1D i1D;
layout(binding = 1, r64ui) uniform u64image2D u2D;
layout(binding = 2, r64i) uniform i64image3D i3D;
layout(binding = 3, r64ui) uniform u64imageCube uCube;
layout(binding = 4, r64i) uniform i64imageBuffer iBuf;
layout(binding = 5, r64ui) uniform u64image1DArray u1DArray;
layout(binding = 6, r64i) uniform i64image2DArray i2DArray;
layout(binding = 7, r64ui) uniform u64imageCubeArray uCubeArray;
layout(binding = 8, r64i) uniform i64image2DRect i2DRect;
layout(binding = 9, r64ui) uniform u64image2DMS u2DMS;
layout(binding = 10, r64i) uniform i64image2DMSArray i2DMSArray;
layout(binding = 11) buffer Buf
{
int64_t i64;
uint64_t u64;
i64vec4 i64v4;
u64vec4 u64v4;
ivec4 i32v4;
};
void main()
{
i64 = imageAtomicAdd(i1D, i32v4.x, i64);
i64 = imageAtomicMin(i3D, i32v4.xyz, i64);
i64 = imageAtomicMax(iBuf, i32v4.x, i64);
i64 = imageAtomicAnd(i2DArray, i32v4.xyz, i64);
i64 = imageAtomicOr(i2DRect, i32v4.xy, i64);
i64 = imageAtomicXor(i2DMSArray, i32v4.xyz, i32v4.w, i64);
i64 = imageAtomicExchange(i1D, i32v4.x, i64);
i64 = imageAtomicCompSwap(i3D, i32v4.xyz, i64, i64 + 1);
i64 = imageAtomicAdd(i1D, i32v4.x, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
i64 = imageAtomicMin(i3D, i32v4.xyz, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
i64 = imageAtomicMax(iBuf, i32v4.x, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
i64 = imageAtomicAnd(i2DArray, i32v4.xyz, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
i64 = imageAtomicOr(i2DRect, i32v4.xy, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
i64 = imageAtomicXor(i2DMSArray, i32v4.xyz, i32v4.w, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
i64 = imageAtomicExchange(i1D, i32v4.x, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
i64 = imageAtomicCompSwap(i3D, i32v4.xyz, i64, i64 + 1, gl_ScopeDevice,
gl_StorageSemanticsImage, gl_SemanticsRelaxed, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
i64 = imageAtomicLoad(iBuf, i32v4.x, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
imageAtomicStore(i2DArray, i32v4.xyz, i64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
u64 = imageAtomicAdd(u2D, i32v4.xy, u64);
u64 = imageAtomicMin(uCube, i32v4.xyz, u64);
u64 = imageAtomicMax(u1DArray, i32v4.xy, u64);
u64 = imageAtomicAnd(uCubeArray, i32v4.xyz, u64);
u64 = imageAtomicOr(u2DMS, i32v4.xy, i32v4.z, u64);
u64 = imageAtomicXor(u2D, i32v4.xy, u64);
u64 = imageAtomicExchange(uCube, i32v4.xyz, u64);
u64 = imageAtomicCompSwap(u1DArray, i32v4.xy, u64, u64 + 1);
u64 = imageAtomicAdd(u2D, i32v4.xy, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
u64 = imageAtomicMin(uCube, i32v4.xyz, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
u64 = imageAtomicMax(u1DArray, i32v4.xy, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
u64 = imageAtomicAnd(uCubeArray, i32v4.xyz, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
u64 = imageAtomicOr(u2DMS, i32v4.xy, i32v4.z, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
u64 = imageAtomicXor(u2D, i32v4.xy, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
u64 = imageAtomicExchange(uCube, i32v4.xyz, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
u64 = imageAtomicCompSwap(u1DArray, i32v4.xy, u64, u64 + 1, gl_ScopeDevice,
gl_StorageSemanticsImage, gl_SemanticsRelaxed, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
u64 = imageAtomicLoad(uCubeArray, i32v4.xyz, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
imageAtomicStore(u2DMS, i32v4.xy, i32v4.z, u64, gl_ScopeDevice, gl_StorageSemanticsImage, gl_SemanticsRelaxed);
i64v4 += imageLoad(i1D, i32v4.x);
i64v4 += imageLoad(i3D, i32v4.xyz);
i64v4 += imageLoad(iBuf, i32v4.x);
i64v4 += imageLoad(i2DArray, i32v4.xyz);
i64v4 += imageLoad(i2DRect, i32v4.xy);
i64v4 += imageLoad(i2DMSArray, i32v4.xyz, i32v4.w);
imageStore(u2D, i32v4.xy, u64v4);
imageStore(uCube, i32v4.xyz, u64v4);
imageStore(u1DArray, i32v4.xy, u64v4);
imageStore(uCubeArray, i32v4.xyz, u64v4);
imageStore(u2DMS, i32v4.xy, i32v4.z, u64v4);
sparseImageLoadARB(i3D, i32v4.xyz, i64v4);
sparseImageLoadARB(i2DArray, i32v4.xyz, i64v4);
sparseImageLoadARB(i2DRect, i32v4.xy, i64v4);
sparseImageLoadARB(u2D, i32v4.xy, u64v4);
sparseImageLoadARB(uCube, i32v4.xyz, u64v4);
sparseImageLoadARB(uCubeArray, i32v4.xyz, u64v4);
}

View File

@ -1,6 +1,8 @@
#version 450 core
#extension GL_AMD_shader_image_load_store_lod: enable
#extension GL_ARB_gpu_shader_int64: enable
#extension GL_EXT_shader_image_int64: enable
layout(rgba32f, binding = 0) uniform image1D i1D;
layout(rgba32f, binding = 1) uniform image2D i2D;
@ -12,6 +14,20 @@ layout(rgba32ui, binding = 6) uniform uimageCubeArray uiCubeArray;
layout(location = 0) out vec4 fragColor;
layout(r64i, binding = 7) uniform i64image1D i64i1D;
layout(r64i, binding = 8) uniform i64image2D i64i2D;
layout(r64i, binding = 9) uniform i64image3D i64i3D;
layout(r64ui, binding = 10) uniform u64imageCube u64iCube;
layout(r64ui, binding = 11) uniform u64image1DArray u64i1DArray;
layout(r64ui, binding = 12) uniform u64image2DArray u64i2DArray;
layout(r64ui, binding = 13) uniform u64imageCubeArray u64iCubeArray;
layout(binding = 14) buffer Buf
{
i64vec4 i64v4;
u64vec4 u64v4;
};
void main()
{
const int c1 = 1;
@ -33,4 +49,14 @@ void main()
sparseImageLoadLodAMD(uiCubeArray, c3, lod, u4);
fragColor = f4 + vec4(u4);
i64v4 += imageLoadLodAMD(i64i1D, c1, lod);
i64v4 += imageLoadLodAMD(i64i2D, c2, lod);
i64v4 += imageLoadLodAMD(i64i3D, c3, lod);
imageStoreLodAMD(u64iCube, c3, lod, u64v4);
imageStoreLodAMD(u64i1DArray, c2, lod, u64v4);
sparseImageLoadLodAMD(u64i2DArray, c3, lod, u64v4);
sparseImageLoadLodAMD(u64iCubeArray, c3, lod, u64v4);
}

View File

@ -406,6 +406,7 @@ enum TLayoutFormat {
ElfRg8i,
ElfR16i,
ElfR8i,
ElfR64i,
ElfIntGuard, // to help with comparisons
@ -423,6 +424,7 @@ enum TLayoutFormat {
ElfRg8ui,
ElfR16ui,
ElfR8ui,
ElfR64ui,
ElfCount
};
@ -1117,6 +1119,8 @@ public:
case ElfR32ui: return "r32ui";
case ElfR16ui: return "r16ui";
case ElfR8ui: return "r8ui";
case ElfR64ui: return "r64ui";
case ElfR64i: return "r64i";
default: return "none";
}
}

View File

@ -509,6 +509,8 @@ TBuiltIns::TBuiltIns()
prefixes[EbtUint8] = "u8";
prefixes[EbtInt16] = "i16";
prefixes[EbtUint16] = "u16";
prefixes[EbtInt64] = "i64";
prefixes[EbtUint64] = "u64";
#endif
postfixes[2] = "2";
@ -5724,6 +5726,45 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
stageBuiltins[static_cast<EShLanguage>(stage)].append("const highp int gl_ShadingRateFlag4HorizontalPixelsEXT = 8;\n");
}
}
// GL_EXT_shader_image_int64
if ((profile != EEsProfile && version >= 420) ||
(profile == EEsProfile && version >= 310)) {
const TBasicType bTypes[] = { EbtInt64, EbtUint64 };
for (int ms = 0; ms <= 1; ++ms) { // loop over "bool" multisample or not
for (int arrayed = 0; arrayed <= 1; ++arrayed) { // loop over "bool" arrayed or not
for (int dim = Esd1D; dim < EsdSubpass; ++dim) { // 1D, ..., buffer
if ((dim == Esd1D || dim == EsdRect) && profile == EEsProfile)
continue;
if ((dim == Esd3D || dim == EsdRect || dim == EsdBuffer) && arrayed)
continue;
if (dim != Esd2D && ms)
continue;
// Loop over the bTypes
for (size_t bType = 0; bType < sizeof(bTypes)/sizeof(TBasicType); ++bType) {
//
// Now, make all the function prototypes for the type we just built...
//
TSampler sampler;
sampler.setImage(bTypes[bType], (TSamplerDim)dim, arrayed ? true : false,
false,
ms ? true : false);
TString typeName = sampler.getString();
addQueryFunctions(sampler, typeName, version, profile);
addImageFunctions(sampler, typeName, version, profile);
}
}
}
}
}
#endif // !GLSLANG_WEB
// printf("%s\n", commonBuiltins.c_str());
@ -5820,7 +5861,6 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
#endif
if (shadow && (bTypes[bType] == EbtInt || bTypes[bType] == EbtUint))
continue;
//
// Now, make all the function prototypes for the type we just built...
//
@ -6045,8 +6085,16 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int
if ( profile != EEsProfile ||
(profile == EEsProfile && version >= 310)) {
if (sampler.type == EbtInt || sampler.type == EbtUint) {
const char* dataType = sampler.type == EbtInt ? "highp int" : "highp uint";
if (sampler.type == EbtInt || sampler.type == EbtUint || sampler.type == EbtInt64 || sampler.type == EbtUint64 ) {
const char* dataType;
switch (sampler.type) {
case(EbtInt): dataType = "highp int"; break;
case(EbtUint): dataType = "highp uint"; break;
case(EbtInt64): dataType = "highp int64_t"; break;
case(EbtUint64): dataType = "highp uint64_t"; break;
default: dataType = "";
}
const int numBuiltins = 7;

View File

@ -2121,9 +2121,15 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
{
// Make sure the image types have the correct layout() format and correct argument types
const TType& imageType = arg0->getType();
if (imageType.getSampler().type == EbtInt || imageType.getSampler().type == EbtUint) {
if (imageType.getQualifier().getFormat() != ElfR32i && imageType.getQualifier().getFormat() != ElfR32ui)
if (imageType.getSampler().type == EbtInt || imageType.getSampler().type == EbtUint ||
imageType.getSampler().type == EbtInt64 || imageType.getSampler().type == EbtUint64) {
if (imageType.getQualifier().getFormat() != ElfR32i && imageType.getQualifier().getFormat() != ElfR32ui &&
imageType.getQualifier().getFormat() != ElfR64i && imageType.getQualifier().getFormat() != ElfR64ui)
error(loc, "only supported on image with format r32i or r32ui", fnCandidate.getName().c_str(), "");
if (callNode.getType().getBasicType() == EbtInt64 && imageType.getQualifier().getFormat() != ElfR64i)
error(loc, "only supported on image with format r64i", fnCandidate.getName().c_str(), "");
else if (callNode.getType().getBasicType() == EbtUint64 && imageType.getQualifier().getFormat() != ElfR64ui)
error(loc, "only supported on image with format r64ui", fnCandidate.getName().c_str(), "");
} else {
bool isImageAtomicOnFloatAllowed = ((fnCandidate.getName().compare(0, 14, "imageAtomicAdd") == 0) ||
(fnCandidate.getName().compare(0, 15, "imageAtomicLoad") == 0) ||

View File

@ -471,6 +471,28 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["image2DMSArray"] = IMAGE2DMSARRAY;
(*KeywordMap)["iimage2DMSArray"] = IIMAGE2DMSARRAY;
(*KeywordMap)["uimage2DMSArray"] = UIMAGE2DMSARRAY;
(*KeywordMap)["i64image1D"] = I64IMAGE1D;
(*KeywordMap)["u64image1D"] = U64IMAGE1D;
(*KeywordMap)["i64image2D"] = I64IMAGE2D;
(*KeywordMap)["u64image2D"] = U64IMAGE2D;
(*KeywordMap)["i64image3D"] = I64IMAGE3D;
(*KeywordMap)["u64image3D"] = U64IMAGE3D;
(*KeywordMap)["i64image2DRect"] = I64IMAGE2DRECT;
(*KeywordMap)["u64image2DRect"] = U64IMAGE2DRECT;
(*KeywordMap)["i64imageCube"] = I64IMAGECUBE;
(*KeywordMap)["u64imageCube"] = U64IMAGECUBE;
(*KeywordMap)["i64imageBuffer"] = I64IMAGEBUFFER;
(*KeywordMap)["u64imageBuffer"] = U64IMAGEBUFFER;
(*KeywordMap)["i64image1DArray"] = I64IMAGE1DARRAY;
(*KeywordMap)["u64image1DArray"] = U64IMAGE1DARRAY;
(*KeywordMap)["i64image2DArray"] = I64IMAGE2DARRAY;
(*KeywordMap)["u64image2DArray"] = U64IMAGE2DARRAY;
(*KeywordMap)["i64imageCubeArray"] = I64IMAGECUBEARRAY;
(*KeywordMap)["u64imageCubeArray"] = U64IMAGECUBEARRAY;
(*KeywordMap)["i64image2DMS"] = I64IMAGE2DMS;
(*KeywordMap)["u64image2DMS"] = U64IMAGE2DMS;
(*KeywordMap)["i64image2DMSArray"] = I64IMAGE2DMSARRAY;
(*KeywordMap)["u64image2DMSArray"] = U64IMAGE2DMSARRAY;
(*KeywordMap)["double"] = DOUBLE;
(*KeywordMap)["dvec2"] = DVEC2;
(*KeywordMap)["dvec3"] = DVEC3;
@ -1147,6 +1169,19 @@ int TScanContext::tokenizeIdentifier()
afterType = true;
return firstGenerationImage(false);
case I64IMAGE1D:
case U64IMAGE1D:
case I64IMAGE1DARRAY:
case U64IMAGE1DARRAY:
case I64IMAGE2DRECT:
case U64IMAGE2DRECT:
afterType = true;
if (parseContext.symbolTable.atBuiltInLevel() ||
parseContext.extensionTurnedOn(E_GL_EXT_shader_image_int64)) {
return firstGenerationImage(false);
}
return identifierOrType();
case IMAGEBUFFER:
case IIMAGEBUFFER:
case UIMAGEBUFFER:
@ -1156,6 +1191,18 @@ int TScanContext::tokenizeIdentifier()
return keyword;
return firstGenerationImage(false);
case I64IMAGEBUFFER:
case U64IMAGEBUFFER:
afterType = true;
if (parseContext.symbolTable.atBuiltInLevel() ||
parseContext.extensionTurnedOn(E_GL_EXT_shader_image_int64)) {
if ((parseContext.isEsProfile() && parseContext.version >= 320) ||
parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer))
return keyword;
return firstGenerationImage(false);
}
return identifierOrType();
case IMAGE2D:
case IIMAGE2D:
case UIMAGE2D:
@ -1171,6 +1218,20 @@ int TScanContext::tokenizeIdentifier()
afterType = true;
return firstGenerationImage(true);
case I64IMAGE2D:
case U64IMAGE2D:
case I64IMAGE3D:
case U64IMAGE3D:
case I64IMAGECUBE:
case U64IMAGECUBE:
case I64IMAGE2DARRAY:
case U64IMAGE2DARRAY:
afterType = true;
if (parseContext.symbolTable.atBuiltInLevel() ||
parseContext.extensionTurnedOn(E_GL_EXT_shader_image_int64))
return firstGenerationImage(true);
return identifierOrType();
case IMAGECUBEARRAY:
case IIMAGECUBEARRAY:
case UIMAGECUBEARRAY:
@ -1180,6 +1241,18 @@ int TScanContext::tokenizeIdentifier()
return keyword;
return secondGenerationImage();
case I64IMAGECUBEARRAY:
case U64IMAGECUBEARRAY:
afterType = true;
if (parseContext.symbolTable.atBuiltInLevel() ||
parseContext.extensionTurnedOn(E_GL_EXT_shader_image_int64)) {
if ((parseContext.isEsProfile() && parseContext.version >= 320) ||
parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array))
return keyword;
return secondGenerationImage();
}
return identifierOrType();
case IMAGE2DMS:
case IIMAGE2DMS:
case UIMAGE2DMS:
@ -1189,6 +1262,17 @@ int TScanContext::tokenizeIdentifier()
afterType = true;
return secondGenerationImage();
case I64IMAGE2DMS:
case U64IMAGE2DMS:
case I64IMAGE2DMSARRAY:
case U64IMAGE2DMSARRAY:
afterType = true;
if (parseContext.symbolTable.atBuiltInLevel() ||
parseContext.extensionTurnedOn(E_GL_EXT_shader_image_int64)) {
return secondGenerationImage();
}
return identifierOrType();
case DOUBLE:
case DVEC2:
case DVEC3:

View File

@ -85,6 +85,8 @@ void TType::buildMangledName(TString& mangledName) const
#endif
case EbtInt: mangledName += "i"; break;
case EbtUint: mangledName += "u"; break;
case EbtInt64: mangledName += "i64"; break;
case EbtUint64: mangledName += "u64"; break;
default: break; // some compilers want this
}
if (sampler.isImageClass())

View File

@ -328,6 +328,7 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_EXT_blend_func_extended] = EBhDisable;
extensionBehavior[E_GL_EXT_shader_implicit_conversions] = EBhDisable;
extensionBehavior[E_GL_EXT_fragment_shading_rate] = EBhDisable;
extensionBehavior[E_GL_EXT_shader_image_int64] = EBhDisable;
// OVR extensions
extensionBehavior[E_GL_OVR_multiview] = EBhDisable;
@ -477,6 +478,7 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_KHR_shader_subgroup_clustered 1\n"
"#define GL_KHR_shader_subgroup_quad 1\n"
"#define GL_EXT_shader_image_int64 1\n"
"#define GL_EXT_shader_atomic_int64 1\n"
"#define GL_EXT_shader_realtime_clock 1\n"
"#define GL_EXT_ray_tracing 1\n"

View File

@ -200,6 +200,7 @@ const char* const E_GL_EXT_ray_flags_primitive_culling = "GL_EXT_ray_flags_
const char* const E_GL_EXT_blend_func_extended = "GL_EXT_blend_func_extended";
const char* const E_GL_EXT_shader_implicit_conversions = "GL_EXT_shader_implicit_conversions";
const char* const E_GL_EXT_fragment_shading_rate = "GL_EXT_fragment_shading_rate";
const char* const E_GL_EXT_shader_image_int64 = "GL_EXT_shader_image_int64";
// Arrays of extensions for the above viewportEXTs duplications

View File

@ -242,6 +242,18 @@ GLSLANG_WEB_EXCLUDE_ON
%token <lex> F16IMAGECUBE F16IMAGE1DARRAY F16IMAGE2DARRAY F16IMAGECUBEARRAY
%token <lex> F16IMAGEBUFFER F16IMAGE2DMS F16IMAGE2DMSARRAY
%token <lex> I64IMAGE1D U64IMAGE1D
%token <lex> I64IMAGE2D U64IMAGE2D
%token <lex> I64IMAGE3D U64IMAGE3D
%token <lex> I64IMAGE2DRECT U64IMAGE2DRECT
%token <lex> I64IMAGECUBE U64IMAGECUBE
%token <lex> I64IMAGEBUFFER U64IMAGEBUFFER
%token <lex> I64IMAGE1DARRAY U64IMAGE1DARRAY
%token <lex> I64IMAGE2DARRAY U64IMAGE2DARRAY
%token <lex> I64IMAGECUBEARRAY U64IMAGECUBEARRAY
%token <lex> I64IMAGE2DMS U64IMAGE2DMS
%token <lex> I64IMAGE2DMSARRAY U64IMAGE2DMSARRAY
// texture without sampler
%token <lex> TEXTURECUBEARRAY ITEXTURECUBEARRAY UTEXTURECUBEARRAY
%token <lex> TEXTURE1D ITEXTURE1D UTEXTURE1D
@ -3203,6 +3215,116 @@ GLSLANG_WEB_EXCLUDE_ON
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint, Esd2D, true, false, true);
}
| I64IMAGE1D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, Esd1D);
}
| U64IMAGE1D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, Esd1D);
}
| I64IMAGE2D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, Esd2D);
}
| U64IMAGE2D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, Esd2D);
}
| I64IMAGE3D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, Esd3D);
}
| U64IMAGE3D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, Esd3D);
}
| I64IMAGE2DRECT {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, EsdRect);
}
| U64IMAGE2DRECT {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, EsdRect);
}
| I64IMAGECUBE {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, EsdCube);
}
| U64IMAGECUBE {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, EsdCube);
}
| I64IMAGEBUFFER {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, EsdBuffer);
}
| U64IMAGEBUFFER {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, EsdBuffer);
}
| I64IMAGE1DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, Esd1D, true);
}
| U64IMAGE1DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, Esd1D, true);
}
| I64IMAGE2DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, Esd2D, true);
}
| U64IMAGE2DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, Esd2D, true);
}
| I64IMAGECUBEARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, EsdCube, true);
}
| U64IMAGECUBEARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, EsdCube, true);
}
| I64IMAGE2DMS {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, Esd2D, false, false, true);
}
| U64IMAGE2DMS {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, Esd2D, false, false, true);
}
| I64IMAGE2DMSARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, Esd2D, true, false, true);
}
| U64IMAGE2DMSARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, Esd2D, true, false, true);
}
| SAMPLEREXTERNALOES { // GL_OES_EGL_image_external
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;

View File

@ -242,6 +242,18 @@ extern int yylex(YYSTYPE*, TParseContext&);
%token <lex> F16IMAGECUBE F16IMAGE1DARRAY F16IMAGE2DARRAY F16IMAGECUBEARRAY
%token <lex> F16IMAGEBUFFER F16IMAGE2DMS F16IMAGE2DMSARRAY
%token <lex> I64IMAGE1D U64IMAGE1D
%token <lex> I64IMAGE2D U64IMAGE2D
%token <lex> I64IMAGE3D U64IMAGE3D
%token <lex> I64IMAGE2DRECT U64IMAGE2DRECT
%token <lex> I64IMAGECUBE U64IMAGECUBE
%token <lex> I64IMAGEBUFFER U64IMAGEBUFFER
%token <lex> I64IMAGE1DARRAY U64IMAGE1DARRAY
%token <lex> I64IMAGE2DARRAY U64IMAGE2DARRAY
%token <lex> I64IMAGECUBEARRAY U64IMAGECUBEARRAY
%token <lex> I64IMAGE2DMS U64IMAGE2DMS
%token <lex> I64IMAGE2DMSARRAY U64IMAGE2DMSARRAY
// texture without sampler
%token <lex> TEXTURECUBEARRAY ITEXTURECUBEARRAY UTEXTURECUBEARRAY
%token <lex> TEXTURE1D ITEXTURE1D UTEXTURE1D
@ -3203,6 +3215,116 @@ type_specifier_nonarray
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint, Esd2D, true, false, true);
}
| I64IMAGE1D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, Esd1D);
}
| U64IMAGE1D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, Esd1D);
}
| I64IMAGE2D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, Esd2D);
}
| U64IMAGE2D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, Esd2D);
}
| I64IMAGE3D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, Esd3D);
}
| U64IMAGE3D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, Esd3D);
}
| I64IMAGE2DRECT {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, EsdRect);
}
| U64IMAGE2DRECT {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, EsdRect);
}
| I64IMAGECUBE {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, EsdCube);
}
| U64IMAGECUBE {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, EsdCube);
}
| I64IMAGEBUFFER {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, EsdBuffer);
}
| U64IMAGEBUFFER {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, EsdBuffer);
}
| I64IMAGE1DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, Esd1D, true);
}
| U64IMAGE1DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, Esd1D, true);
}
| I64IMAGE2DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, Esd2D, true);
}
| U64IMAGE2DARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, Esd2D, true);
}
| I64IMAGECUBEARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, EsdCube, true);
}
| U64IMAGECUBEARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, EsdCube, true);
}
| I64IMAGE2DMS {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, Esd2D, false, false, true);
}
| U64IMAGE2DMS {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, Esd2D, false, false, true);
}
| I64IMAGE2DMSARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtInt64, Esd2D, true, false, true);
}
| U64IMAGE2DMSARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;
$$.sampler.setImage(EbtUint64, Esd2D, true, false, true);
}
| SAMPLEREXTERNALOES { // GL_OES_EGL_image_external
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler;

File diff suppressed because it is too large Load Diff

View File

@ -297,171 +297,193 @@ extern int yydebug;
F16IMAGEBUFFER = 507,
F16IMAGE2DMS = 508,
F16IMAGE2DMSARRAY = 509,
TEXTURECUBEARRAY = 510,
ITEXTURECUBEARRAY = 511,
UTEXTURECUBEARRAY = 512,
TEXTURE1D = 513,
ITEXTURE1D = 514,
UTEXTURE1D = 515,
TEXTURE1DARRAY = 516,
ITEXTURE1DARRAY = 517,
UTEXTURE1DARRAY = 518,
TEXTURE2DRECT = 519,
ITEXTURE2DRECT = 520,
UTEXTURE2DRECT = 521,
TEXTUREBUFFER = 522,
ITEXTUREBUFFER = 523,
UTEXTUREBUFFER = 524,
TEXTURE2DMS = 525,
ITEXTURE2DMS = 526,
UTEXTURE2DMS = 527,
TEXTURE2DMSARRAY = 528,
ITEXTURE2DMSARRAY = 529,
UTEXTURE2DMSARRAY = 530,
F16TEXTURE1D = 531,
F16TEXTURE2D = 532,
F16TEXTURE3D = 533,
F16TEXTURE2DRECT = 534,
F16TEXTURECUBE = 535,
F16TEXTURE1DARRAY = 536,
F16TEXTURE2DARRAY = 537,
F16TEXTURECUBEARRAY = 538,
F16TEXTUREBUFFER = 539,
F16TEXTURE2DMS = 540,
F16TEXTURE2DMSARRAY = 541,
SUBPASSINPUT = 542,
SUBPASSINPUTMS = 543,
ISUBPASSINPUT = 544,
ISUBPASSINPUTMS = 545,
USUBPASSINPUT = 546,
USUBPASSINPUTMS = 547,
F16SUBPASSINPUT = 548,
F16SUBPASSINPUTMS = 549,
LEFT_OP = 550,
RIGHT_OP = 551,
INC_OP = 552,
DEC_OP = 553,
LE_OP = 554,
GE_OP = 555,
EQ_OP = 556,
NE_OP = 557,
AND_OP = 558,
OR_OP = 559,
XOR_OP = 560,
MUL_ASSIGN = 561,
DIV_ASSIGN = 562,
ADD_ASSIGN = 563,
MOD_ASSIGN = 564,
LEFT_ASSIGN = 565,
RIGHT_ASSIGN = 566,
AND_ASSIGN = 567,
XOR_ASSIGN = 568,
OR_ASSIGN = 569,
SUB_ASSIGN = 570,
STRING_LITERAL = 571,
LEFT_PAREN = 572,
RIGHT_PAREN = 573,
LEFT_BRACKET = 574,
RIGHT_BRACKET = 575,
LEFT_BRACE = 576,
RIGHT_BRACE = 577,
DOT = 578,
COMMA = 579,
COLON = 580,
EQUAL = 581,
SEMICOLON = 582,
BANG = 583,
DASH = 584,
TILDE = 585,
PLUS = 586,
STAR = 587,
SLASH = 588,
PERCENT = 589,
LEFT_ANGLE = 590,
RIGHT_ANGLE = 591,
VERTICAL_BAR = 592,
CARET = 593,
AMPERSAND = 594,
QUESTION = 595,
INVARIANT = 596,
HIGH_PRECISION = 597,
MEDIUM_PRECISION = 598,
LOW_PRECISION = 599,
PRECISION = 600,
PACKED = 601,
RESOURCE = 602,
SUPERP = 603,
FLOATCONSTANT = 604,
INTCONSTANT = 605,
UINTCONSTANT = 606,
BOOLCONSTANT = 607,
IDENTIFIER = 608,
TYPE_NAME = 609,
CENTROID = 610,
IN = 611,
OUT = 612,
INOUT = 613,
STRUCT = 614,
VOID = 615,
WHILE = 616,
BREAK = 617,
CONTINUE = 618,
DO = 619,
ELSE = 620,
FOR = 621,
IF = 622,
DISCARD = 623,
RETURN = 624,
SWITCH = 625,
CASE = 626,
DEFAULT = 627,
UNIFORM = 628,
SHARED = 629,
BUFFER = 630,
FLAT = 631,
SMOOTH = 632,
LAYOUT = 633,
DOUBLECONSTANT = 634,
INT16CONSTANT = 635,
UINT16CONSTANT = 636,
FLOAT16CONSTANT = 637,
INT32CONSTANT = 638,
UINT32CONSTANT = 639,
INT64CONSTANT = 640,
UINT64CONSTANT = 641,
SUBROUTINE = 642,
DEMOTE = 643,
PAYLOADNV = 644,
PAYLOADINNV = 645,
HITATTRNV = 646,
CALLDATANV = 647,
CALLDATAINNV = 648,
PAYLOADEXT = 649,
PAYLOADINEXT = 650,
HITATTREXT = 651,
CALLDATAEXT = 652,
CALLDATAINEXT = 653,
PATCH = 654,
SAMPLE = 655,
NONUNIFORM = 656,
COHERENT = 657,
VOLATILE = 658,
RESTRICT = 659,
READONLY = 660,
WRITEONLY = 661,
DEVICECOHERENT = 662,
QUEUEFAMILYCOHERENT = 663,
WORKGROUPCOHERENT = 664,
SUBGROUPCOHERENT = 665,
NONPRIVATE = 666,
SHADERCALLCOHERENT = 667,
NOPERSPECTIVE = 668,
EXPLICITINTERPAMD = 669,
PERVERTEXNV = 670,
PERPRIMITIVENV = 671,
PERVIEWNV = 672,
PERTASKNV = 673,
PRECISE = 674
I64IMAGE1D = 510,
U64IMAGE1D = 511,
I64IMAGE2D = 512,
U64IMAGE2D = 513,
I64IMAGE3D = 514,
U64IMAGE3D = 515,
I64IMAGE2DRECT = 516,
U64IMAGE2DRECT = 517,
I64IMAGECUBE = 518,
U64IMAGECUBE = 519,
I64IMAGEBUFFER = 520,
U64IMAGEBUFFER = 521,
I64IMAGE1DARRAY = 522,
U64IMAGE1DARRAY = 523,
I64IMAGE2DARRAY = 524,
U64IMAGE2DARRAY = 525,
I64IMAGECUBEARRAY = 526,
U64IMAGECUBEARRAY = 527,
I64IMAGE2DMS = 528,
U64IMAGE2DMS = 529,
I64IMAGE2DMSARRAY = 530,
U64IMAGE2DMSARRAY = 531,
TEXTURECUBEARRAY = 532,
ITEXTURECUBEARRAY = 533,
UTEXTURECUBEARRAY = 534,
TEXTURE1D = 535,
ITEXTURE1D = 536,
UTEXTURE1D = 537,
TEXTURE1DARRAY = 538,
ITEXTURE1DARRAY = 539,
UTEXTURE1DARRAY = 540,
TEXTURE2DRECT = 541,
ITEXTURE2DRECT = 542,
UTEXTURE2DRECT = 543,
TEXTUREBUFFER = 544,
ITEXTUREBUFFER = 545,
UTEXTUREBUFFER = 546,
TEXTURE2DMS = 547,
ITEXTURE2DMS = 548,
UTEXTURE2DMS = 549,
TEXTURE2DMSARRAY = 550,
ITEXTURE2DMSARRAY = 551,
UTEXTURE2DMSARRAY = 552,
F16TEXTURE1D = 553,
F16TEXTURE2D = 554,
F16TEXTURE3D = 555,
F16TEXTURE2DRECT = 556,
F16TEXTURECUBE = 557,
F16TEXTURE1DARRAY = 558,
F16TEXTURE2DARRAY = 559,
F16TEXTURECUBEARRAY = 560,
F16TEXTUREBUFFER = 561,
F16TEXTURE2DMS = 562,
F16TEXTURE2DMSARRAY = 563,
SUBPASSINPUT = 564,
SUBPASSINPUTMS = 565,
ISUBPASSINPUT = 566,
ISUBPASSINPUTMS = 567,
USUBPASSINPUT = 568,
USUBPASSINPUTMS = 569,
F16SUBPASSINPUT = 570,
F16SUBPASSINPUTMS = 571,
LEFT_OP = 572,
RIGHT_OP = 573,
INC_OP = 574,
DEC_OP = 575,
LE_OP = 576,
GE_OP = 577,
EQ_OP = 578,
NE_OP = 579,
AND_OP = 580,
OR_OP = 581,
XOR_OP = 582,
MUL_ASSIGN = 583,
DIV_ASSIGN = 584,
ADD_ASSIGN = 585,
MOD_ASSIGN = 586,
LEFT_ASSIGN = 587,
RIGHT_ASSIGN = 588,
AND_ASSIGN = 589,
XOR_ASSIGN = 590,
OR_ASSIGN = 591,
SUB_ASSIGN = 592,
STRING_LITERAL = 593,
LEFT_PAREN = 594,
RIGHT_PAREN = 595,
LEFT_BRACKET = 596,
RIGHT_BRACKET = 597,
LEFT_BRACE = 598,
RIGHT_BRACE = 599,
DOT = 600,
COMMA = 601,
COLON = 602,
EQUAL = 603,
SEMICOLON = 604,
BANG = 605,
DASH = 606,
TILDE = 607,
PLUS = 608,
STAR = 609,
SLASH = 610,
PERCENT = 611,
LEFT_ANGLE = 612,
RIGHT_ANGLE = 613,
VERTICAL_BAR = 614,
CARET = 615,
AMPERSAND = 616,
QUESTION = 617,
INVARIANT = 618,
HIGH_PRECISION = 619,
MEDIUM_PRECISION = 620,
LOW_PRECISION = 621,
PRECISION = 622,
PACKED = 623,
RESOURCE = 624,
SUPERP = 625,
FLOATCONSTANT = 626,
INTCONSTANT = 627,
UINTCONSTANT = 628,
BOOLCONSTANT = 629,
IDENTIFIER = 630,
TYPE_NAME = 631,
CENTROID = 632,
IN = 633,
OUT = 634,
INOUT = 635,
STRUCT = 636,
VOID = 637,
WHILE = 638,
BREAK = 639,
CONTINUE = 640,
DO = 641,
ELSE = 642,
FOR = 643,
IF = 644,
DISCARD = 645,
RETURN = 646,
SWITCH = 647,
CASE = 648,
DEFAULT = 649,
UNIFORM = 650,
SHARED = 651,
BUFFER = 652,
FLAT = 653,
SMOOTH = 654,
LAYOUT = 655,
DOUBLECONSTANT = 656,
INT16CONSTANT = 657,
UINT16CONSTANT = 658,
FLOAT16CONSTANT = 659,
INT32CONSTANT = 660,
UINT32CONSTANT = 661,
INT64CONSTANT = 662,
UINT64CONSTANT = 663,
SUBROUTINE = 664,
DEMOTE = 665,
PAYLOADNV = 666,
PAYLOADINNV = 667,
HITATTRNV = 668,
CALLDATANV = 669,
CALLDATAINNV = 670,
PAYLOADEXT = 671,
PAYLOADINEXT = 672,
HITATTREXT = 673,
CALLDATAEXT = 674,
CALLDATAINEXT = 675,
PATCH = 676,
SAMPLE = 677,
NONUNIFORM = 678,
COHERENT = 679,
VOLATILE = 680,
RESTRICT = 681,
READONLY = 682,
WRITEONLY = 683,
DEVICECOHERENT = 684,
QUEUEFAMILYCOHERENT = 685,
WORKGROUPCOHERENT = 686,
SUBGROUPCOHERENT = 687,
NONPRIVATE = 688,
SHADERCALLCOHERENT = 689,
NOPERSPECTIVE = 690,
EXPLICITINTERPAMD = 691,
PERVERTEXNV = 692,
PERPRIMITIVENV = 693,
PERVIEWNV = 694,
PERTASKNV = 695,
PRECISE = 696
};
#endif
@ -506,7 +528,7 @@ union YYSTYPE
glslang::TArraySizes* typeParameters;
} interm;
#line 510 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
#line 532 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
};
typedef union YYSTYPE YYSTYPE;

View File

@ -411,6 +411,7 @@ INSTANTIATE_TEST_SUITE_P(
"spv.texture.vert",
"spv.textureBuffer.vert",
"spv.image.frag",
"spv.imageAtomic64.frag",
"spv.types.frag",
"spv.uint.frag",
"spv.uniformArray.frag",