Merge pull request #1876 from jeffbolznv/imma
GL_NV_integer_cooperative_matrix support
This commit is contained in:
commit
14e13e757d
@ -3485,6 +3485,10 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
|
|||||||
builder.addExtension(spv::E_SPV_NV_cooperative_matrix);
|
builder.addExtension(spv::E_SPV_NV_cooperative_matrix);
|
||||||
if (type.getBasicType() == glslang::EbtFloat16)
|
if (type.getBasicType() == glslang::EbtFloat16)
|
||||||
builder.addCapability(spv::CapabilityFloat16);
|
builder.addCapability(spv::CapabilityFloat16);
|
||||||
|
if (type.getBasicType() == glslang::EbtUint8 ||
|
||||||
|
type.getBasicType() == glslang::EbtInt8) {
|
||||||
|
builder.addCapability(spv::CapabilityInt8);
|
||||||
|
}
|
||||||
|
|
||||||
spv::Id scope = makeArraySizeId(*type.getTypeParameters(), 1);
|
spv::Id scope = makeArraySizeId(*type.getTypeParameters(), 1);
|
||||||
spv::Id rows = makeArraySizeId(*type.getTypeParameters(), 2);
|
spv::Id rows = makeArraySizeId(*type.getTypeParameters(), 2);
|
||||||
|
|||||||
418
Test/baseResults/spv.intcoopmat.comp.out
Normal file
418
Test/baseResults/spv.intcoopmat.comp.out
Normal file
@ -0,0 +1,418 @@
|
|||||||
|
spv.intcoopmat.comp
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 80007
|
||||||
|
// Id's are bound by 262
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Capability Float16
|
||||||
|
Capability Int8
|
||||||
|
Capability StorageBuffer8BitAccess
|
||||||
|
Capability VulkanMemoryModelKHR
|
||||||
|
Capability PhysicalStorageBufferAddressesEXT
|
||||||
|
Capability CooperativeMatrixNV
|
||||||
|
Extension "SPV_EXT_physical_storage_buffer"
|
||||||
|
Extension "SPV_KHR_8bit_storage"
|
||||||
|
Extension "SPV_KHR_storage_buffer_storage_class"
|
||||||
|
Extension "SPV_KHR_vulkan_memory_model"
|
||||||
|
Extension "SPV_NV_cooperative_matrix"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel PhysicalStorageBuffer64EXT VulkanKHR
|
||||||
|
EntryPoint GLCompute 4 "main"
|
||||||
|
ExecutionMode 4 LocalSize 64 1 1
|
||||||
|
Source GLSL 450
|
||||||
|
SourceExtension "GL_EXT_buffer_reference"
|
||||||
|
SourceExtension "GL_EXT_shader_explicit_arithmetic_types"
|
||||||
|
SourceExtension "GL_KHR_memory_scope_semantics"
|
||||||
|
SourceExtension "GL_NV_cooperative_matrix"
|
||||||
|
SourceExtension "GL_NV_integer_cooperative_matrix"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 14 "ineg(i81;"
|
||||||
|
Name 13 "m"
|
||||||
|
Name 21 "umul(u81;"
|
||||||
|
Name 20 "m"
|
||||||
|
Name 35 "mu"
|
||||||
|
Name 39 "mi"
|
||||||
|
Name 55 "mf16_0"
|
||||||
|
Name 61 "mf32_0"
|
||||||
|
Name 64 "mf16_1"
|
||||||
|
Name 67 "mf32_1"
|
||||||
|
Name 71 "x"
|
||||||
|
Name 81 "tempArg"
|
||||||
|
Name 85 "Block"
|
||||||
|
MemberName 85(Block) 0 "y"
|
||||||
|
MemberName 85(Block) 1 "x"
|
||||||
|
Name 87 "block"
|
||||||
|
Name 98 "tempArg"
|
||||||
|
Name 103 "Block16"
|
||||||
|
MemberName 103(Block16) 0 "y"
|
||||||
|
MemberName 103(Block16) 1 "x"
|
||||||
|
MemberName 103(Block16) 2 "b"
|
||||||
|
Name 106 "Block"
|
||||||
|
MemberName 106(Block) 0 "y"
|
||||||
|
MemberName 106(Block) 1 "x"
|
||||||
|
Name 108 "block8"
|
||||||
|
Name 115 "tempArg"
|
||||||
|
Name 128 "D"
|
||||||
|
Name 129 "A"
|
||||||
|
Name 131 "B"
|
||||||
|
Name 133 "C"
|
||||||
|
Name 137 "l"
|
||||||
|
Name 142 "a"
|
||||||
|
Name 146 "md1"
|
||||||
|
Name 156 "Y"
|
||||||
|
Name 157 "Z"
|
||||||
|
Name 161 "muC2"
|
||||||
|
Name 169 "miC2"
|
||||||
|
Name 176 "tempArg"
|
||||||
|
Name 182 "tempArg"
|
||||||
|
Name 188 "p1"
|
||||||
|
Name 189 "param"
|
||||||
|
Name 192 "p2"
|
||||||
|
Name 193 "param"
|
||||||
|
Name 207 "tempArg"
|
||||||
|
Name 212 "shmatrix"
|
||||||
|
Name 217 "ms"
|
||||||
|
Name 225 "miC"
|
||||||
|
Name 226 "muC"
|
||||||
|
Name 231 "iarr"
|
||||||
|
Name 236 "iarr2"
|
||||||
|
Name 241 "uarr"
|
||||||
|
Name 246 "uarr2"
|
||||||
|
Name 251 "S"
|
||||||
|
MemberName 251(S) 0 "a"
|
||||||
|
MemberName 251(S) 1 "b"
|
||||||
|
MemberName 251(S) 2 "c"
|
||||||
|
Name 256 "SC"
|
||||||
|
Name 261 "scm"
|
||||||
|
Decorate 83 ArrayStride 4
|
||||||
|
Decorate 84 ArrayStride 4
|
||||||
|
MemberDecorate 85(Block) 0 Offset 0
|
||||||
|
MemberDecorate 85(Block) 1 Offset 4194304
|
||||||
|
Decorate 85(Block) Block
|
||||||
|
Decorate 87(block) DescriptorSet 0
|
||||||
|
Decorate 87(block) Binding 0
|
||||||
|
Decorate 99 ArrayStride 1
|
||||||
|
Decorate 101 ArrayStride 1
|
||||||
|
MemberDecorate 103(Block16) 0 Offset 0
|
||||||
|
MemberDecorate 103(Block16) 1 Offset 1048576
|
||||||
|
MemberDecorate 103(Block16) 2 Offset 1048584
|
||||||
|
Decorate 103(Block16) Block
|
||||||
|
Decorate 104 ArrayStride 4
|
||||||
|
Decorate 105 ArrayStride 4
|
||||||
|
MemberDecorate 106(Block) 0 Offset 0
|
||||||
|
MemberDecorate 106(Block) 1 Offset 4194304
|
||||||
|
Decorate 106(Block) Block
|
||||||
|
Decorate 108(block8) DescriptorSet 0
|
||||||
|
Decorate 108(block8) Binding 0
|
||||||
|
Decorate 156(Y) SpecId 0
|
||||||
|
Decorate 223 BuiltIn WorkgroupSize
|
||||||
|
Decorate 256(SC) SpecId 2
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeInt 8 1
|
||||||
|
7: TypeInt 32 0
|
||||||
|
8: 7(int) Constant 3
|
||||||
|
9: 7(int) Constant 8
|
||||||
|
10: TypeCooperativeMatrixNV 6(int8_t) 8 9 9
|
||||||
|
11: TypePointer Function 10
|
||||||
|
12: TypeFunction 10 11(ptr)
|
||||||
|
16: TypeInt 8 0
|
||||||
|
17: TypeCooperativeMatrixNV 16(int8_t) 8 9 9
|
||||||
|
18: TypePointer Function 17
|
||||||
|
19: TypeFunction 17 18(ptr)
|
||||||
|
28: 16(int8_t) Constant 2
|
||||||
|
32: 7(int) Constant 16
|
||||||
|
33: TypeCooperativeMatrixNV 16(int8_t) 8 32 9
|
||||||
|
34: TypePointer Function 33
|
||||||
|
36: 33 ConstantComposite 28
|
||||||
|
37: TypeCooperativeMatrixNV 6(int8_t) 8 32 9
|
||||||
|
38: TypePointer Function 37
|
||||||
|
40: 6(int8_t) Constant 2
|
||||||
|
41: 37 ConstantComposite 40
|
||||||
|
52: TypeFloat 16
|
||||||
|
53: TypeCooperativeMatrixNV 52(float16_t) 8 32 9
|
||||||
|
54: TypePointer Function 53
|
||||||
|
58: TypeFloat 32
|
||||||
|
59: TypeCooperativeMatrixNV 58(float) 8 32 9
|
||||||
|
60: TypePointer Function 59
|
||||||
|
70: TypePointer Function 16(int8_t)
|
||||||
|
72: TypeInt 32 1
|
||||||
|
73: 72(int) Constant 1
|
||||||
|
76: 72(int) Constant 0
|
||||||
|
79: TypePointer Function 6(int8_t)
|
||||||
|
82: 7(int) Constant 1048576
|
||||||
|
83: TypeArray 7(int) 82
|
||||||
|
84: TypeRuntimeArray 7(int)
|
||||||
|
85(Block): TypeStruct 83 84
|
||||||
|
86: TypePointer StorageBuffer 85(Block)
|
||||||
|
87(block): 86(ptr) Variable StorageBuffer
|
||||||
|
88: 7(int) Constant 5
|
||||||
|
89: TypePointer StorageBuffer 7(int)
|
||||||
|
91: 7(int) Constant 128
|
||||||
|
92: TypeBool
|
||||||
|
93: 92(bool) ConstantFalse
|
||||||
|
99: TypeArray 6(int8_t) 82
|
||||||
|
100: 7(int) Constant 1
|
||||||
|
101: TypeArray 6(int8_t) 100
|
||||||
|
TypeForwardPointer 102 PhysicalStorageBufferEXT
|
||||||
|
103(Block16): TypeStruct 99 101 102
|
||||||
|
104: TypeArray 7(int) 82
|
||||||
|
105: TypeRuntimeArray 7(int)
|
||||||
|
106(Block): TypeStruct 104 105
|
||||||
|
102: TypePointer PhysicalStorageBufferEXT 106(Block)
|
||||||
|
107: TypePointer StorageBuffer 103(Block16)
|
||||||
|
108(block8): 107(ptr) Variable StorageBuffer
|
||||||
|
109: TypePointer StorageBuffer 6(int8_t)
|
||||||
|
116: 72(int) Constant 2
|
||||||
|
117: TypePointer StorageBuffer 102(ptr)
|
||||||
|
120: TypePointer PhysicalStorageBufferEXT 7(int)
|
||||||
|
136: TypePointer Function 72(int)
|
||||||
|
138: 7(int) SpecConstantOp 5362 33
|
||||||
|
139: 72(int) SpecConstantOp 128 138 76
|
||||||
|
140: TypeArray 37 88
|
||||||
|
141: TypePointer Function 140
|
||||||
|
143: 72(int) Constant 3
|
||||||
|
144: 6(int8_t) Constant 1
|
||||||
|
150: 72(int) Constant 1234
|
||||||
|
155: 72(int) Constant 8
|
||||||
|
156(Y): 72(int) SpecConstant 2
|
||||||
|
157(Z): 72(int) SpecConstantOp 132 155 156(Y)
|
||||||
|
158: TypeCooperativeMatrixNV 16(int8_t) 8 157(Z) 9
|
||||||
|
159: TypeArray 158 8
|
||||||
|
160: TypePointer Private 159
|
||||||
|
161(muC2): 160(ptr) Variable Private
|
||||||
|
162: TypePointer Private 158
|
||||||
|
166: TypeCooperativeMatrixNV 6(int8_t) 8 157(Z) 9
|
||||||
|
167: TypeArray 166 8
|
||||||
|
168: TypePointer Private 167
|
||||||
|
169(miC2): 168(ptr) Variable Private
|
||||||
|
170: TypePointer Private 6(int8_t)
|
||||||
|
174: TypePointer Private 16(int8_t)
|
||||||
|
204: 16(int8_t) Constant 4
|
||||||
|
208: TypeVector 7(int) 4
|
||||||
|
209: 7(int) Constant 32
|
||||||
|
210: TypeArray 208(ivec4) 209
|
||||||
|
211: TypePointer Workgroup 210
|
||||||
|
212(shmatrix): 211(ptr) Variable Workgroup
|
||||||
|
213: 7(int) Constant 2
|
||||||
|
214: TypePointer Workgroup 208(ivec4)
|
||||||
|
221: TypeVector 7(int) 3
|
||||||
|
222: 7(int) Constant 64
|
||||||
|
223: 221(ivec3) ConstantComposite 222 100 100
|
||||||
|
224: TypePointer Private 166
|
||||||
|
225(miC): 224(ptr) Variable Private
|
||||||
|
226(muC): 162(ptr) Variable Private
|
||||||
|
227: 7(int) SpecConstantOp 5362 166
|
||||||
|
228: 72(int) SpecConstantOp 128 227 76
|
||||||
|
229: TypeArray 72(int) 228
|
||||||
|
230: TypePointer Private 229
|
||||||
|
231(iarr): 230(ptr) Variable Private
|
||||||
|
232: 7(int) SpecConstantOp 5362 166
|
||||||
|
233: 72(int) SpecConstantOp 128 232 76
|
||||||
|
234: TypeArray 72(int) 233
|
||||||
|
235: TypePointer Private 234
|
||||||
|
236(iarr2): 235(ptr) Variable Private
|
||||||
|
237: 7(int) SpecConstantOp 5362 158
|
||||||
|
238: 72(int) SpecConstantOp 128 237 76
|
||||||
|
239: TypeArray 72(int) 238
|
||||||
|
240: TypePointer Private 239
|
||||||
|
241(uarr): 240(ptr) Variable Private
|
||||||
|
242: 7(int) SpecConstantOp 5362 158
|
||||||
|
243: 72(int) SpecConstantOp 128 242 76
|
||||||
|
244: TypeArray 72(int) 243
|
||||||
|
245: TypePointer Private 244
|
||||||
|
246(uarr2): 245(ptr) Variable Private
|
||||||
|
247: TypeCooperativeMatrixNV 72(int) 8 157(Z) 9
|
||||||
|
248: 247 ConstantComposite 73
|
||||||
|
249: 16(int8_t) Constant 1
|
||||||
|
250: 17 ConstantComposite 249
|
||||||
|
251(S): TypeStruct 72(int) 72(int) 72(int)
|
||||||
|
252: 72(int) Constant 12
|
||||||
|
253: 72(int) Constant 23
|
||||||
|
254: 72(int) Constant 34
|
||||||
|
255: 251(S) ConstantComposite 252 253 254
|
||||||
|
256(SC): 72(int) SpecConstant 1
|
||||||
|
257: TypeCooperativeMatrixNV 7(int) 8 256(SC) 256(SC)
|
||||||
|
258: TypeArray 257 256(SC)
|
||||||
|
259: TypeArray 258 256(SC)
|
||||||
|
260: TypePointer Private 259
|
||||||
|
261(scm): 260(ptr) Variable Private
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
35(mu): 34(ptr) Variable Function
|
||||||
|
39(mi): 38(ptr) Variable Function
|
||||||
|
55(mf16_0): 54(ptr) Variable Function
|
||||||
|
61(mf32_0): 60(ptr) Variable Function
|
||||||
|
64(mf16_1): 54(ptr) Variable Function
|
||||||
|
67(mf32_1): 60(ptr) Variable Function
|
||||||
|
71(x): 70(ptr) Variable Function
|
||||||
|
81(tempArg): 38(ptr) Variable Function
|
||||||
|
98(tempArg): 34(ptr) Variable Function
|
||||||
|
115(tempArg): 38(ptr) Variable Function
|
||||||
|
128(D): 34(ptr) Variable Function
|
||||||
|
129(A): 34(ptr) Variable Function
|
||||||
|
131(B): 18(ptr) Variable Function
|
||||||
|
133(C): 34(ptr) Variable Function
|
||||||
|
137(l): 136(ptr) Variable Function
|
||||||
|
142(a): 141(ptr) Variable Function
|
||||||
|
146(md1): 136(ptr) Variable Function
|
||||||
|
176(tempArg): 38(ptr) Variable Function
|
||||||
|
182(tempArg): 34(ptr) Variable Function
|
||||||
|
188(p1): 11(ptr) Variable Function
|
||||||
|
189(param): 11(ptr) Variable Function
|
||||||
|
192(p2): 18(ptr) Variable Function
|
||||||
|
193(param): 18(ptr) Variable Function
|
||||||
|
207(tempArg): 38(ptr) Variable Function
|
||||||
|
217(ms): 38(ptr) Variable Function
|
||||||
|
Store 35(mu) 36
|
||||||
|
Store 39(mi) 41
|
||||||
|
42: 33 Load 35(mu)
|
||||||
|
43: 33 Load 35(mu)
|
||||||
|
44: 33 IAdd 42 43
|
||||||
|
Store 35(mu) 44
|
||||||
|
45: 33 Load 35(mu)
|
||||||
|
46: 33 Load 35(mu)
|
||||||
|
47: 33 ISub 45 46
|
||||||
|
Store 35(mu) 47
|
||||||
|
48: 37 Load 39(mi)
|
||||||
|
49: 37 SNegate 48
|
||||||
|
Store 39(mi) 49
|
||||||
|
50: 37 Load 39(mi)
|
||||||
|
51: 37 MatrixTimesScalar 50 40
|
||||||
|
Store 39(mi) 51
|
||||||
|
56: 33 Load 35(mu)
|
||||||
|
57: 53 ConvertUToF 56
|
||||||
|
Store 55(mf16_0) 57
|
||||||
|
62: 33 Load 35(mu)
|
||||||
|
63: 59 ConvertUToF 62
|
||||||
|
Store 61(mf32_0) 63
|
||||||
|
65: 37 Load 39(mi)
|
||||||
|
66: 53 ConvertSToF 65
|
||||||
|
Store 64(mf16_1) 66
|
||||||
|
68: 37 Load 39(mi)
|
||||||
|
69: 59 ConvertSToF 68
|
||||||
|
Store 67(mf32_1) 69
|
||||||
|
74: 70(ptr) AccessChain 35(mu) 73
|
||||||
|
75: 16(int8_t) Load 74
|
||||||
|
Store 71(x) 75
|
||||||
|
77: 16(int8_t) Load 71(x)
|
||||||
|
78: 6(int8_t) Bitcast 77
|
||||||
|
80: 79(ptr) AccessChain 39(mi) 76
|
||||||
|
Store 80 78
|
||||||
|
90: 89(ptr) AccessChain 87(block) 73 32
|
||||||
|
94: 37 CooperativeMatrixLoadNV 90 91 93 MakePointerVisibleKHR NonPrivatePointerKHR 88
|
||||||
|
Store 81(tempArg) 94
|
||||||
|
95: 37 Load 81(tempArg)
|
||||||
|
Store 39(mi) 95
|
||||||
|
96: 37 Load 39(mi)
|
||||||
|
97: 89(ptr) AccessChain 87(block) 73 32
|
||||||
|
CooperativeMatrixStoreNV 97 96 91 93 MakePointerAvailableKHR NonPrivatePointerKHR 88
|
||||||
|
110: 109(ptr) AccessChain 108(block8) 73 32
|
||||||
|
111: 33 CooperativeMatrixLoadNV 110 91 93 MakePointerVisibleKHR NonPrivatePointerKHR 88
|
||||||
|
Store 98(tempArg) 111
|
||||||
|
112: 33 Load 98(tempArg)
|
||||||
|
Store 35(mu) 112
|
||||||
|
113: 33 Load 35(mu)
|
||||||
|
114: 109(ptr) AccessChain 108(block8) 73 32
|
||||||
|
CooperativeMatrixStoreNV 114 113 91 93 MakePointerAvailableKHR NonPrivatePointerKHR 88
|
||||||
|
118: 117(ptr) AccessChain 108(block8) 116
|
||||||
|
119: 102(ptr) Load 118 MakePointerVisibleKHR NonPrivatePointerKHR 88
|
||||||
|
121: 120(ptr) AccessChain 119 73 32
|
||||||
|
122: 37 CooperativeMatrixLoadNV 121 91 93 Aligned MakePointerVisibleKHR NonPrivatePointerKHR 16 88
|
||||||
|
Store 115(tempArg) 122
|
||||||
|
123: 37 Load 115(tempArg)
|
||||||
|
Store 39(mi) 123
|
||||||
|
124: 37 Load 39(mi)
|
||||||
|
125: 117(ptr) AccessChain 108(block8) 116
|
||||||
|
126: 102(ptr) Load 125 MakePointerVisibleKHR NonPrivatePointerKHR 88
|
||||||
|
127: 120(ptr) AccessChain 126 73 32
|
||||||
|
CooperativeMatrixStoreNV 127 124 91 93 Aligned MakePointerAvailableKHR NonPrivatePointerKHR 16 88
|
||||||
|
130: 33 Load 129(A)
|
||||||
|
132: 17 Load 131(B)
|
||||||
|
134: 33 Load 133(C)
|
||||||
|
135: 33 CooperativeMatrixMulAddNV 130 132 134
|
||||||
|
Store 128(D) 135
|
||||||
|
Store 137(l) 139
|
||||||
|
145: 79(ptr) AccessChain 142(a) 143 76
|
||||||
|
Store 145 144
|
||||||
|
Store 146(md1) 73
|
||||||
|
147: 37 Load 39(mi)
|
||||||
|
148: 37 Load 39(mi)
|
||||||
|
149: 37 IAdd 148 147
|
||||||
|
Store 39(mi) 149
|
||||||
|
151: 6(int8_t) CompositeExtract 149 1234
|
||||||
|
152: 72(int) SConvert 151
|
||||||
|
153: 72(int) Load 146(md1)
|
||||||
|
154: 72(int) IAdd 153 152
|
||||||
|
Store 146(md1) 154
|
||||||
|
163: 162(ptr) AccessChain 161(muC2) 73
|
||||||
|
164: 158 Load 163
|
||||||
|
165: 162(ptr) AccessChain 161(muC2) 76
|
||||||
|
Store 165 164
|
||||||
|
171: 170(ptr) AccessChain 169(miC2) 116 76
|
||||||
|
172: 6(int8_t) Load 171
|
||||||
|
173: 16(int8_t) Bitcast 172
|
||||||
|
175: 174(ptr) AccessChain 161(muC2) 73 76
|
||||||
|
Store 175 173
|
||||||
|
177: 89(ptr) AccessChain 87(block) 76 32
|
||||||
|
178: 37 CooperativeMatrixLoadNV 177 91 93 MakePointerVisibleKHR NonPrivatePointerKHR 88
|
||||||
|
Store 176(tempArg) 178
|
||||||
|
179: 37 Load 176(tempArg)
|
||||||
|
Store 39(mi) 179
|
||||||
|
180: 37 Load 39(mi)
|
||||||
|
181: 89(ptr) AccessChain 87(block) 76 32
|
||||||
|
CooperativeMatrixStoreNV 181 180 91 93 MakePointerAvailableKHR NonPrivatePointerKHR 88
|
||||||
|
183: 109(ptr) AccessChain 108(block8) 76 32
|
||||||
|
184: 33 CooperativeMatrixLoadNV 183 91 93 MakePointerVisibleKHR NonPrivatePointerKHR 88
|
||||||
|
Store 182(tempArg) 184
|
||||||
|
185: 33 Load 182(tempArg)
|
||||||
|
Store 35(mu) 185
|
||||||
|
186: 33 Load 35(mu)
|
||||||
|
187: 109(ptr) AccessChain 108(block8) 76 32
|
||||||
|
CooperativeMatrixStoreNV 187 186 91 93 MakePointerAvailableKHR NonPrivatePointerKHR 88
|
||||||
|
190: 10 Load 188(p1)
|
||||||
|
Store 189(param) 190
|
||||||
|
191: 10 FunctionCall 14(ineg(i81;) 189(param)
|
||||||
|
Store 188(p1) 191
|
||||||
|
194: 17 Load 192(p2)
|
||||||
|
Store 193(param) 194
|
||||||
|
195: 17 FunctionCall 21(umul(u81;) 193(param)
|
||||||
|
Store 192(p2) 195
|
||||||
|
196: 10 Load 188(p1)
|
||||||
|
197: 10 Load 188(p1)
|
||||||
|
198: 10 SDiv 197 196
|
||||||
|
Store 188(p1) 198
|
||||||
|
199: 17 Load 192(p2)
|
||||||
|
200: 17 Load 192(p2)
|
||||||
|
201: 17 UDiv 200 199
|
||||||
|
Store 192(p2) 201
|
||||||
|
202: 10 Load 188(p1)
|
||||||
|
203: 10 MatrixTimesScalar 202 40
|
||||||
|
Store 188(p1) 203
|
||||||
|
205: 17 Load 192(p2)
|
||||||
|
206: 17 MatrixTimesScalar 205 204
|
||||||
|
Store 192(p2) 206
|
||||||
|
215: 214(ptr) AccessChain 212(shmatrix) 100
|
||||||
|
216: 37 CooperativeMatrixLoadNV 215 213 93 MakePointerVisibleKHR NonPrivatePointerKHR 213
|
||||||
|
Store 207(tempArg) 216
|
||||||
|
218: 37 Load 207(tempArg)
|
||||||
|
Store 217(ms) 218
|
||||||
|
219: 37 Load 217(ms)
|
||||||
|
220: 214(ptr) AccessChain 212(shmatrix) 100
|
||||||
|
CooperativeMatrixStoreNV 220 219 213 93 MakePointerAvailableKHR NonPrivatePointerKHR 213
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
|
14(ineg(i81;): 10 Function None 12
|
||||||
|
13(m): 11(ptr) FunctionParameter
|
||||||
|
15: Label
|
||||||
|
23: 10 Load 13(m)
|
||||||
|
24: 10 SNegate 23
|
||||||
|
ReturnValue 24
|
||||||
|
FunctionEnd
|
||||||
|
21(umul(u81;): 17 Function None 19
|
||||||
|
20(m): 18(ptr) FunctionParameter
|
||||||
|
22: Label
|
||||||
|
27: 17 Load 20(m)
|
||||||
|
29: 17 MatrixTimesScalar 27 28
|
||||||
|
ReturnValue 29
|
||||||
|
FunctionEnd
|
||||||
117
Test/spv.intcoopmat.comp
Normal file
117
Test/spv.intcoopmat.comp
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
#version 450 core
|
||||||
|
#extension GL_KHR_memory_scope_semantics : enable
|
||||||
|
#extension GL_NV_cooperative_matrix : enable
|
||||||
|
#extension GL_NV_integer_cooperative_matrix : enable
|
||||||
|
#extension GL_EXT_shader_explicit_arithmetic_types : enable
|
||||||
|
#extension GL_EXT_buffer_reference : enable
|
||||||
|
|
||||||
|
layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
|
||||||
|
|
||||||
|
const int X = 8;
|
||||||
|
layout(constant_id = 0) const int Y = 2;
|
||||||
|
const int Z = X*Y;
|
||||||
|
|
||||||
|
icoopmatNV<8, gl_ScopeSubgroup, Z, 8> miC;
|
||||||
|
icoopmatNV<8, gl_ScopeSubgroup, Z, 8> miC2[3];
|
||||||
|
ucoopmatNV<8, gl_ScopeSubgroup, Z, 8> muC;
|
||||||
|
ucoopmatNV<8, gl_ScopeSubgroup, Z, 8> muC2[3];
|
||||||
|
|
||||||
|
int iarr[miC.length()];
|
||||||
|
int iarr2[miC2[1].length()];
|
||||||
|
int uarr[muC.length()];
|
||||||
|
int uarr2[muC2[1].length()];
|
||||||
|
|
||||||
|
const icoopmatNV<32, gl_ScopeSubgroup, Z, 8> mD = icoopmatNV<32, gl_ScopeSubgroup, Z, 8>(1);
|
||||||
|
const ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> mD2 = ucoopmatNV<8, gl_ScopeSubgroup, 8, 8>(1);
|
||||||
|
|
||||||
|
struct S { int a; int b; int c; };
|
||||||
|
|
||||||
|
const S s = S(12, 23, 34);
|
||||||
|
|
||||||
|
layout(set = 0, binding = 0, buffer_reference) coherent buffer Block {
|
||||||
|
uint y[1024*1024];
|
||||||
|
uint x[];
|
||||||
|
} block;
|
||||||
|
|
||||||
|
layout(set = 0, binding = 0) coherent buffer Block16 {
|
||||||
|
int8_t y[1024*1024];
|
||||||
|
int8_t x[];
|
||||||
|
|
||||||
|
Block b;
|
||||||
|
} block8;
|
||||||
|
|
||||||
|
icoopmatNV<8, gl_ScopeSubgroup, 8, 8> ineg(icoopmatNV<8, gl_ScopeSubgroup, 8, 8> m) { return -m; }
|
||||||
|
ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> umul(ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> m) { return m * uint8_t(2); }
|
||||||
|
|
||||||
|
layout(constant_id = 2) const int SC = 1;
|
||||||
|
ucoopmatNV<32, gl_ScopeSubgroup, SC, SC> scm[SC][SC];
|
||||||
|
|
||||||
|
// sized for icoopmatNV<8, gl_ScopeSubgroup, 16, 16>
|
||||||
|
shared uvec4 shmatrix[16*16*2/16];
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
ucoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)> mu = ucoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)>(2);
|
||||||
|
icoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)> mi = icoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)>(2);
|
||||||
|
|
||||||
|
mu = mu + mu;
|
||||||
|
mu = mu - mu;
|
||||||
|
mi = -mi;
|
||||||
|
mi = mi * int8_t(2);
|
||||||
|
|
||||||
|
fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> mf16_0 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(mu);
|
||||||
|
fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> mf32_0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(mu);
|
||||||
|
fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> mf16_1 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(mi);
|
||||||
|
fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> mf32_1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(mi);
|
||||||
|
|
||||||
|
uint8_t x = mu[1];
|
||||||
|
mi[0] = int8_t(x);
|
||||||
|
|
||||||
|
coopMatLoadNV(mi, block.x, 16, 128, false);
|
||||||
|
coopMatStoreNV(mi, block.x, 16, 128, false);
|
||||||
|
coopMatLoadNV(mu, block8.x, 16, 128, false);
|
||||||
|
coopMatStoreNV(mu, block8.x, 16, 128, false);
|
||||||
|
coopMatLoadNV(mi, block8.b.x, 16, 128, false);
|
||||||
|
coopMatStoreNV(mi, block8.b.x, 16, 128, false);
|
||||||
|
|
||||||
|
ucoopmatNV<8, gl_ScopeSubgroup, 16, 8> A;
|
||||||
|
ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> B;
|
||||||
|
ucoopmatNV<8, gl_ScopeSubgroup, 16, 8> C;
|
||||||
|
ucoopmatNV<8, gl_ScopeSubgroup, 16, 8> D;
|
||||||
|
D = coopMatMulAddNV(A, B, C);
|
||||||
|
|
||||||
|
int l = D.length();
|
||||||
|
|
||||||
|
|
||||||
|
icoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)> a[5];
|
||||||
|
a[3][0] = int8_t(1);
|
||||||
|
|
||||||
|
int md1 = mD[1];
|
||||||
|
|
||||||
|
md1 += (mi += mi)[1234];
|
||||||
|
|
||||||
|
muC2[0] = muC2[1];
|
||||||
|
muC2[1][0] = (miC2[2][0]);
|
||||||
|
|
||||||
|
coopMatLoadNV(mi, block.y, 16, 128, false);
|
||||||
|
coopMatStoreNV(mi, block.y, 16, 128, false);
|
||||||
|
coopMatLoadNV(mu, block8.y, 16, 128, false);
|
||||||
|
coopMatStoreNV(mu, block8.y, 16, 128, false);
|
||||||
|
|
||||||
|
icoopmatNV<8, gl_ScopeSubgroup, 8, 8> p1;
|
||||||
|
ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> p2;
|
||||||
|
|
||||||
|
p1 = ineg(p1);
|
||||||
|
p2 = umul(p2);
|
||||||
|
|
||||||
|
p1 /= p1;
|
||||||
|
p2 /= p2;
|
||||||
|
|
||||||
|
p1 *= int8_t(2);
|
||||||
|
p2 *= uint8_t(4);
|
||||||
|
|
||||||
|
icoopmatNV<8, gl_ScopeSubgroup, 16, 8> ms;
|
||||||
|
coopMatLoadNV(ms, shmatrix, 1, 2, false);
|
||||||
|
coopMatStoreNV(ms, shmatrix, 1, 2, false);
|
||||||
|
|
||||||
|
}
|
||||||
@ -1433,11 +1433,18 @@ public:
|
|||||||
}
|
}
|
||||||
typeName = NewPoolTString(p.userDef->getTypeName().c_str());
|
typeName = NewPoolTString(p.userDef->getTypeName().c_str());
|
||||||
}
|
}
|
||||||
if (p.isCoopmat() && p.basicType == EbtFloat &&
|
if (p.isCoopmat() && p.typeParameters && p.typeParameters->getNumDims() > 0) {
|
||||||
p.typeParameters && p.typeParameters->getNumDims() > 0 &&
|
int numBits = p.typeParameters->getDimSize(0);
|
||||||
p.typeParameters->getDimSize(0) == 16) {
|
if (p.basicType == EbtFloat && numBits == 16) {
|
||||||
basicType = EbtFloat16;
|
basicType = EbtFloat16;
|
||||||
qualifier.precision = EpqNone;
|
qualifier.precision = EpqNone;
|
||||||
|
} else if (p.basicType == EbtUint && numBits == 8) {
|
||||||
|
basicType = EbtUint8;
|
||||||
|
qualifier.precision = EpqNone;
|
||||||
|
} else if (p.basicType == EbtInt && numBits == 8) {
|
||||||
|
basicType = EbtInt8;
|
||||||
|
qualifier.precision = EpqNone;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// for construction of sampler types
|
// for construction of sampler types
|
||||||
@ -2301,10 +2308,24 @@ public:
|
|||||||
// an OK function parameter
|
// an OK function parameter
|
||||||
bool coopMatParameterOK(const TType& right) const
|
bool coopMatParameterOK(const TType& right) const
|
||||||
{
|
{
|
||||||
return isCoopMat() && right.isCoopMat() &&
|
return isCoopMat() && right.isCoopMat() && (getBasicType() == right.getBasicType()) &&
|
||||||
typeParameters == nullptr && right.typeParameters != nullptr;
|
typeParameters == nullptr && right.typeParameters != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool sameCoopMatBaseType(const TType &right) const {
|
||||||
|
bool rv = coopmat && right.coopmat;
|
||||||
|
if (getBasicType() == EbtFloat || getBasicType() == EbtFloat16)
|
||||||
|
rv = right.getBasicType() == EbtFloat || right.getBasicType() == EbtFloat16;
|
||||||
|
else if (getBasicType() == EbtUint || getBasicType() == EbtUint8)
|
||||||
|
rv = right.getBasicType() == EbtUint || right.getBasicType() == EbtUint8;
|
||||||
|
else if (getBasicType() == EbtInt || getBasicType() == EbtInt8)
|
||||||
|
rv = right.getBasicType() == EbtInt || right.getBasicType() == EbtInt8;
|
||||||
|
else
|
||||||
|
rv = false;
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// See if two types match in all ways (just the actual type, not qualification)
|
// See if two types match in all ways (just the actual type, not qualification)
|
||||||
bool operator==(const TType& right) const
|
bool operator==(const TType& right) const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4797,6 +4797,60 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||||||
"void coopMatStoreNV(fcoopmatNV m, volatile coherent uvec4[] buf, uint element, uint stride, bool colMajor);\n"
|
"void coopMatStoreNV(fcoopmatNV m, volatile coherent uvec4[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
|
||||||
"fcoopmatNV coopMatMulAddNV(fcoopmatNV A, fcoopmatNV B, fcoopmatNV C);\n"
|
"fcoopmatNV coopMatMulAddNV(fcoopmatNV A, fcoopmatNV B, fcoopmatNV C);\n"
|
||||||
|
"void coopMatLoadNV(out icoopmatNV m, volatile coherent int8_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out icoopmatNV m, volatile coherent int16_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out icoopmatNV m, volatile coherent int[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out icoopmatNV m, volatile coherent int64_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out icoopmatNV m, volatile coherent ivec2[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out icoopmatNV m, volatile coherent ivec4[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out icoopmatNV m, volatile coherent uint8_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out icoopmatNV m, volatile coherent uint16_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out icoopmatNV m, volatile coherent uint[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out icoopmatNV m, volatile coherent uint64_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out icoopmatNV m, volatile coherent uvec2[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out icoopmatNV m, volatile coherent uvec4[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
|
||||||
|
"void coopMatLoadNV(out ucoopmatNV m, volatile coherent int8_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out ucoopmatNV m, volatile coherent int16_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out ucoopmatNV m, volatile coherent int[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out ucoopmatNV m, volatile coherent int64_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out ucoopmatNV m, volatile coherent ivec2[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out ucoopmatNV m, volatile coherent ivec4[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out ucoopmatNV m, volatile coherent uint8_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out ucoopmatNV m, volatile coherent uint16_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out ucoopmatNV m, volatile coherent uint[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out ucoopmatNV m, volatile coherent uint64_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out ucoopmatNV m, volatile coherent uvec2[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatLoadNV(out ucoopmatNV m, volatile coherent uvec4[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
|
||||||
|
"void coopMatStoreNV(icoopmatNV m, volatile coherent int8_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(icoopmatNV m, volatile coherent int16_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(icoopmatNV m, volatile coherent int[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(icoopmatNV m, volatile coherent int64_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(icoopmatNV m, volatile coherent ivec2[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(icoopmatNV m, volatile coherent ivec4[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(icoopmatNV m, volatile coherent uint8_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(icoopmatNV m, volatile coherent uint16_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(icoopmatNV m, volatile coherent uint[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(icoopmatNV m, volatile coherent uint64_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(icoopmatNV m, volatile coherent uvec2[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(icoopmatNV m, volatile coherent uvec4[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
|
||||||
|
"void coopMatStoreNV(ucoopmatNV m, volatile coherent int8_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(ucoopmatNV m, volatile coherent int16_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(ucoopmatNV m, volatile coherent int[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(ucoopmatNV m, volatile coherent int64_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(ucoopmatNV m, volatile coherent ivec2[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(ucoopmatNV m, volatile coherent ivec4[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(ucoopmatNV m, volatile coherent uint8_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(ucoopmatNV m, volatile coherent uint16_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(ucoopmatNV m, volatile coherent uint[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(ucoopmatNV m, volatile coherent uint64_t[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(ucoopmatNV m, volatile coherent uvec2[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
"void coopMatStoreNV(ucoopmatNV m, volatile coherent uvec4[] buf, uint element, uint stride, bool colMajor);\n"
|
||||||
|
|
||||||
|
"icoopmatNV coopMatMulAddNV(icoopmatNV A, icoopmatNV B, icoopmatNV C);\n"
|
||||||
|
"ucoopmatNV coopMatMulAddNV(ucoopmatNV A, ucoopmatNV B, ucoopmatNV C);\n"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8527,9 +8581,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||||||
symbolTable.setFunctionExtensions("subgroupMemoryBarrierShared", 1, &E_GL_KHR_shader_subgroup_basic);
|
symbolTable.setFunctionExtensions("subgroupMemoryBarrierShared", 1, &E_GL_KHR_shader_subgroup_basic);
|
||||||
}
|
}
|
||||||
|
|
||||||
symbolTable.setFunctionExtensions("coopMatLoadNV", 1, &E_GL_NV_cooperative_matrix);
|
{
|
||||||
symbolTable.setFunctionExtensions("coopMatStoreNV", 1, &E_GL_NV_cooperative_matrix);
|
const char *coopExt[2] = { E_GL_NV_cooperative_matrix, E_GL_NV_integer_cooperative_matrix };
|
||||||
symbolTable.setFunctionExtensions("coopMatMulAddNV", 1, &E_GL_NV_cooperative_matrix);
|
symbolTable.setFunctionExtensions("coopMatLoadNV", 2, coopExt);
|
||||||
|
symbolTable.setFunctionExtensions("coopMatStoreNV", 2, coopExt);
|
||||||
|
symbolTable.setFunctionExtensions("coopMatMulAddNV", 2, coopExt);
|
||||||
|
}
|
||||||
|
|
||||||
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
||||||
symbolTable.setFunctionExtensions("dFdx", 1, &E_GL_NV_compute_shader_derivatives);
|
symbolTable.setFunctionExtensions("dFdx", 1, &E_GL_NV_compute_shader_derivatives);
|
||||||
|
|||||||
@ -6192,6 +6192,8 @@ const TFunction* TParseContext::findFunction400(const TSourceLoc& loc, const TFu
|
|||||||
}
|
}
|
||||||
if (from.isArray() || to.isArray() || ! from.sameElementShape(to))
|
if (from.isArray() || to.isArray() || ! from.sameElementShape(to))
|
||||||
return false;
|
return false;
|
||||||
|
if (from.isCoopMat() && to.isCoopMat())
|
||||||
|
return from.sameCoopMatBaseType(to);
|
||||||
return intermediate.canImplicitlyPromote(from.getBasicType(), to.getBasicType());
|
return intermediate.canImplicitlyPromote(from.getBasicType(), to.getBasicType());
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -6266,6 +6268,8 @@ const TFunction* TParseContext::findFunctionExplicitTypes(const TSourceLoc& loc,
|
|||||||
}
|
}
|
||||||
if (from.isArray() || to.isArray() || ! from.sameElementShape(to))
|
if (from.isArray() || to.isArray() || ! from.sameElementShape(to))
|
||||||
return false;
|
return false;
|
||||||
|
if (from.isCoopMat() && to.isCoopMat())
|
||||||
|
return from.sameCoopMatBaseType(to);
|
||||||
return intermediate.canImplicitlyPromote(from.getBasicType(), to.getBasicType());
|
return intermediate.canImplicitlyPromote(from.getBasicType(), to.getBasicType());
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -6365,12 +6369,20 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
|
|||||||
if (!publicType.typeParameters || publicType.typeParameters->getNumDims() != 4) {
|
if (!publicType.typeParameters || publicType.typeParameters->getNumDims() != 4) {
|
||||||
error(loc, "expected four type parameters", identifier.c_str(), "");
|
error(loc, "expected four type parameters", identifier.c_str(), "");
|
||||||
}
|
}
|
||||||
if (publicType.typeParameters &&
|
if (publicType.typeParameters) {
|
||||||
publicType.typeParameters->getDimSize(0) != 16 &&
|
if (isTypeFloat(publicType.basicType) &&
|
||||||
publicType.typeParameters->getDimSize(0) != 32 &&
|
publicType.typeParameters->getDimSize(0) != 16 &&
|
||||||
publicType.typeParameters->getDimSize(0) != 64) {
|
publicType.typeParameters->getDimSize(0) != 32 &&
|
||||||
error(loc, "expected 16, 32, or 64 bits for first type parameter", identifier.c_str(), "");
|
publicType.typeParameters->getDimSize(0) != 64) {
|
||||||
|
error(loc, "expected 16, 32, or 64 bits for first type parameter", identifier.c_str(), "");
|
||||||
|
}
|
||||||
|
if (isTypeInt(publicType.basicType) &&
|
||||||
|
publicType.typeParameters->getDimSize(0) != 8 &&
|
||||||
|
publicType.typeParameters->getDimSize(0) != 32) {
|
||||||
|
error(loc, "expected 8 or 32 bits for first type parameter", identifier.c_str(), "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (publicType.typeParameters && publicType.typeParameters->getNumDims() != 0) {
|
if (publicType.typeParameters && publicType.typeParameters->getNumDims() != 0) {
|
||||||
error(loc, "unexpected type parameters", identifier.c_str(), "");
|
error(loc, "unexpected type parameters", identifier.c_str(), "");
|
||||||
@ -7065,19 +7077,90 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
|||||||
}
|
}
|
||||||
node = intermediate.setAggregateOperator(node, EOpConstructCooperativeMatrix, type, node->getLoc());
|
node = intermediate.setAggregateOperator(node, EOpConstructCooperativeMatrix, type, node->getLoc());
|
||||||
} else {
|
} else {
|
||||||
|
TOperator op;
|
||||||
switch (type.getBasicType()) {
|
switch (type.getBasicType()) {
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
break;
|
break;
|
||||||
|
case EbtInt:
|
||||||
|
{
|
||||||
|
switch (node->getType().getBasicType()) {
|
||||||
|
case EbtFloat: op = EOpConvFloatToInt; break;
|
||||||
|
case EbtFloat16: op = EOpConvFloat16ToInt; break;
|
||||||
|
case EbtUint8: op = EOpConvUint8ToInt; break;
|
||||||
|
case EbtInt8: op = EOpConvInt8ToInt; break;
|
||||||
|
case EbtUint: op = EOpConvUintToInt; break;
|
||||||
|
default: assert(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case EbtUint:
|
||||||
|
{
|
||||||
|
switch (node->getType().getBasicType()) {
|
||||||
|
case EbtFloat: op = EOpConvFloatToUint; break;
|
||||||
|
case EbtFloat16: op = EOpConvFloat16ToUint; break;
|
||||||
|
case EbtUint8: op = EOpConvUint8ToUint; break;
|
||||||
|
case EbtInt8: op = EOpConvInt8ToUint; break;
|
||||||
|
case EbtInt: op = EOpConvIntToUint; break;
|
||||||
|
case EbtUint: op = EOpConvUintToInt8; break;
|
||||||
|
default: assert(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case EbtInt8:
|
||||||
|
{
|
||||||
|
switch (node->getType().getBasicType()) {
|
||||||
|
case EbtFloat: op = EOpConvFloatToInt8; break;
|
||||||
|
case EbtFloat16: op = EOpConvFloat16ToInt8; break;
|
||||||
|
case EbtUint8: op = EOpConvUint8ToInt8; break;
|
||||||
|
case EbtInt: op = EOpConvIntToInt8; break;
|
||||||
|
case EbtUint: op = EOpConvUintToInt8; break;
|
||||||
|
default: assert(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case EbtUint8: {
|
||||||
|
switch (node->getType().getBasicType()) {
|
||||||
|
case EbtFloat: op = EOpConvFloatToUint8; break;
|
||||||
|
case EbtFloat16: op = EOpConvFloat16ToUint8; break;
|
||||||
|
case EbtInt8: op = EOpConvInt8ToUint8; break;
|
||||||
|
case EbtInt: op = EOpConvIntToUint8; break;
|
||||||
|
case EbtUint: op = EOpConvUintToUint8; break;
|
||||||
|
default: assert(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case EbtFloat:
|
case EbtFloat:
|
||||||
assert(node->getType().getBasicType() == EbtFloat16);
|
{
|
||||||
node = intermediate.addUnaryNode(EOpConvFloat16ToFloat, node, node->getLoc(), type);
|
switch (node->getType().getBasicType()) {
|
||||||
|
case EbtFloat16: op = EOpConvFloat16ToFloat; break;
|
||||||
|
case EbtInt8: op = EOpConvInt8ToFloat; break;
|
||||||
|
case EbtUint8: op = EOpConvUint8ToFloat; break;
|
||||||
|
case EbtInt: op = EOpConvIntToFloat; break;
|
||||||
|
case EbtUint: op = EOpConvUintToFloat; break;
|
||||||
|
default: assert(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case EbtFloat16:
|
case EbtFloat16:
|
||||||
assert(node->getType().getBasicType() == EbtFloat);
|
{
|
||||||
node = intermediate.addUnaryNode(EOpConvFloatToFloat16, node, node->getLoc(), type);
|
switch (node->getType().getBasicType()) {
|
||||||
|
case EbtFloat: op = EOpConvFloatToFloat16; break;
|
||||||
|
case EbtInt8: op = EOpConvInt8ToFloat16; break;
|
||||||
|
case EbtUint8: op = EOpConvUint8ToFloat16; break;
|
||||||
|
case EbtInt: op = EOpConvIntToFloat16; break;
|
||||||
|
case EbtUint: op = EOpConvUintToFloat16; break;
|
||||||
|
default: assert(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
node = intermediate.addUnaryNode(op, node, node->getLoc(), type);
|
||||||
// If it's a (non-specialization) constant, it must be folded.
|
// If it's a (non-specialization) constant, it must be folded.
|
||||||
if (node->getAsUnaryNode()->getOperand()->getAsConstantUnion())
|
if (node->getAsUnaryNode()->getOperand()->getAsConstantUnion())
|
||||||
return node->getAsUnaryNode()->getOperand()->getAsConstantUnion()->fold(op, node->getType());
|
return node->getAsUnaryNode()->getOperand()->getAsConstantUnion()->fold(op, node->getType());
|
||||||
|
|||||||
@ -713,6 +713,8 @@ void TScanContext::fillInKeywordMap()
|
|||||||
(*KeywordMap)["taskNV"] = PERTASKNV;
|
(*KeywordMap)["taskNV"] = PERTASKNV;
|
||||||
|
|
||||||
(*KeywordMap)["fcoopmatNV"] = FCOOPMATNV;
|
(*KeywordMap)["fcoopmatNV"] = FCOOPMATNV;
|
||||||
|
(*KeywordMap)["icoopmatNV"] = ICOOPMATNV;
|
||||||
|
(*KeywordMap)["ucoopmatNV"] = UCOOPMATNV;
|
||||||
|
|
||||||
ReservedSet = new std::unordered_set<const char*, str_hash, str_eq>;
|
ReservedSet = new std::unordered_set<const char*, str_hash, str_eq>;
|
||||||
|
|
||||||
@ -1599,6 +1601,14 @@ int TScanContext::tokenizeIdentifier()
|
|||||||
return keyword;
|
return keyword;
|
||||||
return identifierOrType();
|
return identifierOrType();
|
||||||
|
|
||||||
|
case UCOOPMATNV:
|
||||||
|
case ICOOPMATNV:
|
||||||
|
afterType = true;
|
||||||
|
if (parseContext.symbolTable.atBuiltInLevel() ||
|
||||||
|
parseContext.extensionTurnedOn(E_GL_NV_integer_cooperative_matrix))
|
||||||
|
return keyword;
|
||||||
|
return identifierOrType();
|
||||||
|
|
||||||
case DEMOTE:
|
case DEMOTE:
|
||||||
if (parseContext.extensionTurnedOn(E_GL_EXT_demote_to_helper_invocation))
|
if (parseContext.extensionTurnedOn(E_GL_EXT_demote_to_helper_invocation))
|
||||||
return keyword;
|
return keyword;
|
||||||
|
|||||||
@ -252,6 +252,7 @@ void TParseVersions::initializeExtensionBehavior()
|
|||||||
|
|
||||||
extensionBehavior[E_GL_NV_cooperative_matrix] = EBhDisable;
|
extensionBehavior[E_GL_NV_cooperative_matrix] = EBhDisable;
|
||||||
extensionBehavior[E_GL_NV_shader_sm_builtins] = EBhDisable;
|
extensionBehavior[E_GL_NV_shader_sm_builtins] = EBhDisable;
|
||||||
|
extensionBehavior[E_GL_NV_integer_cooperative_matrix] = EBhDisable;
|
||||||
|
|
||||||
// AEP
|
// AEP
|
||||||
extensionBehavior[E_GL_ANDROID_extension_pack_es31a] = EBhDisable;
|
extensionBehavior[E_GL_ANDROID_extension_pack_es31a] = EBhDisable;
|
||||||
@ -436,6 +437,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||||||
"#define GL_NV_shader_texture_footprint 1\n"
|
"#define GL_NV_shader_texture_footprint 1\n"
|
||||||
"#define GL_NV_mesh_shader 1\n"
|
"#define GL_NV_mesh_shader 1\n"
|
||||||
"#define GL_NV_cooperative_matrix 1\n"
|
"#define GL_NV_cooperative_matrix 1\n"
|
||||||
|
"#define GL_NV_integer_cooperative_matrix 1\n"
|
||||||
|
|
||||||
"#define GL_EXT_shader_explicit_arithmetic_types 1\n"
|
"#define GL_EXT_shader_explicit_arithmetic_types 1\n"
|
||||||
"#define GL_EXT_shader_explicit_arithmetic_types_int8 1\n"
|
"#define GL_EXT_shader_explicit_arithmetic_types_int8 1\n"
|
||||||
@ -822,6 +824,8 @@ void TParseVersions::updateExtensionBehavior(int line, const char* extension, co
|
|||||||
updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString);
|
updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString);
|
||||||
else if (strcmp(extension, "GL_EXT_buffer_reference2") == 0)
|
else if (strcmp(extension, "GL_EXT_buffer_reference2") == 0)
|
||||||
updateExtensionBehavior(line, "GL_EXT_buffer_reference", behaviorString);
|
updateExtensionBehavior(line, "GL_EXT_buffer_reference", behaviorString);
|
||||||
|
else if (strcmp(extension, "GL_NV_integer_cooperative_matrix") == 0)
|
||||||
|
updateExtensionBehavior(line, "GL_NV_cooperative_matrix", behaviorString);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBehavior behavior)
|
void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBehavior behavior)
|
||||||
@ -1088,8 +1092,15 @@ void TParseVersions::fcoopmatCheck(const TSourceLoc& loc, const char* op, bool b
|
|||||||
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op);
|
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // GLSLANG_WEB
|
|
||||||
|
|
||||||
|
void TParseVersions::intcoopmatCheck(const TSourceLoc& loc, const char* op, bool builtIn)
|
||||||
|
{
|
||||||
|
if (!builtIn) {
|
||||||
|
const char* const extensions[] = {E_GL_NV_integer_cooperative_matrix};
|
||||||
|
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // GLSLANG_WEB
|
||||||
// Call for any operation removed because SPIR-V is in use.
|
// Call for any operation removed because SPIR-V is in use.
|
||||||
void TParseVersions::spvRemoved(const TSourceLoc& loc, const char* op)
|
void TParseVersions::spvRemoved(const TSourceLoc& loc, const char* op)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -227,6 +227,7 @@ const int Num_viewportEXTs = sizeof(viewportEXTs) / sizeof(viewportEXTs[0]);
|
|||||||
|
|
||||||
const char* const E_GL_NV_cooperative_matrix = "GL_NV_cooperative_matrix";
|
const char* const E_GL_NV_cooperative_matrix = "GL_NV_cooperative_matrix";
|
||||||
const char* const E_GL_NV_shader_sm_builtins = "GL_NV_shader_sm_builtins";
|
const char* const E_GL_NV_shader_sm_builtins = "GL_NV_shader_sm_builtins";
|
||||||
|
const char* const E_GL_NV_integer_cooperative_matrix = "GL_NV_integer_cooperative_matrix";
|
||||||
|
|
||||||
// AEP
|
// AEP
|
||||||
const char* const E_GL_ANDROID_extension_pack_es31a = "GL_ANDROID_extension_pack_es31a";
|
const char* const E_GL_ANDROID_extension_pack_es31a = "GL_ANDROID_extension_pack_es31a";
|
||||||
|
|||||||
@ -200,7 +200,7 @@ GLSLANG_WEB_EXCLUDE_ON
|
|||||||
%token <lex> F64MAT4X2 F64MAT4X3 F64MAT4X4
|
%token <lex> F64MAT4X2 F64MAT4X3 F64MAT4X4
|
||||||
%token <lex> ATOMIC_UINT
|
%token <lex> ATOMIC_UINT
|
||||||
%token <lex> ACCSTRUCTNV
|
%token <lex> ACCSTRUCTNV
|
||||||
%token <lex> FCOOPMATNV
|
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
||||||
|
|
||||||
// combined image/sampler
|
// combined image/sampler
|
||||||
%token <lex> SAMPLER1D SAMPLER1DARRAY SAMPLER1DARRAYSHADOW ISAMPLER1D SAMPLER1DSHADOW
|
%token <lex> SAMPLER1D SAMPLER1DARRAY SAMPLER1DARRAYSHADOW ISAMPLER1D SAMPLER1DSHADOW
|
||||||
@ -3183,6 +3183,18 @@ GLSLANG_WEB_EXCLUDE_ON
|
|||||||
$$.basicType = EbtFloat;
|
$$.basicType = EbtFloat;
|
||||||
$$.coopmat = true;
|
$$.coopmat = true;
|
||||||
}
|
}
|
||||||
|
| ICOOPMATNV {
|
||||||
|
parseContext.intcoopmatCheck($1.loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel());
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.basicType = EbtInt;
|
||||||
|
$$.coopmat = true;
|
||||||
|
}
|
||||||
|
| UCOOPMATNV {
|
||||||
|
parseContext.intcoopmatCheck($1.loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel());
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.basicType = EbtUint;
|
||||||
|
$$.coopmat = true;
|
||||||
|
}
|
||||||
GLSLANG_WEB_EXCLUDE_OFF
|
GLSLANG_WEB_EXCLUDE_OFF
|
||||||
| struct_specifier {
|
| struct_specifier {
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
|
|||||||
@ -200,7 +200,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||||||
%token <lex> F64MAT4X2 F64MAT4X3 F64MAT4X4
|
%token <lex> F64MAT4X2 F64MAT4X3 F64MAT4X4
|
||||||
%token <lex> ATOMIC_UINT
|
%token <lex> ATOMIC_UINT
|
||||||
%token <lex> ACCSTRUCTNV
|
%token <lex> ACCSTRUCTNV
|
||||||
%token <lex> FCOOPMATNV
|
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
||||||
|
|
||||||
// combined image/sampler
|
// combined image/sampler
|
||||||
%token <lex> SAMPLER1D SAMPLER1DARRAY SAMPLER1DARRAYSHADOW ISAMPLER1D SAMPLER1DSHADOW
|
%token <lex> SAMPLER1D SAMPLER1DARRAY SAMPLER1DARRAYSHADOW ISAMPLER1D SAMPLER1DSHADOW
|
||||||
@ -3183,6 +3183,18 @@ type_specifier_nonarray
|
|||||||
$$.basicType = EbtFloat;
|
$$.basicType = EbtFloat;
|
||||||
$$.coopmat = true;
|
$$.coopmat = true;
|
||||||
}
|
}
|
||||||
|
| ICOOPMATNV {
|
||||||
|
parseContext.intcoopmatCheck($1.loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel());
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.basicType = EbtInt;
|
||||||
|
$$.coopmat = true;
|
||||||
|
}
|
||||||
|
| UCOOPMATNV {
|
||||||
|
parseContext.intcoopmatCheck($1.loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel());
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.basicType = EbtUint;
|
||||||
|
$$.coopmat = true;
|
||||||
|
}
|
||||||
|
|
||||||
| struct_specifier {
|
| struct_specifier {
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -194,263 +194,265 @@ extern int yydebug;
|
|||||||
ATOMIC_UINT = 404,
|
ATOMIC_UINT = 404,
|
||||||
ACCSTRUCTNV = 405,
|
ACCSTRUCTNV = 405,
|
||||||
FCOOPMATNV = 406,
|
FCOOPMATNV = 406,
|
||||||
SAMPLER1D = 407,
|
ICOOPMATNV = 407,
|
||||||
SAMPLER1DARRAY = 408,
|
UCOOPMATNV = 408,
|
||||||
SAMPLER1DARRAYSHADOW = 409,
|
SAMPLER1D = 409,
|
||||||
ISAMPLER1D = 410,
|
SAMPLER1DARRAY = 410,
|
||||||
SAMPLER1DSHADOW = 411,
|
SAMPLER1DARRAYSHADOW = 411,
|
||||||
SAMPLER2DRECT = 412,
|
ISAMPLER1D = 412,
|
||||||
SAMPLER2DRECTSHADOW = 413,
|
SAMPLER1DSHADOW = 413,
|
||||||
ISAMPLER2DRECT = 414,
|
SAMPLER2DRECT = 414,
|
||||||
USAMPLER2DRECT = 415,
|
SAMPLER2DRECTSHADOW = 415,
|
||||||
SAMPLERBUFFER = 416,
|
ISAMPLER2DRECT = 416,
|
||||||
ISAMPLERBUFFER = 417,
|
USAMPLER2DRECT = 417,
|
||||||
USAMPLERBUFFER = 418,
|
SAMPLERBUFFER = 418,
|
||||||
SAMPLER2DMS = 419,
|
ISAMPLERBUFFER = 419,
|
||||||
ISAMPLER2DMS = 420,
|
USAMPLERBUFFER = 420,
|
||||||
USAMPLER2DMS = 421,
|
SAMPLER2DMS = 421,
|
||||||
SAMPLER2DMSARRAY = 422,
|
ISAMPLER2DMS = 422,
|
||||||
ISAMPLER2DMSARRAY = 423,
|
USAMPLER2DMS = 423,
|
||||||
USAMPLER2DMSARRAY = 424,
|
SAMPLER2DMSARRAY = 424,
|
||||||
SAMPLEREXTERNALOES = 425,
|
ISAMPLER2DMSARRAY = 425,
|
||||||
SAMPLEREXTERNAL2DY2YEXT = 426,
|
USAMPLER2DMSARRAY = 426,
|
||||||
ISAMPLER1DARRAY = 427,
|
SAMPLEREXTERNALOES = 427,
|
||||||
USAMPLER1D = 428,
|
SAMPLEREXTERNAL2DY2YEXT = 428,
|
||||||
USAMPLER1DARRAY = 429,
|
ISAMPLER1DARRAY = 429,
|
||||||
F16SAMPLER1D = 430,
|
USAMPLER1D = 430,
|
||||||
F16SAMPLER2D = 431,
|
USAMPLER1DARRAY = 431,
|
||||||
F16SAMPLER3D = 432,
|
F16SAMPLER1D = 432,
|
||||||
F16SAMPLER2DRECT = 433,
|
F16SAMPLER2D = 433,
|
||||||
F16SAMPLERCUBE = 434,
|
F16SAMPLER3D = 434,
|
||||||
F16SAMPLER1DARRAY = 435,
|
F16SAMPLER2DRECT = 435,
|
||||||
F16SAMPLER2DARRAY = 436,
|
F16SAMPLERCUBE = 436,
|
||||||
F16SAMPLERCUBEARRAY = 437,
|
F16SAMPLER1DARRAY = 437,
|
||||||
F16SAMPLERBUFFER = 438,
|
F16SAMPLER2DARRAY = 438,
|
||||||
F16SAMPLER2DMS = 439,
|
F16SAMPLERCUBEARRAY = 439,
|
||||||
F16SAMPLER2DMSARRAY = 440,
|
F16SAMPLERBUFFER = 440,
|
||||||
F16SAMPLER1DSHADOW = 441,
|
F16SAMPLER2DMS = 441,
|
||||||
F16SAMPLER2DSHADOW = 442,
|
F16SAMPLER2DMSARRAY = 442,
|
||||||
F16SAMPLER1DARRAYSHADOW = 443,
|
F16SAMPLER1DSHADOW = 443,
|
||||||
F16SAMPLER2DARRAYSHADOW = 444,
|
F16SAMPLER2DSHADOW = 444,
|
||||||
F16SAMPLER2DRECTSHADOW = 445,
|
F16SAMPLER1DARRAYSHADOW = 445,
|
||||||
F16SAMPLERCUBESHADOW = 446,
|
F16SAMPLER2DARRAYSHADOW = 446,
|
||||||
F16SAMPLERCUBEARRAYSHADOW = 447,
|
F16SAMPLER2DRECTSHADOW = 447,
|
||||||
IMAGE1D = 448,
|
F16SAMPLERCUBESHADOW = 448,
|
||||||
IIMAGE1D = 449,
|
F16SAMPLERCUBEARRAYSHADOW = 449,
|
||||||
UIMAGE1D = 450,
|
IMAGE1D = 450,
|
||||||
IMAGE2D = 451,
|
IIMAGE1D = 451,
|
||||||
IIMAGE2D = 452,
|
UIMAGE1D = 452,
|
||||||
UIMAGE2D = 453,
|
IMAGE2D = 453,
|
||||||
IMAGE3D = 454,
|
IIMAGE2D = 454,
|
||||||
IIMAGE3D = 455,
|
UIMAGE2D = 455,
|
||||||
UIMAGE3D = 456,
|
IMAGE3D = 456,
|
||||||
IMAGE2DRECT = 457,
|
IIMAGE3D = 457,
|
||||||
IIMAGE2DRECT = 458,
|
UIMAGE3D = 458,
|
||||||
UIMAGE2DRECT = 459,
|
IMAGE2DRECT = 459,
|
||||||
IMAGECUBE = 460,
|
IIMAGE2DRECT = 460,
|
||||||
IIMAGECUBE = 461,
|
UIMAGE2DRECT = 461,
|
||||||
UIMAGECUBE = 462,
|
IMAGECUBE = 462,
|
||||||
IMAGEBUFFER = 463,
|
IIMAGECUBE = 463,
|
||||||
IIMAGEBUFFER = 464,
|
UIMAGECUBE = 464,
|
||||||
UIMAGEBUFFER = 465,
|
IMAGEBUFFER = 465,
|
||||||
IMAGE1DARRAY = 466,
|
IIMAGEBUFFER = 466,
|
||||||
IIMAGE1DARRAY = 467,
|
UIMAGEBUFFER = 467,
|
||||||
UIMAGE1DARRAY = 468,
|
IMAGE1DARRAY = 468,
|
||||||
IMAGE2DARRAY = 469,
|
IIMAGE1DARRAY = 469,
|
||||||
IIMAGE2DARRAY = 470,
|
UIMAGE1DARRAY = 470,
|
||||||
UIMAGE2DARRAY = 471,
|
IMAGE2DARRAY = 471,
|
||||||
IMAGECUBEARRAY = 472,
|
IIMAGE2DARRAY = 472,
|
||||||
IIMAGECUBEARRAY = 473,
|
UIMAGE2DARRAY = 473,
|
||||||
UIMAGECUBEARRAY = 474,
|
IMAGECUBEARRAY = 474,
|
||||||
IMAGE2DMS = 475,
|
IIMAGECUBEARRAY = 475,
|
||||||
IIMAGE2DMS = 476,
|
UIMAGECUBEARRAY = 476,
|
||||||
UIMAGE2DMS = 477,
|
IMAGE2DMS = 477,
|
||||||
IMAGE2DMSARRAY = 478,
|
IIMAGE2DMS = 478,
|
||||||
IIMAGE2DMSARRAY = 479,
|
UIMAGE2DMS = 479,
|
||||||
UIMAGE2DMSARRAY = 480,
|
IMAGE2DMSARRAY = 480,
|
||||||
F16IMAGE1D = 481,
|
IIMAGE2DMSARRAY = 481,
|
||||||
F16IMAGE2D = 482,
|
UIMAGE2DMSARRAY = 482,
|
||||||
F16IMAGE3D = 483,
|
F16IMAGE1D = 483,
|
||||||
F16IMAGE2DRECT = 484,
|
F16IMAGE2D = 484,
|
||||||
F16IMAGECUBE = 485,
|
F16IMAGE3D = 485,
|
||||||
F16IMAGE1DARRAY = 486,
|
F16IMAGE2DRECT = 486,
|
||||||
F16IMAGE2DARRAY = 487,
|
F16IMAGECUBE = 487,
|
||||||
F16IMAGECUBEARRAY = 488,
|
F16IMAGE1DARRAY = 488,
|
||||||
F16IMAGEBUFFER = 489,
|
F16IMAGE2DARRAY = 489,
|
||||||
F16IMAGE2DMS = 490,
|
F16IMAGECUBEARRAY = 490,
|
||||||
F16IMAGE2DMSARRAY = 491,
|
F16IMAGEBUFFER = 491,
|
||||||
SAMPLER = 492,
|
F16IMAGE2DMS = 492,
|
||||||
SAMPLERSHADOW = 493,
|
F16IMAGE2DMSARRAY = 493,
|
||||||
TEXTURE1D = 494,
|
SAMPLER = 494,
|
||||||
TEXTURE2D = 495,
|
SAMPLERSHADOW = 495,
|
||||||
TEXTURE3D = 496,
|
TEXTURE1D = 496,
|
||||||
TEXTURECUBE = 497,
|
TEXTURE2D = 497,
|
||||||
TEXTURE1DARRAY = 498,
|
TEXTURE3D = 498,
|
||||||
TEXTURE2DARRAY = 499,
|
TEXTURECUBE = 499,
|
||||||
ITEXTURE1D = 500,
|
TEXTURE1DARRAY = 500,
|
||||||
ITEXTURE2D = 501,
|
TEXTURE2DARRAY = 501,
|
||||||
ITEXTURE3D = 502,
|
ITEXTURE1D = 502,
|
||||||
ITEXTURECUBE = 503,
|
ITEXTURE2D = 503,
|
||||||
ITEXTURE1DARRAY = 504,
|
ITEXTURE3D = 504,
|
||||||
ITEXTURE2DARRAY = 505,
|
ITEXTURECUBE = 505,
|
||||||
UTEXTURE1D = 506,
|
ITEXTURE1DARRAY = 506,
|
||||||
UTEXTURE2D = 507,
|
ITEXTURE2DARRAY = 507,
|
||||||
UTEXTURE3D = 508,
|
UTEXTURE1D = 508,
|
||||||
UTEXTURECUBE = 509,
|
UTEXTURE2D = 509,
|
||||||
UTEXTURE1DARRAY = 510,
|
UTEXTURE3D = 510,
|
||||||
UTEXTURE2DARRAY = 511,
|
UTEXTURECUBE = 511,
|
||||||
TEXTURE2DRECT = 512,
|
UTEXTURE1DARRAY = 512,
|
||||||
ITEXTURE2DRECT = 513,
|
UTEXTURE2DARRAY = 513,
|
||||||
UTEXTURE2DRECT = 514,
|
TEXTURE2DRECT = 514,
|
||||||
TEXTUREBUFFER = 515,
|
ITEXTURE2DRECT = 515,
|
||||||
ITEXTUREBUFFER = 516,
|
UTEXTURE2DRECT = 516,
|
||||||
UTEXTUREBUFFER = 517,
|
TEXTUREBUFFER = 517,
|
||||||
TEXTURECUBEARRAY = 518,
|
ITEXTUREBUFFER = 518,
|
||||||
ITEXTURECUBEARRAY = 519,
|
UTEXTUREBUFFER = 519,
|
||||||
UTEXTURECUBEARRAY = 520,
|
TEXTURECUBEARRAY = 520,
|
||||||
TEXTURE2DMS = 521,
|
ITEXTURECUBEARRAY = 521,
|
||||||
ITEXTURE2DMS = 522,
|
UTEXTURECUBEARRAY = 522,
|
||||||
UTEXTURE2DMS = 523,
|
TEXTURE2DMS = 523,
|
||||||
TEXTURE2DMSARRAY = 524,
|
ITEXTURE2DMS = 524,
|
||||||
ITEXTURE2DMSARRAY = 525,
|
UTEXTURE2DMS = 525,
|
||||||
UTEXTURE2DMSARRAY = 526,
|
TEXTURE2DMSARRAY = 526,
|
||||||
F16TEXTURE1D = 527,
|
ITEXTURE2DMSARRAY = 527,
|
||||||
F16TEXTURE2D = 528,
|
UTEXTURE2DMSARRAY = 528,
|
||||||
F16TEXTURE3D = 529,
|
F16TEXTURE1D = 529,
|
||||||
F16TEXTURE2DRECT = 530,
|
F16TEXTURE2D = 530,
|
||||||
F16TEXTURECUBE = 531,
|
F16TEXTURE3D = 531,
|
||||||
F16TEXTURE1DARRAY = 532,
|
F16TEXTURE2DRECT = 532,
|
||||||
F16TEXTURE2DARRAY = 533,
|
F16TEXTURECUBE = 533,
|
||||||
F16TEXTURECUBEARRAY = 534,
|
F16TEXTURE1DARRAY = 534,
|
||||||
F16TEXTUREBUFFER = 535,
|
F16TEXTURE2DARRAY = 535,
|
||||||
F16TEXTURE2DMS = 536,
|
F16TEXTURECUBEARRAY = 536,
|
||||||
F16TEXTURE2DMSARRAY = 537,
|
F16TEXTUREBUFFER = 537,
|
||||||
SUBPASSINPUT = 538,
|
F16TEXTURE2DMS = 538,
|
||||||
SUBPASSINPUTMS = 539,
|
F16TEXTURE2DMSARRAY = 539,
|
||||||
ISUBPASSINPUT = 540,
|
SUBPASSINPUT = 540,
|
||||||
ISUBPASSINPUTMS = 541,
|
SUBPASSINPUTMS = 541,
|
||||||
USUBPASSINPUT = 542,
|
ISUBPASSINPUT = 542,
|
||||||
USUBPASSINPUTMS = 543,
|
ISUBPASSINPUTMS = 543,
|
||||||
F16SUBPASSINPUT = 544,
|
USUBPASSINPUT = 544,
|
||||||
F16SUBPASSINPUTMS = 545,
|
USUBPASSINPUTMS = 545,
|
||||||
LEFT_OP = 546,
|
F16SUBPASSINPUT = 546,
|
||||||
RIGHT_OP = 547,
|
F16SUBPASSINPUTMS = 547,
|
||||||
INC_OP = 548,
|
LEFT_OP = 548,
|
||||||
DEC_OP = 549,
|
RIGHT_OP = 549,
|
||||||
LE_OP = 550,
|
INC_OP = 550,
|
||||||
GE_OP = 551,
|
DEC_OP = 551,
|
||||||
EQ_OP = 552,
|
LE_OP = 552,
|
||||||
NE_OP = 553,
|
GE_OP = 553,
|
||||||
AND_OP = 554,
|
EQ_OP = 554,
|
||||||
OR_OP = 555,
|
NE_OP = 555,
|
||||||
XOR_OP = 556,
|
AND_OP = 556,
|
||||||
MUL_ASSIGN = 557,
|
OR_OP = 557,
|
||||||
DIV_ASSIGN = 558,
|
XOR_OP = 558,
|
||||||
ADD_ASSIGN = 559,
|
MUL_ASSIGN = 559,
|
||||||
MOD_ASSIGN = 560,
|
DIV_ASSIGN = 560,
|
||||||
LEFT_ASSIGN = 561,
|
ADD_ASSIGN = 561,
|
||||||
RIGHT_ASSIGN = 562,
|
MOD_ASSIGN = 562,
|
||||||
AND_ASSIGN = 563,
|
LEFT_ASSIGN = 563,
|
||||||
XOR_ASSIGN = 564,
|
RIGHT_ASSIGN = 564,
|
||||||
OR_ASSIGN = 565,
|
AND_ASSIGN = 565,
|
||||||
SUB_ASSIGN = 566,
|
XOR_ASSIGN = 566,
|
||||||
LEFT_PAREN = 567,
|
OR_ASSIGN = 567,
|
||||||
RIGHT_PAREN = 568,
|
SUB_ASSIGN = 568,
|
||||||
LEFT_BRACKET = 569,
|
LEFT_PAREN = 569,
|
||||||
RIGHT_BRACKET = 570,
|
RIGHT_PAREN = 570,
|
||||||
LEFT_BRACE = 571,
|
LEFT_BRACKET = 571,
|
||||||
RIGHT_BRACE = 572,
|
RIGHT_BRACKET = 572,
|
||||||
DOT = 573,
|
LEFT_BRACE = 573,
|
||||||
COMMA = 574,
|
RIGHT_BRACE = 574,
|
||||||
COLON = 575,
|
DOT = 575,
|
||||||
EQUAL = 576,
|
COMMA = 576,
|
||||||
SEMICOLON = 577,
|
COLON = 577,
|
||||||
BANG = 578,
|
EQUAL = 578,
|
||||||
DASH = 579,
|
SEMICOLON = 579,
|
||||||
TILDE = 580,
|
BANG = 580,
|
||||||
PLUS = 581,
|
DASH = 581,
|
||||||
STAR = 582,
|
TILDE = 582,
|
||||||
SLASH = 583,
|
PLUS = 583,
|
||||||
PERCENT = 584,
|
STAR = 584,
|
||||||
LEFT_ANGLE = 585,
|
SLASH = 585,
|
||||||
RIGHT_ANGLE = 586,
|
PERCENT = 586,
|
||||||
VERTICAL_BAR = 587,
|
LEFT_ANGLE = 587,
|
||||||
CARET = 588,
|
RIGHT_ANGLE = 588,
|
||||||
AMPERSAND = 589,
|
VERTICAL_BAR = 589,
|
||||||
QUESTION = 590,
|
CARET = 590,
|
||||||
INVARIANT = 591,
|
AMPERSAND = 591,
|
||||||
HIGH_PRECISION = 592,
|
QUESTION = 592,
|
||||||
MEDIUM_PRECISION = 593,
|
INVARIANT = 593,
|
||||||
LOW_PRECISION = 594,
|
HIGH_PRECISION = 594,
|
||||||
PRECISION = 595,
|
MEDIUM_PRECISION = 595,
|
||||||
PACKED = 596,
|
LOW_PRECISION = 596,
|
||||||
RESOURCE = 597,
|
PRECISION = 597,
|
||||||
SUPERP = 598,
|
PACKED = 598,
|
||||||
FLOATCONSTANT = 599,
|
RESOURCE = 599,
|
||||||
INTCONSTANT = 600,
|
SUPERP = 600,
|
||||||
UINTCONSTANT = 601,
|
FLOATCONSTANT = 601,
|
||||||
BOOLCONSTANT = 602,
|
INTCONSTANT = 602,
|
||||||
IDENTIFIER = 603,
|
UINTCONSTANT = 603,
|
||||||
TYPE_NAME = 604,
|
BOOLCONSTANT = 604,
|
||||||
CENTROID = 605,
|
IDENTIFIER = 605,
|
||||||
IN = 606,
|
TYPE_NAME = 606,
|
||||||
OUT = 607,
|
CENTROID = 607,
|
||||||
INOUT = 608,
|
IN = 608,
|
||||||
STRUCT = 609,
|
OUT = 609,
|
||||||
VOID = 610,
|
INOUT = 610,
|
||||||
WHILE = 611,
|
STRUCT = 611,
|
||||||
BREAK = 612,
|
VOID = 612,
|
||||||
CONTINUE = 613,
|
WHILE = 613,
|
||||||
DO = 614,
|
BREAK = 614,
|
||||||
ELSE = 615,
|
CONTINUE = 615,
|
||||||
FOR = 616,
|
DO = 616,
|
||||||
IF = 617,
|
ELSE = 617,
|
||||||
DISCARD = 618,
|
FOR = 618,
|
||||||
RETURN = 619,
|
IF = 619,
|
||||||
SWITCH = 620,
|
DISCARD = 620,
|
||||||
CASE = 621,
|
RETURN = 621,
|
||||||
DEFAULT = 622,
|
SWITCH = 622,
|
||||||
UNIFORM = 623,
|
CASE = 623,
|
||||||
SHARED = 624,
|
DEFAULT = 624,
|
||||||
FLAT = 625,
|
UNIFORM = 625,
|
||||||
SMOOTH = 626,
|
SHARED = 626,
|
||||||
LAYOUT = 627,
|
FLAT = 627,
|
||||||
DOUBLECONSTANT = 628,
|
SMOOTH = 628,
|
||||||
INT16CONSTANT = 629,
|
LAYOUT = 629,
|
||||||
UINT16CONSTANT = 630,
|
DOUBLECONSTANT = 630,
|
||||||
FLOAT16CONSTANT = 631,
|
INT16CONSTANT = 631,
|
||||||
INT32CONSTANT = 632,
|
UINT16CONSTANT = 632,
|
||||||
UINT32CONSTANT = 633,
|
FLOAT16CONSTANT = 633,
|
||||||
INT64CONSTANT = 634,
|
INT32CONSTANT = 634,
|
||||||
UINT64CONSTANT = 635,
|
UINT32CONSTANT = 635,
|
||||||
SUBROUTINE = 636,
|
INT64CONSTANT = 636,
|
||||||
DEMOTE = 637,
|
UINT64CONSTANT = 637,
|
||||||
PAYLOADNV = 638,
|
SUBROUTINE = 638,
|
||||||
PAYLOADINNV = 639,
|
DEMOTE = 639,
|
||||||
HITATTRNV = 640,
|
PAYLOADNV = 640,
|
||||||
CALLDATANV = 641,
|
PAYLOADINNV = 641,
|
||||||
CALLDATAINNV = 642,
|
HITATTRNV = 642,
|
||||||
PATCH = 643,
|
CALLDATANV = 643,
|
||||||
SAMPLE = 644,
|
CALLDATAINNV = 644,
|
||||||
BUFFER = 645,
|
PATCH = 645,
|
||||||
NONUNIFORM = 646,
|
SAMPLE = 646,
|
||||||
COHERENT = 647,
|
BUFFER = 647,
|
||||||
VOLATILE = 648,
|
NONUNIFORM = 648,
|
||||||
RESTRICT = 649,
|
COHERENT = 649,
|
||||||
READONLY = 650,
|
VOLATILE = 650,
|
||||||
WRITEONLY = 651,
|
RESTRICT = 651,
|
||||||
DEVICECOHERENT = 652,
|
READONLY = 652,
|
||||||
QUEUEFAMILYCOHERENT = 653,
|
WRITEONLY = 653,
|
||||||
WORKGROUPCOHERENT = 654,
|
DEVICECOHERENT = 654,
|
||||||
SUBGROUPCOHERENT = 655,
|
QUEUEFAMILYCOHERENT = 655,
|
||||||
NONPRIVATE = 656,
|
WORKGROUPCOHERENT = 656,
|
||||||
NOPERSPECTIVE = 657,
|
SUBGROUPCOHERENT = 657,
|
||||||
EXPLICITINTERPAMD = 658,
|
NONPRIVATE = 658,
|
||||||
PERVERTEXNV = 659,
|
NOPERSPECTIVE = 659,
|
||||||
PERPRIMITIVENV = 660,
|
EXPLICITINTERPAMD = 660,
|
||||||
PERVIEWNV = 661,
|
PERVERTEXNV = 661,
|
||||||
PERTASKNV = 662,
|
PERPRIMITIVENV = 662,
|
||||||
PRECISE = 663
|
PERVIEWNV = 663,
|
||||||
|
PERTASKNV = 664,
|
||||||
|
PRECISE = 665
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -495,7 +497,7 @@ union YYSTYPE
|
|||||||
glslang::TArraySizes* typeParameters;
|
glslang::TArraySizes* typeParameters;
|
||||||
} interm;
|
} interm;
|
||||||
|
|
||||||
#line 499 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
|
#line 501 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef union YYSTYPE YYSTYPE;
|
typedef union YYSTYPE YYSTYPE;
|
||||||
|
|||||||
@ -161,6 +161,7 @@ public:
|
|||||||
virtual void explicitFloat32Check(const TSourceLoc&, const char* op, bool builtIn = false);
|
virtual void explicitFloat32Check(const TSourceLoc&, const char* op, bool builtIn = false);
|
||||||
virtual void explicitFloat64Check(const TSourceLoc&, const char* op, bool builtIn = false);
|
virtual void explicitFloat64Check(const TSourceLoc&, const char* op, bool builtIn = false);
|
||||||
virtual void fcoopmatCheck(const TSourceLoc&, const char* op, bool builtIn = false);
|
virtual void fcoopmatCheck(const TSourceLoc&, const char* op, bool builtIn = false);
|
||||||
|
virtual void intcoopmatCheck(const TSourceLoc&, const char *op, bool builtIn = false);
|
||||||
bool relaxedErrors() const { return (messages & EShMsgRelaxedErrors) != 0; }
|
bool relaxedErrors() const { return (messages & EShMsgRelaxedErrors) != 0; }
|
||||||
bool suppressWarnings() const { return (messages & EShMsgSuppressWarnings) != 0; }
|
bool suppressWarnings() const { return (messages & EShMsgSuppressWarnings) != 0; }
|
||||||
bool isForwardCompatible() const { return forwardCompatible; }
|
bool isForwardCompatible() const { return forwardCompatible; }
|
||||||
|
|||||||
@ -325,6 +325,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
"spv.GeometryShaderPassthrough.geom",
|
"spv.GeometryShaderPassthrough.geom",
|
||||||
"spv.interpOps.frag",
|
"spv.interpOps.frag",
|
||||||
"spv.int64.frag",
|
"spv.int64.frag",
|
||||||
|
"spv.intcoopmat.comp",
|
||||||
"spv.intOps.vert",
|
"spv.intOps.vert",
|
||||||
"spv.layoutNested.vert",
|
"spv.layoutNested.vert",
|
||||||
"spv.length.frag",
|
"spv.length.frag",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user