1 | // Copyright 2019 The SwiftShader Authors. All Rights Reserved. |
---|---|
2 | // |
3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | // you may not use this file except in compliance with the License. |
5 | // You may obtain a copy of the License at |
6 | // |
7 | // http://www.apache.org/licenses/LICENSE-2.0 |
8 | // |
9 | // Unless required by applicable law or agreed to in writing, software |
10 | // distributed under the License is distributed on an "AS IS" BASIS, |
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | // See the License for the specific language governing permissions and |
13 | // limitations under the License. |
14 | |
15 | // This file contains code used to aid debugging. |
16 | |
17 | #include <spirv/unified1/spirv.hpp> |
18 | #include "SpirvShader.hpp" |
19 | |
20 | namespace sw |
21 | { |
22 | std::string SpirvShader::OpcodeName(spv::Op op) |
23 | { |
24 | #ifndef NDEBUG |
25 | switch(op){ |
26 | case spv::OpNop: return "Nop"; |
27 | case spv::OpUndef: return "Undef"; |
28 | case spv::OpSourceContinued: return "SourceContinued"; |
29 | case spv::OpSource: return "Source"; |
30 | case spv::OpSourceExtension: return "SourceExtension"; |
31 | case spv::OpName: return "Name"; |
32 | case spv::OpMemberName: return "MemberName"; |
33 | case spv::OpString: return "String"; |
34 | case spv::OpLine: return "Line"; |
35 | case spv::OpExtension: return "Extension"; |
36 | case spv::OpExtInstImport: return "ExtInstImport"; |
37 | case spv::OpExtInst: return "ExtInst"; |
38 | case spv::OpMemoryModel: return "MemoryModel"; |
39 | case spv::OpEntryPoint: return "EntryPoint"; |
40 | case spv::OpExecutionMode: return "ExecutionMode"; |
41 | case spv::OpCapability: return "Capability"; |
42 | case spv::OpTypeVoid: return "TypeVoid"; |
43 | case spv::OpTypeBool: return "TypeBool"; |
44 | case spv::OpTypeInt: return "TypeInt"; |
45 | case spv::OpTypeFloat: return "TypeFloat"; |
46 | case spv::OpTypeVector: return "TypeVector"; |
47 | case spv::OpTypeMatrix: return "TypeMatrix"; |
48 | case spv::OpTypeImage: return "TypeImage"; |
49 | case spv::OpTypeSampler: return "TypeSampler"; |
50 | case spv::OpTypeSampledImage: return "TypeSampledImage"; |
51 | case spv::OpTypeArray: return "TypeArray"; |
52 | case spv::OpTypeRuntimeArray: return "TypeRuntimeArray"; |
53 | case spv::OpTypeStruct: return "TypeStruct"; |
54 | case spv::OpTypeOpaque: return "TypeOpaque"; |
55 | case spv::OpTypePointer: return "TypePointer"; |
56 | case spv::OpTypeFunction: return "TypeFunction"; |
57 | case spv::OpTypeEvent: return "TypeEvent"; |
58 | case spv::OpTypeDeviceEvent: return "TypeDeviceEvent"; |
59 | case spv::OpTypeReserveId: return "TypeReserveId"; |
60 | case spv::OpTypeQueue: return "TypeQueue"; |
61 | case spv::OpTypePipe: return "TypePipe"; |
62 | case spv::OpTypeForwardPointer: return "TypeForwardPointer"; |
63 | case spv::OpConstantTrue: return "ConstantTrue"; |
64 | case spv::OpConstantFalse: return "ConstantFalse"; |
65 | case spv::OpConstant: return "Constant"; |
66 | case spv::OpConstantComposite: return "ConstantComposite"; |
67 | case spv::OpConstantSampler: return "ConstantSampler"; |
68 | case spv::OpConstantNull: return "ConstantNull"; |
69 | case spv::OpSpecConstantTrue: return "SpecConstantTrue"; |
70 | case spv::OpSpecConstantFalse: return "SpecConstantFalse"; |
71 | case spv::OpSpecConstant: return "SpecConstant"; |
72 | case spv::OpSpecConstantComposite: return "SpecConstantComposite"; |
73 | case spv::OpSpecConstantOp: return "SpecConstantOp"; |
74 | case spv::OpFunction: return "Function"; |
75 | case spv::OpFunctionParameter: return "FunctionParameter"; |
76 | case spv::OpFunctionEnd: return "FunctionEnd"; |
77 | case spv::OpFunctionCall: return "FunctionCall"; |
78 | case spv::OpVariable: return "Variable"; |
79 | case spv::OpImageTexelPointer: return "ImageTexelPointer"; |
80 | case spv::OpLoad: return "Load"; |
81 | case spv::OpStore: return "Store"; |
82 | case spv::OpCopyMemory: return "CopyMemory"; |
83 | case spv::OpCopyMemorySized: return "CopyMemorySized"; |
84 | case spv::OpAccessChain: return "AccessChain"; |
85 | case spv::OpInBoundsAccessChain: return "InBoundsAccessChain"; |
86 | case spv::OpPtrAccessChain: return "PtrAccessChain"; |
87 | case spv::OpArrayLength: return "ArrayLength"; |
88 | case spv::OpGenericPtrMemSemantics: return "GenericPtrMemSemantics"; |
89 | case spv::OpInBoundsPtrAccessChain: return "InBoundsPtrAccessChain"; |
90 | case spv::OpDecorate: return "Decorate"; |
91 | case spv::OpMemberDecorate: return "MemberDecorate"; |
92 | case spv::OpDecorationGroup: return "DecorationGroup"; |
93 | case spv::OpGroupDecorate: return "GroupDecorate"; |
94 | case spv::OpGroupMemberDecorate: return "GroupMemberDecorate"; |
95 | case spv::OpVectorExtractDynamic: return "VectorExtractDynamic"; |
96 | case spv::OpVectorInsertDynamic: return "VectorInsertDynamic"; |
97 | case spv::OpVectorShuffle: return "VectorShuffle"; |
98 | case spv::OpCompositeConstruct: return "CompositeConstruct"; |
99 | case spv::OpCompositeExtract: return "CompositeExtract"; |
100 | case spv::OpCompositeInsert: return "CompositeInsert"; |
101 | case spv::OpCopyObject: return "CopyObject"; |
102 | case spv::OpTranspose: return "Transpose"; |
103 | case spv::OpSampledImage: return "SampledImage"; |
104 | case spv::OpImageSampleImplicitLod: return "ImageSampleImplicitLod"; |
105 | case spv::OpImageSampleExplicitLod: return "ImageSampleExplicitLod"; |
106 | case spv::OpImageSampleDrefImplicitLod: return "ImageSampleDrefImplicitLod"; |
107 | case spv::OpImageSampleDrefExplicitLod: return "ImageSampleDrefExplicitLod"; |
108 | case spv::OpImageSampleProjImplicitLod: return "ImageSampleProjImplicitLod"; |
109 | case spv::OpImageSampleProjExplicitLod: return "ImageSampleProjExplicitLod"; |
110 | case spv::OpImageSampleProjDrefImplicitLod: return "ImageSampleProjDrefImplicitLod"; |
111 | case spv::OpImageSampleProjDrefExplicitLod: return "ImageSampleProjDrefExplicitLod"; |
112 | case spv::OpImageFetch: return "ImageFetch"; |
113 | case spv::OpImageGather: return "ImageGather"; |
114 | case spv::OpImageDrefGather: return "ImageDrefGather"; |
115 | case spv::OpImageRead: return "ImageRead"; |
116 | case spv::OpImageWrite: return "ImageWrite"; |
117 | case spv::OpImage: return "Image"; |
118 | case spv::OpImageQueryFormat: return "ImageQueryFormat"; |
119 | case spv::OpImageQueryOrder: return "ImageQueryOrder"; |
120 | case spv::OpImageQuerySizeLod: return "ImageQuerySizeLod"; |
121 | case spv::OpImageQuerySize: return "ImageQuerySize"; |
122 | case spv::OpImageQueryLod: return "ImageQueryLod"; |
123 | case spv::OpImageQueryLevels: return "ImageQueryLevels"; |
124 | case spv::OpImageQuerySamples: return "ImageQuerySamples"; |
125 | case spv::OpConvertFToU: return "ConvertFToU"; |
126 | case spv::OpConvertFToS: return "ConvertFToS"; |
127 | case spv::OpConvertSToF: return "ConvertSToF"; |
128 | case spv::OpConvertUToF: return "ConvertUToF"; |
129 | case spv::OpUConvert: return "UConvert"; |
130 | case spv::OpSConvert: return "SConvert"; |
131 | case spv::OpFConvert: return "FConvert"; |
132 | case spv::OpQuantizeToF16: return "QuantizeToF16"; |
133 | case spv::OpConvertPtrToU: return "ConvertPtrToU"; |
134 | case spv::OpSatConvertSToU: return "SatConvertSToU"; |
135 | case spv::OpSatConvertUToS: return "SatConvertUToS"; |
136 | case spv::OpConvertUToPtr: return "ConvertUToPtr"; |
137 | case spv::OpPtrCastToGeneric: return "PtrCastToGeneric"; |
138 | case spv::OpGenericCastToPtr: return "GenericCastToPtr"; |
139 | case spv::OpGenericCastToPtrExplicit: return "GenericCastToPtrExplicit"; |
140 | case spv::OpBitcast: return "Bitcast"; |
141 | case spv::OpSNegate: return "SNegate"; |
142 | case spv::OpFNegate: return "FNegate"; |
143 | case spv::OpIAdd: return "IAdd"; |
144 | case spv::OpFAdd: return "FAdd"; |
145 | case spv::OpISub: return "ISub"; |
146 | case spv::OpFSub: return "FSub"; |
147 | case spv::OpIMul: return "IMul"; |
148 | case spv::OpFMul: return "FMul"; |
149 | case spv::OpUDiv: return "UDiv"; |
150 | case spv::OpSDiv: return "SDiv"; |
151 | case spv::OpFDiv: return "FDiv"; |
152 | case spv::OpUMod: return "UMod"; |
153 | case spv::OpSRem: return "SRem"; |
154 | case spv::OpSMod: return "SMod"; |
155 | case spv::OpFRem: return "FRem"; |
156 | case spv::OpFMod: return "FMod"; |
157 | case spv::OpVectorTimesScalar: return "VectorTimesScalar"; |
158 | case spv::OpMatrixTimesScalar: return "MatrixTimesScalar"; |
159 | case spv::OpVectorTimesMatrix: return "VectorTimesMatrix"; |
160 | case spv::OpMatrixTimesVector: return "MatrixTimesVector"; |
161 | case spv::OpMatrixTimesMatrix: return "MatrixTimesMatrix"; |
162 | case spv::OpOuterProduct: return "OuterProduct"; |
163 | case spv::OpDot: return "Dot"; |
164 | case spv::OpIAddCarry: return "IAddCarry"; |
165 | case spv::OpISubBorrow: return "ISubBorrow"; |
166 | case spv::OpUMulExtended: return "UMulExtended"; |
167 | case spv::OpSMulExtended: return "SMulExtended"; |
168 | case spv::OpAny: return "Any"; |
169 | case spv::OpAll: return "All"; |
170 | case spv::OpIsNan: return "IsNan"; |
171 | case spv::OpIsInf: return "IsInf"; |
172 | case spv::OpIsFinite: return "IsFinite"; |
173 | case spv::OpIsNormal: return "IsNormal"; |
174 | case spv::OpSignBitSet: return "SignBitSet"; |
175 | case spv::OpLessOrGreater: return "LessOrGreater"; |
176 | case spv::OpOrdered: return "Ordered"; |
177 | case spv::OpUnordered: return "Unordered"; |
178 | case spv::OpLogicalEqual: return "LogicalEqual"; |
179 | case spv::OpLogicalNotEqual: return "LogicalNotEqual"; |
180 | case spv::OpLogicalOr: return "LogicalOr"; |
181 | case spv::OpLogicalAnd: return "LogicalAnd"; |
182 | case spv::OpLogicalNot: return "LogicalNot"; |
183 | case spv::OpSelect: return "Select"; |
184 | case spv::OpIEqual: return "IEqual"; |
185 | case spv::OpINotEqual: return "INotEqual"; |
186 | case spv::OpUGreaterThan: return "UGreaterThan"; |
187 | case spv::OpSGreaterThan: return "SGreaterThan"; |
188 | case spv::OpUGreaterThanEqual: return "UGreaterThanEqual"; |
189 | case spv::OpSGreaterThanEqual: return "SGreaterThanEqual"; |
190 | case spv::OpULessThan: return "ULessThan"; |
191 | case spv::OpSLessThan: return "SLessThan"; |
192 | case spv::OpULessThanEqual: return "ULessThanEqual"; |
193 | case spv::OpSLessThanEqual: return "SLessThanEqual"; |
194 | case spv::OpFOrdEqual: return "FOrdEqual"; |
195 | case spv::OpFUnordEqual: return "FUnordEqual"; |
196 | case spv::OpFOrdNotEqual: return "FOrdNotEqual"; |
197 | case spv::OpFUnordNotEqual: return "FUnordNotEqual"; |
198 | case spv::OpFOrdLessThan: return "FOrdLessThan"; |
199 | case spv::OpFUnordLessThan: return "FUnordLessThan"; |
200 | case spv::OpFOrdGreaterThan: return "FOrdGreaterThan"; |
201 | case spv::OpFUnordGreaterThan: return "FUnordGreaterThan"; |
202 | case spv::OpFOrdLessThanEqual: return "FOrdLessThanEqual"; |
203 | case spv::OpFUnordLessThanEqual: return "FUnordLessThanEqual"; |
204 | case spv::OpFOrdGreaterThanEqual: return "FOrdGreaterThanEqual"; |
205 | case spv::OpFUnordGreaterThanEqual: return "FUnordGreaterThanEqual"; |
206 | case spv::OpShiftRightLogical: return "ShiftRightLogical"; |
207 | case spv::OpShiftRightArithmetic: return "ShiftRightArithmetic"; |
208 | case spv::OpShiftLeftLogical: return "ShiftLeftLogical"; |
209 | case spv::OpBitwiseOr: return "BitwiseOr"; |
210 | case spv::OpBitwiseXor: return "BitwiseXor"; |
211 | case spv::OpBitwiseAnd: return "BitwiseAnd"; |
212 | case spv::OpNot: return "Not"; |
213 | case spv::OpBitFieldInsert: return "BitFieldInsert"; |
214 | case spv::OpBitFieldSExtract: return "BitFieldSExtract"; |
215 | case spv::OpBitFieldUExtract: return "BitFieldUExtract"; |
216 | case spv::OpBitReverse: return "BitReverse"; |
217 | case spv::OpBitCount: return "BitCount"; |
218 | case spv::OpDPdx: return "DPdx"; |
219 | case spv::OpDPdy: return "DPdy"; |
220 | case spv::OpFwidth: return "Fwidth"; |
221 | case spv::OpDPdxFine: return "DPdxFine"; |
222 | case spv::OpDPdyFine: return "DPdyFine"; |
223 | case spv::OpFwidthFine: return "FwidthFine"; |
224 | case spv::OpDPdxCoarse: return "DPdxCoarse"; |
225 | case spv::OpDPdyCoarse: return "DPdyCoarse"; |
226 | case spv::OpFwidthCoarse: return "FwidthCoarse"; |
227 | case spv::OpEmitVertex: return "EmitVertex"; |
228 | case spv::OpEndPrimitive: return "EndPrimitive"; |
229 | case spv::OpEmitStreamVertex: return "EmitStreamVertex"; |
230 | case spv::OpEndStreamPrimitive: return "EndStreamPrimitive"; |
231 | case spv::OpControlBarrier: return "ControlBarrier"; |
232 | case spv::OpMemoryBarrier: return "MemoryBarrier"; |
233 | case spv::OpAtomicLoad: return "AtomicLoad"; |
234 | case spv::OpAtomicStore: return "AtomicStore"; |
235 | case spv::OpAtomicExchange: return "AtomicExchange"; |
236 | case spv::OpAtomicCompareExchange: return "AtomicCompareExchange"; |
237 | case spv::OpAtomicCompareExchangeWeak: return "AtomicCompareExchangeWeak"; |
238 | case spv::OpAtomicIIncrement: return "AtomicIIncrement"; |
239 | case spv::OpAtomicIDecrement: return "AtomicIDecrement"; |
240 | case spv::OpAtomicIAdd: return "AtomicIAdd"; |
241 | case spv::OpAtomicISub: return "AtomicISub"; |
242 | case spv::OpAtomicSMin: return "AtomicSMin"; |
243 | case spv::OpAtomicUMin: return "AtomicUMin"; |
244 | case spv::OpAtomicSMax: return "AtomicSMax"; |
245 | case spv::OpAtomicUMax: return "AtomicUMax"; |
246 | case spv::OpAtomicAnd: return "AtomicAnd"; |
247 | case spv::OpAtomicOr: return "AtomicOr"; |
248 | case spv::OpAtomicXor: return "AtomicXor"; |
249 | case spv::OpPhi: return "Phi"; |
250 | case spv::OpLoopMerge: return "LoopMerge"; |
251 | case spv::OpSelectionMerge: return "SelectionMerge"; |
252 | case spv::OpLabel: return "Label"; |
253 | case spv::OpBranch: return "Branch"; |
254 | case spv::OpBranchConditional: return "BranchConditional"; |
255 | case spv::OpSwitch: return "Switch"; |
256 | case spv::OpKill: return "Kill"; |
257 | case spv::OpReturn: return "Return"; |
258 | case spv::OpReturnValue: return "ReturnValue"; |
259 | case spv::OpUnreachable: return "Unreachable"; |
260 | case spv::OpLifetimeStart: return "LifetimeStart"; |
261 | case spv::OpLifetimeStop: return "LifetimeStop"; |
262 | case spv::OpGroupAsyncCopy: return "GroupAsyncCopy"; |
263 | case spv::OpGroupWaitEvents: return "GroupWaitEvents"; |
264 | case spv::OpGroupAll: return "GroupAll"; |
265 | case spv::OpGroupAny: return "GroupAny"; |
266 | case spv::OpGroupBroadcast: return "GroupBroadcast"; |
267 | case spv::OpGroupIAdd: return "GroupIAdd"; |
268 | case spv::OpGroupFAdd: return "GroupFAdd"; |
269 | case spv::OpGroupFMin: return "GroupFMin"; |
270 | case spv::OpGroupUMin: return "GroupUMin"; |
271 | case spv::OpGroupSMin: return "GroupSMin"; |
272 | case spv::OpGroupFMax: return "GroupFMax"; |
273 | case spv::OpGroupUMax: return "GroupUMax"; |
274 | case spv::OpGroupSMax: return "GroupSMax"; |
275 | case spv::OpReadPipe: return "ReadPipe"; |
276 | case spv::OpWritePipe: return "WritePipe"; |
277 | case spv::OpReservedReadPipe: return "ReservedReadPipe"; |
278 | case spv::OpReservedWritePipe: return "ReservedWritePipe"; |
279 | case spv::OpReserveReadPipePackets: return "ReserveReadPipePackets"; |
280 | case spv::OpReserveWritePipePackets: return "ReserveWritePipePackets"; |
281 | case spv::OpCommitReadPipe: return "CommitReadPipe"; |
282 | case spv::OpCommitWritePipe: return "CommitWritePipe"; |
283 | case spv::OpIsValidReserveId: return "IsValidReserveId"; |
284 | case spv::OpGetNumPipePackets: return "GetNumPipePackets"; |
285 | case spv::OpGetMaxPipePackets: return "GetMaxPipePackets"; |
286 | case spv::OpGroupReserveReadPipePackets: return "GroupReserveReadPipePackets"; |
287 | case spv::OpGroupReserveWritePipePackets: return "GroupReserveWritePipePackets"; |
288 | case spv::OpGroupCommitReadPipe: return "GroupCommitReadPipe"; |
289 | case spv::OpGroupCommitWritePipe: return "GroupCommitWritePipe"; |
290 | case spv::OpEnqueueMarker: return "EnqueueMarker"; |
291 | case spv::OpEnqueueKernel: return "EnqueueKernel"; |
292 | case spv::OpGetKernelNDrangeSubGroupCount: return "GetKernelNDrangeSubGroupCount"; |
293 | case spv::OpGetKernelNDrangeMaxSubGroupSize: return "GetKernelNDrangeMaxSubGroupSize"; |
294 | case spv::OpGetKernelWorkGroupSize: return "GetKernelWorkGroupSize"; |
295 | case spv::OpGetKernelPreferredWorkGroupSizeMultiple: return "GetKernelPreferredWorkGroupSizeMultiple"; |
296 | case spv::OpRetainEvent: return "RetainEvent"; |
297 | case spv::OpReleaseEvent: return "ReleaseEvent"; |
298 | case spv::OpCreateUserEvent: return "CreateUserEvent"; |
299 | case spv::OpIsValidEvent: return "IsValidEvent"; |
300 | case spv::OpSetUserEventStatus: return "SetUserEventStatus"; |
301 | case spv::OpCaptureEventProfilingInfo: return "CaptureEventProfilingInfo"; |
302 | case spv::OpGetDefaultQueue: return "GetDefaultQueue"; |
303 | case spv::OpBuildNDRange: return "BuildNDRange"; |
304 | case spv::OpImageSparseSampleImplicitLod: return "ImageSparseSampleImplicitLod"; |
305 | case spv::OpImageSparseSampleExplicitLod: return "ImageSparseSampleExplicitLod"; |
306 | case spv::OpImageSparseSampleDrefImplicitLod: return "ImageSparseSampleDrefImplicitLod"; |
307 | case spv::OpImageSparseSampleDrefExplicitLod: return "ImageSparseSampleDrefExplicitLod"; |
308 | case spv::OpImageSparseSampleProjImplicitLod: return "ImageSparseSampleProjImplicitLod"; |
309 | case spv::OpImageSparseSampleProjExplicitLod: return "ImageSparseSampleProjExplicitLod"; |
310 | case spv::OpImageSparseSampleProjDrefImplicitLod: return "ImageSparseSampleProjDrefImplicitLod"; |
311 | case spv::OpImageSparseSampleProjDrefExplicitLod: return "ImageSparseSampleProjDrefExplicitLod"; |
312 | case spv::OpImageSparseFetch: return "ImageSparseFetch"; |
313 | case spv::OpImageSparseGather: return "ImageSparseGather"; |
314 | case spv::OpImageSparseDrefGather: return "ImageSparseDrefGather"; |
315 | case spv::OpImageSparseTexelsResident: return "ImageSparseTexelsResident"; |
316 | case spv::OpNoLine: return "NoLine"; |
317 | case spv::OpAtomicFlagTestAndSet: return "AtomicFlagTestAndSet"; |
318 | case spv::OpAtomicFlagClear: return "AtomicFlagClear"; |
319 | case spv::OpImageSparseRead: return "ImageSparseRead"; |
320 | case spv::OpSizeOf: return "SizeOf"; |
321 | case spv::OpTypePipeStorage: return "TypePipeStorage"; |
322 | case spv::OpConstantPipeStorage: return "ConstantPipeStorage"; |
323 | case spv::OpCreatePipeFromPipeStorage: return "CreatePipeFromPipeStorage"; |
324 | case spv::OpGetKernelLocalSizeForSubgroupCount: return "GetKernelLocalSizeForSubgroupCount"; |
325 | case spv::OpGetKernelMaxNumSubgroups: return "GetKernelMaxNumSubgroups"; |
326 | case spv::OpTypeNamedBarrier: return "TypeNamedBarrier"; |
327 | case spv::OpNamedBarrierInitialize: return "NamedBarrierInitialize"; |
328 | case spv::OpMemoryNamedBarrier: return "MemoryNamedBarrier"; |
329 | case spv::OpModuleProcessed: return "ModuleProcessed"; |
330 | case spv::OpExecutionModeId: return "ExecutionModeId"; |
331 | case spv::OpDecorateId: return "DecorateId"; |
332 | case spv::OpGroupNonUniformElect: return "GroupNonUniformElect"; |
333 | case spv::OpGroupNonUniformAll: return "GroupNonUniformAll"; |
334 | case spv::OpGroupNonUniformAny: return "GroupNonUniformAny"; |
335 | case spv::OpGroupNonUniformAllEqual: return "GroupNonUniformAllEqual"; |
336 | case spv::OpGroupNonUniformBroadcast: return "GroupNonUniformBroadcast"; |
337 | case spv::OpGroupNonUniformBroadcastFirst: return "GroupNonUniformBroadcastFirst"; |
338 | case spv::OpGroupNonUniformBallot: return "GroupNonUniformBallot"; |
339 | case spv::OpGroupNonUniformInverseBallot: return "GroupNonUniformInverseBallot"; |
340 | case spv::OpGroupNonUniformBallotBitExtract: return "GroupNonUniformBallotBitExtract"; |
341 | case spv::OpGroupNonUniformBallotBitCount: return "GroupNonUniformBallotBitCount"; |
342 | case spv::OpGroupNonUniformBallotFindLSB: return "GroupNonUniformBallotFindLSB"; |
343 | case spv::OpGroupNonUniformBallotFindMSB: return "GroupNonUniformBallotFindMSB"; |
344 | case spv::OpGroupNonUniformShuffle: return "GroupNonUniformShuffle"; |
345 | case spv::OpGroupNonUniformShuffleXor: return "GroupNonUniformShuffleXor"; |
346 | case spv::OpGroupNonUniformShuffleUp: return "GroupNonUniformShuffleUp"; |
347 | case spv::OpGroupNonUniformShuffleDown: return "GroupNonUniformShuffleDown"; |
348 | case spv::OpGroupNonUniformIAdd: return "GroupNonUniformIAdd"; |
349 | case spv::OpGroupNonUniformFAdd: return "GroupNonUniformFAdd"; |
350 | case spv::OpGroupNonUniformIMul: return "GroupNonUniformIMul"; |
351 | case spv::OpGroupNonUniformFMul: return "GroupNonUniformFMul"; |
352 | case spv::OpGroupNonUniformSMin: return "GroupNonUniformSMin"; |
353 | case spv::OpGroupNonUniformUMin: return "GroupNonUniformUMin"; |
354 | case spv::OpGroupNonUniformFMin: return "GroupNonUniformFMin"; |
355 | case spv::OpGroupNonUniformSMax: return "GroupNonUniformSMax"; |
356 | case spv::OpGroupNonUniformUMax: return "GroupNonUniformUMax"; |
357 | case spv::OpGroupNonUniformFMax: return "GroupNonUniformFMax"; |
358 | case spv::OpGroupNonUniformBitwiseAnd: return "GroupNonUniformBitwiseAnd"; |
359 | case spv::OpGroupNonUniformBitwiseOr: return "GroupNonUniformBitwiseOr"; |
360 | case spv::OpGroupNonUniformBitwiseXor: return "GroupNonUniformBitwiseXor"; |
361 | case spv::OpGroupNonUniformLogicalAnd: return "GroupNonUniformLogicalAnd"; |
362 | case spv::OpGroupNonUniformLogicalOr: return "GroupNonUniformLogicalOr"; |
363 | case spv::OpGroupNonUniformLogicalXor: return "GroupNonUniformLogicalXor"; |
364 | case spv::OpGroupNonUniformQuadBroadcast: return "GroupNonUniformQuadBroadcast"; |
365 | case spv::OpGroupNonUniformQuadSwap: return "GroupNonUniformQuadSwap"; |
366 | case spv::OpSubgroupBallotKHR: return "SubgroupBallotKHR"; |
367 | case spv::OpSubgroupFirstInvocationKHR: return "SubgroupFirstInvocationKHR"; |
368 | case spv::OpSubgroupAllKHR: return "SubgroupAllKHR"; |
369 | case spv::OpSubgroupAnyKHR: return "SubgroupAnyKHR"; |
370 | case spv::OpSubgroupAllEqualKHR: return "SubgroupAllEqualKHR"; |
371 | case spv::OpSubgroupReadInvocationKHR: return "SubgroupReadInvocationKHR"; |
372 | case spv::OpGroupIAddNonUniformAMD: return "GroupIAddNonUniformAMD"; |
373 | case spv::OpGroupFAddNonUniformAMD: return "GroupFAddNonUniformAMD"; |
374 | case spv::OpGroupFMinNonUniformAMD: return "GroupFMinNonUniformAMD"; |
375 | case spv::OpGroupUMinNonUniformAMD: return "GroupUMinNonUniformAMD"; |
376 | case spv::OpGroupSMinNonUniformAMD: return "GroupSMinNonUniformAMD"; |
377 | case spv::OpGroupFMaxNonUniformAMD: return "GroupFMaxNonUniformAMD"; |
378 | case spv::OpGroupUMaxNonUniformAMD: return "GroupUMaxNonUniformAMD"; |
379 | case spv::OpGroupSMaxNonUniformAMD: return "GroupSMaxNonUniformAMD"; |
380 | case spv::OpFragmentMaskFetchAMD: return "FragmentMaskFetchAMD"; |
381 | case spv::OpFragmentFetchAMD: return "FragmentFetchAMD"; |
382 | case spv::OpImageSampleFootprintNV: return "ImageSampleFootprintNV"; |
383 | case spv::OpGroupNonUniformPartitionNV: return "GroupNonUniformPartitionNV"; |
384 | case spv::OpWritePackedPrimitiveIndices4x8NV: return "WritePackedPrimitiveIndices4x8NV"; |
385 | case spv::OpReportIntersectionNV: return "ReportIntersectionNV"; |
386 | case spv::OpIgnoreIntersectionNV: return "IgnoreIntersectionNV"; |
387 | case spv::OpTerminateRayNV: return "TerminateRayNV"; |
388 | case spv::OpTraceNV: return "TraceNV"; |
389 | case spv::OpTypeAccelerationStructureNV: return "TypeAccelerationStructureNV"; |
390 | case spv::OpExecuteCallableNV: return "ExecuteCallableNV"; |
391 | case spv::OpSubgroupShuffleINTEL: return "SubgroupShuffleINTEL"; |
392 | case spv::OpSubgroupShuffleDownINTEL: return "SubgroupShuffleDownINTEL"; |
393 | case spv::OpSubgroupShuffleUpINTEL: return "SubgroupShuffleUpINTEL"; |
394 | case spv::OpSubgroupShuffleXorINTEL: return "SubgroupShuffleXorINTEL"; |
395 | case spv::OpSubgroupBlockReadINTEL: return "SubgroupBlockReadINTEL"; |
396 | case spv::OpSubgroupBlockWriteINTEL: return "SubgroupBlockWriteINTEL"; |
397 | case spv::OpSubgroupImageBlockReadINTEL: return "SubgroupImageBlockReadINTEL"; |
398 | case spv::OpSubgroupImageBlockWriteINTEL: return "SubgroupImageBlockWriteINTEL"; |
399 | case spv::OpDecorateStringGOOGLE: return "DecorateStringGOOGLE"; |
400 | case spv::OpMemberDecorateStringGOOGLE: return "MemberDecorateStringGOOGLE"; |
401 | case spv::OpMax: return "Max"; |
402 | default: |
403 | break; |
404 | } |
405 | #endif // NDEBUG |
406 | |
407 | return "Opcode<"+ std::to_string(static_cast<int>(op)) + ">"; |
408 | } |
409 | |
410 | } // namespace sw |
411 |