1 //
2 // Copyright (C) 2014-2015 LunarG, Inc.
3 // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
4 //
5 // All rights reserved.
6 //
7 // Redistribution and use in source and binary forms, with or without
8 // modification, are permitted provided that the following conditions
9 // are met:
10 //
11 //    Redistributions of source code must retain the above copyright
12 //    notice, this list of conditions and the following disclaimer.
13 //
14 //    Redistributions in binary form must reproduce the above
15 //    copyright notice, this list of conditions and the following
16 //    disclaimer in the documentation and/or other materials provided
17 //    with the distribution.
18 //
19 //    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
20 //    contributors may be used to endorse or promote products derived
21 //    from this software without specific prior written permission.
22 //
23 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27 // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 // POSSIBILITY OF SUCH DAMAGE.
35 
36 //
37 // 1) Programmatically fill in instruction/operand information.
38 //    This can be used for disassembly, printing documentation, etc.
39 //
40 // 2) Print documentation from this parameterization.
41 //
42 
43 #include "doc.h"
44 
45 #include <cstdio>
46 #include <cstring>
47 #include <algorithm>
48 
49 namespace spv {
50     extern "C" {
51         // Include C-based headers that don't have a namespace
52         #include "GLSL.ext.KHR.h"
53         #include "GLSL.ext.EXT.h"
54         #include "GLSL.ext.AMD.h"
55         #include "GLSL.ext.NV.h"
56     }
57 }
58 
59 namespace spv {
60 
61 //
62 // Whole set of functions that translate enumerants to their text strings for
63 // the specification (or their sanitized versions for auto-generating the
64 // spirv headers.
65 //
66 // Also, for masks the ceilings are declared next to these, to help keep them in sync.
67 // Ceilings should be
68 //  - one more than the maximum value an enumerant takes on, for non-mask enumerants
69 //    (for non-sparse enums, this is the number of enumerants)
70 //  - the number of bits consumed by the set of masks
71 //    (for non-sparse mask enums, this is the number of enumerants)
72 //
73 
SourceString(int source)74 const char* SourceString(int source)
75 {
76     switch (source) {
77     case 0:  return "Unknown";
78     case 1:  return "ESSL";
79     case 2:  return "GLSL";
80     case 3:  return "OpenCL_C";
81     case 4:  return "OpenCL_CPP";
82     case 5:  return "HLSL";
83 
84     default: return "Bad";
85     }
86 }
87 
ExecutionModelString(int model)88 const char* ExecutionModelString(int model)
89 {
90     switch (model) {
91     case 0:  return "Vertex";
92     case 1:  return "TessellationControl";
93     case 2:  return "TessellationEvaluation";
94     case 3:  return "Geometry";
95     case 4:  return "Fragment";
96     case 5:  return "GLCompute";
97     case 6:  return "Kernel";
98     case ExecutionModelTaskNV: return "TaskNV";
99     case ExecutionModelMeshNV: return "MeshNV";
100 
101     default: return "Bad";
102 
103     case ExecutionModelRayGenerationKHR: return "RayGenerationKHR";
104     case ExecutionModelIntersectionKHR:  return "IntersectionKHR";
105     case ExecutionModelAnyHitKHR:        return "AnyHitKHR";
106     case ExecutionModelClosestHitKHR:    return "ClosestHitKHR";
107     case ExecutionModelMissKHR:          return "MissKHR";
108     case ExecutionModelCallableKHR:      return "CallableKHR";
109     }
110 }
111 
AddressingString(int addr)112 const char* AddressingString(int addr)
113 {
114     switch (addr) {
115     case 0:  return "Logical";
116     case 1:  return "Physical32";
117     case 2:  return "Physical64";
118 
119     case AddressingModelPhysicalStorageBuffer64EXT: return "PhysicalStorageBuffer64EXT";
120 
121     default: return "Bad";
122     }
123 }
124 
MemoryString(int mem)125 const char* MemoryString(int mem)
126 {
127     switch (mem) {
128     case MemoryModelSimple:     return "Simple";
129     case MemoryModelGLSL450:    return "GLSL450";
130     case MemoryModelOpenCL:     return "OpenCL";
131     case MemoryModelVulkanKHR:  return "VulkanKHR";
132 
133     default: return "Bad";
134     }
135 }
136 
137 const int ExecutionModeCeiling = 40;
138 
ExecutionModeString(int mode)139 const char* ExecutionModeString(int mode)
140 {
141     switch (mode) {
142     case 0:  return "Invocations";
143     case 1:  return "SpacingEqual";
144     case 2:  return "SpacingFractionalEven";
145     case 3:  return "SpacingFractionalOdd";
146     case 4:  return "VertexOrderCw";
147     case 5:  return "VertexOrderCcw";
148     case 6:  return "PixelCenterInteger";
149     case 7:  return "OriginUpperLeft";
150     case 8:  return "OriginLowerLeft";
151     case 9:  return "EarlyFragmentTests";
152     case 10: return "PointMode";
153     case 11: return "Xfb";
154     case 12: return "DepthReplacing";
155     case 13: return "Bad";
156     case 14: return "DepthGreater";
157     case 15: return "DepthLess";
158     case 16: return "DepthUnchanged";
159     case 17: return "LocalSize";
160     case 18: return "LocalSizeHint";
161     case 19: return "InputPoints";
162     case 20: return "InputLines";
163     case 21: return "InputLinesAdjacency";
164     case 22: return "Triangles";
165     case 23: return "InputTrianglesAdjacency";
166     case 24: return "Quads";
167     case 25: return "Isolines";
168     case 26: return "OutputVertices";
169     case 27: return "OutputPoints";
170     case 28: return "OutputLineStrip";
171     case 29: return "OutputTriangleStrip";
172     case 30: return "VecTypeHint";
173     case 31: return "ContractionOff";
174     case 32: return "Bad";
175 
176     case ExecutionModeInitializer:              return "Initializer";
177     case ExecutionModeFinalizer:                return "Finalizer";
178     case ExecutionModeSubgroupSize:             return "SubgroupSize";
179     case ExecutionModeSubgroupsPerWorkgroup:    return "SubgroupsPerWorkgroup";
180     case ExecutionModeSubgroupsPerWorkgroupId:  return "SubgroupsPerWorkgroupId";
181     case ExecutionModeLocalSizeId:              return "LocalSizeId";
182     case ExecutionModeLocalSizeHintId:          return "LocalSizeHintId";
183 
184     case ExecutionModePostDepthCoverage:        return "PostDepthCoverage";
185     case ExecutionModeDenormPreserve:           return "DenormPreserve";
186     case ExecutionModeDenormFlushToZero:        return "DenormFlushToZero";
187     case ExecutionModeSignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve";
188     case ExecutionModeRoundingModeRTE:          return "RoundingModeRTE";
189     case ExecutionModeRoundingModeRTZ:          return "RoundingModeRTZ";
190     case ExecutionModeStencilRefReplacingEXT:   return "StencilRefReplacingEXT";
191 
192     case ExecutionModeOutputLinesNV:            return "OutputLinesNV";
193     case ExecutionModeOutputPrimitivesNV:       return "OutputPrimitivesNV";
194     case ExecutionModeOutputTrianglesNV:        return "OutputTrianglesNV";
195     case ExecutionModeDerivativeGroupQuadsNV:   return "DerivativeGroupQuadsNV";
196     case ExecutionModeDerivativeGroupLinearNV:  return "DerivativeGroupLinearNV";
197 
198     case ExecutionModePixelInterlockOrderedEXT:         return "PixelInterlockOrderedEXT";
199     case ExecutionModePixelInterlockUnorderedEXT:       return "PixelInterlockUnorderedEXT";
200     case ExecutionModeSampleInterlockOrderedEXT:        return "SampleInterlockOrderedEXT";
201     case ExecutionModeSampleInterlockUnorderedEXT:      return "SampleInterlockUnorderedEXT";
202     case ExecutionModeShadingRateInterlockOrderedEXT:   return "ShadingRateInterlockOrderedEXT";
203     case ExecutionModeShadingRateInterlockUnorderedEXT: return "ShadingRateInterlockUnorderedEXT";
204 
205     case ExecutionModeMaxWorkgroupSizeINTEL:    return "MaxWorkgroupSizeINTEL";
206     case ExecutionModeMaxWorkDimINTEL:          return "MaxWorkDimINTEL";
207     case ExecutionModeNoGlobalOffsetINTEL:      return "NoGlobalOffsetINTEL";
208     case ExecutionModeNumSIMDWorkitemsINTEL:    return "NumSIMDWorkitemsINTEL";
209 
210     case ExecutionModeCeiling:
211     default: return "Bad";
212     }
213 }
214 
StorageClassString(int StorageClass)215 const char* StorageClassString(int StorageClass)
216 {
217     switch (StorageClass) {
218     case 0:  return "UniformConstant";
219     case 1:  return "Input";
220     case 2:  return "Uniform";
221     case 3:  return "Output";
222     case 4:  return "Workgroup";
223     case 5:  return "CrossWorkgroup";
224     case 6:  return "Private";
225     case 7:  return "Function";
226     case 8:  return "Generic";
227     case 9:  return "PushConstant";
228     case 10: return "AtomicCounter";
229     case 11: return "Image";
230     case 12: return "StorageBuffer";
231 
232     case StorageClassRayPayloadKHR:            return "RayPayloadKHR";
233     case StorageClassHitAttributeKHR:          return "HitAttributeKHR";
234     case StorageClassIncomingRayPayloadKHR:    return "IncomingRayPayloadKHR";
235     case StorageClassShaderRecordBufferKHR:    return "ShaderRecordBufferKHR";
236     case StorageClassCallableDataKHR:          return "CallableDataKHR";
237     case StorageClassIncomingCallableDataKHR:  return "IncomingCallableDataKHR";
238 
239     case StorageClassPhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT";
240 
241     default: return "Bad";
242     }
243 }
244 
245 const int DecorationCeiling = 45;
246 
DecorationString(int decoration)247 const char* DecorationString(int decoration)
248 {
249     switch (decoration) {
250     case 0:  return "RelaxedPrecision";
251     case 1:  return "SpecId";
252     case 2:  return "Block";
253     case 3:  return "BufferBlock";
254     case 4:  return "RowMajor";
255     case 5:  return "ColMajor";
256     case 6:  return "ArrayStride";
257     case 7:  return "MatrixStride";
258     case 8:  return "GLSLShared";
259     case 9:  return "GLSLPacked";
260     case 10: return "CPacked";
261     case 11: return "BuiltIn";
262     case 12: return "Bad";
263     case 13: return "NoPerspective";
264     case 14: return "Flat";
265     case 15: return "Patch";
266     case 16: return "Centroid";
267     case 17: return "Sample";
268     case 18: return "Invariant";
269     case 19: return "Restrict";
270     case 20: return "Aliased";
271     case 21: return "Volatile";
272     case 22: return "Constant";
273     case 23: return "Coherent";
274     case 24: return "NonWritable";
275     case 25: return "NonReadable";
276     case 26: return "Uniform";
277     case 27: return "Bad";
278     case 28: return "SaturatedConversion";
279     case 29: return "Stream";
280     case 30: return "Location";
281     case 31: return "Component";
282     case 32: return "Index";
283     case 33: return "Binding";
284     case 34: return "DescriptorSet";
285     case 35: return "Offset";
286     case 36: return "XfbBuffer";
287     case 37: return "XfbStride";
288     case 38: return "FuncParamAttr";
289     case 39: return "FP Rounding Mode";
290     case 40: return "FP Fast Math Mode";
291     case 41: return "Linkage Attributes";
292     case 42: return "NoContraction";
293     case 43: return "InputAttachmentIndex";
294     case 44: return "Alignment";
295 
296     case DecorationCeiling:
297     default:  return "Bad";
298 
299     case DecorationExplicitInterpAMD: return "ExplicitInterpAMD";
300     case DecorationOverrideCoverageNV:          return "OverrideCoverageNV";
301     case DecorationPassthroughNV:               return "PassthroughNV";
302     case DecorationViewportRelativeNV:          return "ViewportRelativeNV";
303     case DecorationSecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV";
304     case DecorationPerPrimitiveNV:              return "PerPrimitiveNV";
305     case DecorationPerViewNV:                   return "PerViewNV";
306     case DecorationPerTaskNV:                   return "PerTaskNV";
307     case DecorationPerVertexNV:                 return "PerVertexNV";
308 
309     case DecorationNonUniformEXT:           return "DecorationNonUniformEXT";
310     case DecorationHlslCounterBufferGOOGLE: return "DecorationHlslCounterBufferGOOGLE";
311     case DecorationHlslSemanticGOOGLE:      return "DecorationHlslSemanticGOOGLE";
312     case DecorationRestrictPointerEXT:      return "DecorationRestrictPointerEXT";
313     case DecorationAliasedPointerEXT:       return "DecorationAliasedPointerEXT";
314     }
315 }
316 
BuiltInString(int builtIn)317 const char* BuiltInString(int builtIn)
318 {
319     switch (builtIn) {
320     case 0:  return "Position";
321     case 1:  return "PointSize";
322     case 2:  return "Bad";
323     case 3:  return "ClipDistance";
324     case 4:  return "CullDistance";
325     case 5:  return "VertexId";
326     case 6:  return "InstanceId";
327     case 7:  return "PrimitiveId";
328     case 8:  return "InvocationId";
329     case 9:  return "Layer";
330     case 10: return "ViewportIndex";
331     case 11: return "TessLevelOuter";
332     case 12: return "TessLevelInner";
333     case 13: return "TessCoord";
334     case 14: return "PatchVertices";
335     case 15: return "FragCoord";
336     case 16: return "PointCoord";
337     case 17: return "FrontFacing";
338     case 18: return "SampleId";
339     case 19: return "SamplePosition";
340     case 20: return "SampleMask";
341     case 21: return "Bad";
342     case 22: return "FragDepth";
343     case 23: return "HelperInvocation";
344     case 24: return "NumWorkgroups";
345     case 25: return "WorkgroupSize";
346     case 26: return "WorkgroupId";
347     case 27: return "LocalInvocationId";
348     case 28: return "GlobalInvocationId";
349     case 29: return "LocalInvocationIndex";
350     case 30: return "WorkDim";
351     case 31: return "GlobalSize";
352     case 32: return "EnqueuedWorkgroupSize";
353     case 33: return "GlobalOffset";
354     case 34: return "GlobalLinearId";
355     case 35: return "Bad";
356     case 36: return "SubgroupSize";
357     case 37: return "SubgroupMaxSize";
358     case 38: return "NumSubgroups";
359     case 39: return "NumEnqueuedSubgroups";
360     case 40: return "SubgroupId";
361     case 41: return "SubgroupLocalInvocationId";
362     case 42: return "VertexIndex";                 // TBD: put next to VertexId?
363     case 43: return "InstanceIndex";               // TBD: put next to InstanceId?
364 
365     case 4416: return "SubgroupEqMaskKHR";
366     case 4417: return "SubgroupGeMaskKHR";
367     case 4418: return "SubgroupGtMaskKHR";
368     case 4419: return "SubgroupLeMaskKHR";
369     case 4420: return "SubgroupLtMaskKHR";
370     case 4438: return "DeviceIndex";
371     case 4440: return "ViewIndex";
372     case 4424: return "BaseVertex";
373     case 4425: return "BaseInstance";
374     case 4426: return "DrawIndex";
375     case 4432: return "PrimitiveShadingRateKHR";
376     case 4444: return "ShadingRateKHR";
377     case 5014: return "FragStencilRefEXT";
378 
379     case 4992: return "BaryCoordNoPerspAMD";
380     case 4993: return "BaryCoordNoPerspCentroidAMD";
381     case 4994: return "BaryCoordNoPerspSampleAMD";
382     case 4995: return "BaryCoordSmoothAMD";
383     case 4996: return "BaryCoordSmoothCentroidAMD";
384     case 4997: return "BaryCoordSmoothSampleAMD";
385     case 4998: return "BaryCoordPullModelAMD";
386     case BuiltInLaunchIdKHR:                 return "LaunchIdKHR";
387     case BuiltInLaunchSizeKHR:               return "LaunchSizeKHR";
388     case BuiltInWorldRayOriginKHR:           return "WorldRayOriginKHR";
389     case BuiltInWorldRayDirectionKHR:        return "WorldRayDirectionKHR";
390     case BuiltInObjectRayOriginKHR:          return "ObjectRayOriginKHR";
391     case BuiltInObjectRayDirectionKHR:       return "ObjectRayDirectionKHR";
392     case BuiltInRayTminKHR:                  return "RayTminKHR";
393     case BuiltInRayTmaxKHR:                  return "RayTmaxKHR";
394     case BuiltInInstanceCustomIndexKHR:      return "InstanceCustomIndexKHR";
395     case BuiltInRayGeometryIndexKHR:         return "RayGeometryIndexKHR";
396     case BuiltInObjectToWorldKHR:            return "ObjectToWorldKHR";
397     case BuiltInWorldToObjectKHR:            return "WorldToObjectKHR";
398     case BuiltInHitTNV:                      return "HitTNV";
399     case BuiltInHitKindKHR:                  return "HitKindKHR";
400     case BuiltInIncomingRayFlagsKHR:         return "IncomingRayFlagsKHR";
401     case BuiltInViewportMaskNV:              return "ViewportMaskNV";
402     case BuiltInSecondaryPositionNV:         return "SecondaryPositionNV";
403     case BuiltInSecondaryViewportMaskNV:     return "SecondaryViewportMaskNV";
404     case BuiltInPositionPerViewNV:           return "PositionPerViewNV";
405     case BuiltInViewportMaskPerViewNV:       return "ViewportMaskPerViewNV";
406 //    case BuiltInFragmentSizeNV:             return "FragmentSizeNV";        // superseded by BuiltInFragSizeEXT
407 //    case BuiltInInvocationsPerPixelNV:      return "InvocationsPerPixelNV"; // superseded by BuiltInFragInvocationCountEXT
408     case BuiltInBaryCoordNV:                 return "BaryCoordNV";
409     case BuiltInBaryCoordNoPerspNV:          return "BaryCoordNoPerspNV";
410 
411     case BuiltInFragSizeEXT:                 return "FragSizeEXT";
412     case BuiltInFragInvocationCountEXT:      return "FragInvocationCountEXT";
413 
414     case 5264: return "FullyCoveredEXT";
415 
416     case BuiltInTaskCountNV:           return "TaskCountNV";
417     case BuiltInPrimitiveCountNV:      return "PrimitiveCountNV";
418     case BuiltInPrimitiveIndicesNV:    return "PrimitiveIndicesNV";
419     case BuiltInClipDistancePerViewNV: return "ClipDistancePerViewNV";
420     case BuiltInCullDistancePerViewNV: return "CullDistancePerViewNV";
421     case BuiltInLayerPerViewNV:        return "LayerPerViewNV";
422     case BuiltInMeshViewCountNV:       return "MeshViewCountNV";
423     case BuiltInMeshViewIndicesNV:     return "MeshViewIndicesNV";
424     case BuiltInWarpsPerSMNV:           return "WarpsPerSMNV";
425     case BuiltInSMCountNV:              return "SMCountNV";
426     case BuiltInWarpIDNV:               return "WarpIDNV";
427     case BuiltInSMIDNV:                 return "SMIDNV";
428 
429     default: return "Bad";
430     }
431 }
432 
DimensionString(int dim)433 const char* DimensionString(int dim)
434 {
435     switch (dim) {
436     case 0:  return "1D";
437     case 1:  return "2D";
438     case 2:  return "3D";
439     case 3:  return "Cube";
440     case 4:  return "Rect";
441     case 5:  return "Buffer";
442     case 6:  return "SubpassData";
443 
444     default: return "Bad";
445     }
446 }
447 
SamplerAddressingModeString(int mode)448 const char* SamplerAddressingModeString(int mode)
449 {
450     switch (mode) {
451     case 0:  return "None";
452     case 1:  return "ClampToEdge";
453     case 2:  return "Clamp";
454     case 3:  return "Repeat";
455     case 4:  return "RepeatMirrored";
456 
457     default: return "Bad";
458     }
459 }
460 
SamplerFilterModeString(int mode)461 const char* SamplerFilterModeString(int mode)
462 {
463     switch (mode) {
464     case 0: return "Nearest";
465     case 1: return "Linear";
466 
467     default: return "Bad";
468     }
469 }
470 
ImageFormatString(int format)471 const char* ImageFormatString(int format)
472 {
473     switch (format) {
474     case  0: return "Unknown";
475 
476     // ES/Desktop float
477     case  1: return "Rgba32f";
478     case  2: return "Rgba16f";
479     case  3: return "R32f";
480     case  4: return "Rgba8";
481     case  5: return "Rgba8Snorm";
482 
483     // Desktop float
484     case  6: return "Rg32f";
485     case  7: return "Rg16f";
486     case  8: return "R11fG11fB10f";
487     case  9: return "R16f";
488     case 10: return "Rgba16";
489     case 11: return "Rgb10A2";
490     case 12: return "Rg16";
491     case 13: return "Rg8";
492     case 14: return "R16";
493     case 15: return "R8";
494     case 16: return "Rgba16Snorm";
495     case 17: return "Rg16Snorm";
496     case 18: return "Rg8Snorm";
497     case 19: return "R16Snorm";
498     case 20: return "R8Snorm";
499 
500     // ES/Desktop int
501     case 21: return "Rgba32i";
502     case 22: return "Rgba16i";
503     case 23: return "Rgba8i";
504     case 24: return "R32i";
505 
506     // Desktop int
507     case 25: return "Rg32i";
508     case 26: return "Rg16i";
509     case 27: return "Rg8i";
510     case 28: return "R16i";
511     case 29: return "R8i";
512 
513     // ES/Desktop uint
514     case 30: return "Rgba32ui";
515     case 31: return "Rgba16ui";
516     case 32: return "Rgba8ui";
517     case 33: return "R32ui";
518 
519     // Desktop uint
520     case 34: return "Rgb10a2ui";
521     case 35: return "Rg32ui";
522     case 36: return "Rg16ui";
523     case 37: return "Rg8ui";
524     case 38: return "R16ui";
525     case 39: return "R8ui";
526     case 40: return "R64ui";
527     case 41: return "R64i";
528 
529     default:
530         return "Bad";
531     }
532 }
533 
ImageChannelOrderString(int format)534 const char* ImageChannelOrderString(int format)
535 {
536     switch (format) {
537     case 0:  return "R";
538     case 1:  return "A";
539     case 2:  return "RG";
540     case 3:  return "RA";
541     case 4:  return "RGB";
542     case 5:  return "RGBA";
543     case 6:  return "BGRA";
544     case 7:  return "ARGB";
545     case 8:  return "Intensity";
546     case 9:  return "Luminance";
547     case 10: return "Rx";
548     case 11: return "RGx";
549     case 12: return "RGBx";
550     case 13: return "Depth";
551     case 14: return "DepthStencil";
552     case 15: return "sRGB";
553     case 16: return "sRGBx";
554     case 17: return "sRGBA";
555     case 18: return "sBGRA";
556 
557     default:
558         return "Bad";
559     }
560 }
561 
ImageChannelDataTypeString(int type)562 const char* ImageChannelDataTypeString(int type)
563 {
564     switch (type)
565     {
566     case 0: return "SnormInt8";
567     case 1: return "SnormInt16";
568     case 2: return "UnormInt8";
569     case 3: return "UnormInt16";
570     case 4: return "UnormShort565";
571     case 5: return "UnormShort555";
572     case 6: return "UnormInt101010";
573     case 7: return "SignedInt8";
574     case 8: return "SignedInt16";
575     case 9: return "SignedInt32";
576     case 10: return "UnsignedInt8";
577     case 11: return "UnsignedInt16";
578     case 12: return "UnsignedInt32";
579     case 13: return "HalfFloat";
580     case 14: return "Float";
581     case 15: return "UnormInt24";
582     case 16: return "UnormInt101010_2";
583 
584     default:
585         return "Bad";
586     }
587 }
588 
589 const int ImageOperandsCeiling = 14;
590 
ImageOperandsString(int format)591 const char* ImageOperandsString(int format)
592 {
593     switch (format) {
594     case ImageOperandsBiasShift:                    return "Bias";
595     case ImageOperandsLodShift:                     return "Lod";
596     case ImageOperandsGradShift:                    return "Grad";
597     case ImageOperandsConstOffsetShift:             return "ConstOffset";
598     case ImageOperandsOffsetShift:                  return "Offset";
599     case ImageOperandsConstOffsetsShift:            return "ConstOffsets";
600     case ImageOperandsSampleShift:                  return "Sample";
601     case ImageOperandsMinLodShift:                  return "MinLod";
602     case ImageOperandsMakeTexelAvailableKHRShift:   return "MakeTexelAvailableKHR";
603     case ImageOperandsMakeTexelVisibleKHRShift:     return "MakeTexelVisibleKHR";
604     case ImageOperandsNonPrivateTexelKHRShift:      return "NonPrivateTexelKHR";
605     case ImageOperandsVolatileTexelKHRShift:        return "VolatileTexelKHR";
606     case ImageOperandsSignExtendShift:              return "SignExtend";
607     case ImageOperandsZeroExtendShift:              return "ZeroExtend";
608 
609     case ImageOperandsCeiling:
610     default:
611         return "Bad";
612     }
613 }
614 
FPFastMathString(int mode)615 const char* FPFastMathString(int mode)
616 {
617     switch (mode) {
618     case 0: return "NotNaN";
619     case 1: return "NotInf";
620     case 2: return "NSZ";
621     case 3: return "AllowRecip";
622     case 4: return "Fast";
623 
624     default:     return "Bad";
625     }
626 }
627 
FPRoundingModeString(int mode)628 const char* FPRoundingModeString(int mode)
629 {
630     switch (mode) {
631     case 0:  return "RTE";
632     case 1:  return "RTZ";
633     case 2:  return "RTP";
634     case 3:  return "RTN";
635 
636     default: return "Bad";
637     }
638 }
639 
LinkageTypeString(int type)640 const char* LinkageTypeString(int type)
641 {
642     switch (type) {
643     case 0:  return "Export";
644     case 1:  return "Import";
645 
646     default: return "Bad";
647     }
648 }
649 
FuncParamAttrString(int attr)650 const char* FuncParamAttrString(int attr)
651 {
652     switch (attr) {
653     case 0:  return "Zext";
654     case 1:  return "Sext";
655     case 2:  return "ByVal";
656     case 3:  return "Sret";
657     case 4:  return "NoAlias";
658     case 5:  return "NoCapture";
659     case 6:  return "NoWrite";
660     case 7:  return "NoReadWrite";
661 
662     default: return "Bad";
663     }
664 }
665 
AccessQualifierString(int attr)666 const char* AccessQualifierString(int attr)
667 {
668     switch (attr) {
669     case 0:  return "ReadOnly";
670     case 1:  return "WriteOnly";
671     case 2:  return "ReadWrite";
672 
673     default: return "Bad";
674     }
675 }
676 
677 const int SelectControlCeiling = 2;
678 
SelectControlString(int cont)679 const char* SelectControlString(int cont)
680 {
681     switch (cont) {
682     case 0:  return "Flatten";
683     case 1:  return "DontFlatten";
684 
685     case SelectControlCeiling:
686     default: return "Bad";
687     }
688 }
689 
690 const int LoopControlCeiling = LoopControlPartialCountShift + 1;
691 
LoopControlString(int cont)692 const char* LoopControlString(int cont)
693 {
694     switch (cont) {
695     case LoopControlUnrollShift:             return "Unroll";
696     case LoopControlDontUnrollShift:         return "DontUnroll";
697     case LoopControlDependencyInfiniteShift: return "DependencyInfinite";
698     case LoopControlDependencyLengthShift:   return "DependencyLength";
699     case LoopControlMinIterationsShift:      return "MinIterations";
700     case LoopControlMaxIterationsShift:      return "MaxIterations";
701     case LoopControlIterationMultipleShift:  return "IterationMultiple";
702     case LoopControlPeelCountShift:          return "PeelCount";
703     case LoopControlPartialCountShift:       return "PartialCount";
704 
705     case LoopControlCeiling:
706     default: return "Bad";
707     }
708 }
709 
710 const int FunctionControlCeiling = 4;
711 
FunctionControlString(int cont)712 const char* FunctionControlString(int cont)
713 {
714     switch (cont) {
715     case 0:  return "Inline";
716     case 1:  return "DontInline";
717     case 2:  return "Pure";
718     case 3:  return "Const";
719 
720     case FunctionControlCeiling:
721     default: return "Bad";
722     }
723 }
724 
MemorySemanticsString(int mem)725 const char* MemorySemanticsString(int mem)
726 {
727     // Note: No bits set (None) means "Relaxed"
728     switch (mem) {
729     case 0: return "Bad"; // Note: this is a placeholder for 'Consume'
730     case 1: return "Acquire";
731     case 2: return "Release";
732     case 3: return "AcquireRelease";
733     case 4: return "SequentiallyConsistent";
734     case 5: return "Bad"; // Note: reserved for future expansion
735     case 6: return "UniformMemory";
736     case 7: return "SubgroupMemory";
737     case 8: return "WorkgroupMemory";
738     case 9: return "CrossWorkgroupMemory";
739     case 10: return "AtomicCounterMemory";
740     case 11: return "ImageMemory";
741 
742     default:     return "Bad";
743     }
744 }
745 
746 const int MemoryAccessCeiling = 6;
747 
MemoryAccessString(int mem)748 const char* MemoryAccessString(int mem)
749 {
750     switch (mem) {
751     case MemoryAccessVolatileShift:                 return "Volatile";
752     case MemoryAccessAlignedShift:                  return "Aligned";
753     case MemoryAccessNontemporalShift:              return "Nontemporal";
754     case MemoryAccessMakePointerAvailableKHRShift:  return "MakePointerAvailableKHR";
755     case MemoryAccessMakePointerVisibleKHRShift:    return "MakePointerVisibleKHR";
756     case MemoryAccessNonPrivatePointerKHRShift:     return "NonPrivatePointerKHR";
757 
758     default: return "Bad";
759     }
760 }
761 
ScopeString(int mem)762 const char* ScopeString(int mem)
763 {
764     switch (mem) {
765     case 0:  return "CrossDevice";
766     case 1:  return "Device";
767     case 2:  return "Workgroup";
768     case 3:  return "Subgroup";
769     case 4:  return "Invocation";
770 
771     default: return "Bad";
772     }
773 }
774 
GroupOperationString(int gop)775 const char* GroupOperationString(int gop)
776 {
777 
778     switch (gop)
779     {
780     case GroupOperationReduce:  return "Reduce";
781     case GroupOperationInclusiveScan:  return "InclusiveScan";
782     case GroupOperationExclusiveScan:  return "ExclusiveScan";
783     case GroupOperationClusteredReduce:  return "ClusteredReduce";
784     case GroupOperationPartitionedReduceNV:  return "PartitionedReduceNV";
785     case GroupOperationPartitionedInclusiveScanNV:  return "PartitionedInclusiveScanNV";
786     case GroupOperationPartitionedExclusiveScanNV:  return "PartitionedExclusiveScanNV";
787 
788     default: return "Bad";
789     }
790 }
791 
KernelEnqueueFlagsString(int flag)792 const char* KernelEnqueueFlagsString(int flag)
793 {
794     switch (flag)
795     {
796     case 0:  return "NoWait";
797     case 1:  return "WaitKernel";
798     case 2:  return "WaitWorkGroup";
799 
800     default: return "Bad";
801     }
802 }
803 
KernelProfilingInfoString(int info)804 const char* KernelProfilingInfoString(int info)
805 {
806     switch (info)
807     {
808     case 0:  return "CmdExecTime";
809 
810     default: return "Bad";
811     }
812 }
813 
CapabilityString(int info)814 const char* CapabilityString(int info)
815 {
816     switch (info)
817     {
818     case 0:  return "Matrix";
819     case 1:  return "Shader";
820     case 2:  return "Geometry";
821     case 3:  return "Tessellation";
822     case 4:  return "Addresses";
823     case 5:  return "Linkage";
824     case 6:  return "Kernel";
825     case 7:  return "Vector16";
826     case 8:  return "Float16Buffer";
827     case 9:  return "Float16";
828     case 10: return "Float64";
829     case 11: return "Int64";
830     case 12: return "Int64Atomics";
831     case 13: return "ImageBasic";
832     case 14: return "ImageReadWrite";
833     case 15: return "ImageMipmap";
834     case 16: return "Bad";
835     case 17: return "Pipes";
836     case 18: return "Groups";
837     case 19: return "DeviceEnqueue";
838     case 20: return "LiteralSampler";
839     case 21: return "AtomicStorage";
840     case 22: return "Int16";
841     case 23: return "TessellationPointSize";
842     case 24: return "GeometryPointSize";
843     case 25: return "ImageGatherExtended";
844     case 26: return "Bad";
845     case 27: return "StorageImageMultisample";
846     case 28: return "UniformBufferArrayDynamicIndexing";
847     case 29: return "SampledImageArrayDynamicIndexing";
848     case 30: return "StorageBufferArrayDynamicIndexing";
849     case 31: return "StorageImageArrayDynamicIndexing";
850     case 32: return "ClipDistance";
851     case 33: return "CullDistance";
852     case 34: return "ImageCubeArray";
853     case 35: return "SampleRateShading";
854     case 36: return "ImageRect";
855     case 37: return "SampledRect";
856     case 38: return "GenericPointer";
857     case 39: return "Int8";
858     case 40: return "InputAttachment";
859     case 41: return "SparseResidency";
860     case 42: return "MinLod";
861     case 43: return "Sampled1D";
862     case 44: return "Image1D";
863     case 45: return "SampledCubeArray";
864     case 46: return "SampledBuffer";
865     case 47: return "ImageBuffer";
866     case 48: return "ImageMSArray";
867     case 49: return "StorageImageExtendedFormats";
868     case 50: return "ImageQuery";
869     case 51: return "DerivativeControl";
870     case 52: return "InterpolationFunction";
871     case 53: return "TransformFeedback";
872     case 54: return "GeometryStreams";
873     case 55: return "StorageImageReadWithoutFormat";
874     case 56: return "StorageImageWriteWithoutFormat";
875     case 57: return "MultiViewport";
876     case 61: return "GroupNonUniform";
877     case 62: return "GroupNonUniformVote";
878     case 63: return "GroupNonUniformArithmetic";
879     case 64: return "GroupNonUniformBallot";
880     case 65: return "GroupNonUniformShuffle";
881     case 66: return "GroupNonUniformShuffleRelative";
882     case 67: return "GroupNonUniformClustered";
883     case 68: return "GroupNonUniformQuad";
884 
885     case CapabilitySubgroupBallotKHR: return "SubgroupBallotKHR";
886     case CapabilityDrawParameters:    return "DrawParameters";
887     case CapabilitySubgroupVoteKHR:   return "SubgroupVoteKHR";
888 
889     case CapabilityStorageUniformBufferBlock16: return "StorageUniformBufferBlock16";
890     case CapabilityStorageUniform16:            return "StorageUniform16";
891     case CapabilityStoragePushConstant16:       return "StoragePushConstant16";
892     case CapabilityStorageInputOutput16:        return "StorageInputOutput16";
893 
894     case CapabilityStorageBuffer8BitAccess:             return "StorageBuffer8BitAccess";
895     case CapabilityUniformAndStorageBuffer8BitAccess:   return "UniformAndStorageBuffer8BitAccess";
896     case CapabilityStoragePushConstant8:                return "StoragePushConstant8";
897 
898     case CapabilityDeviceGroup: return "DeviceGroup";
899     case CapabilityMultiView:   return "MultiView";
900 
901     case CapabilityStencilExportEXT: return "StencilExportEXT";
902 
903     case CapabilityFloat16ImageAMD:       return "Float16ImageAMD";
904     case CapabilityImageGatherBiasLodAMD: return "ImageGatherBiasLodAMD";
905     case CapabilityFragmentMaskAMD:       return "FragmentMaskAMD";
906     case CapabilityImageReadWriteLodAMD:  return "ImageReadWriteLodAMD";
907 
908     case CapabilityAtomicStorageOps:             return "AtomicStorageOps";
909 
910     case CapabilitySampleMaskPostDepthCoverage:  return "SampleMaskPostDepthCoverage";
911     case CapabilityGeometryShaderPassthroughNV:     return "GeometryShaderPassthroughNV";
912     case CapabilityShaderViewportIndexLayerNV:      return "ShaderViewportIndexLayerNV";
913     case CapabilityShaderViewportMaskNV:            return "ShaderViewportMaskNV";
914     case CapabilityShaderStereoViewNV:              return "ShaderStereoViewNV";
915     case CapabilityPerViewAttributesNV:             return "PerViewAttributesNV";
916     case CapabilityGroupNonUniformPartitionedNV:    return "GroupNonUniformPartitionedNV";
917     case CapabilityRayTracingNV:                    return "RayTracingNV";
918     case CapabilityRayTracingKHR:                   return "RayTracingKHR";
919     case CapabilityRayQueryKHR:                     return "RayQueryKHR";
920     case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR";
921     case CapabilityComputeDerivativeGroupQuadsNV:   return "ComputeDerivativeGroupQuadsNV";
922     case CapabilityComputeDerivativeGroupLinearNV:  return "ComputeDerivativeGroupLinearNV";
923     case CapabilityFragmentBarycentricNV:           return "FragmentBarycentricNV";
924     case CapabilityMeshShadingNV:                   return "MeshShadingNV";
925     case CapabilityImageFootprintNV:                return "ImageFootprintNV";
926 //    case CapabilityShadingRateNV:                   return "ShadingRateNV";  // superseded by FragmentDensityEXT
927     case CapabilitySampleMaskOverrideCoverageNV:    return "SampleMaskOverrideCoverageNV";
928     case CapabilityFragmentDensityEXT:              return "FragmentDensityEXT";
929 
930     case CapabilityFragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT";
931 
932     case CapabilityShaderNonUniformEXT:                          return "ShaderNonUniformEXT";
933     case CapabilityRuntimeDescriptorArrayEXT:                    return "RuntimeDescriptorArrayEXT";
934     case CapabilityInputAttachmentArrayDynamicIndexingEXT:       return "InputAttachmentArrayDynamicIndexingEXT";
935     case CapabilityUniformTexelBufferArrayDynamicIndexingEXT:    return "UniformTexelBufferArrayDynamicIndexingEXT";
936     case CapabilityStorageTexelBufferArrayDynamicIndexingEXT:    return "StorageTexelBufferArrayDynamicIndexingEXT";
937     case CapabilityUniformBufferArrayNonUniformIndexingEXT:      return "UniformBufferArrayNonUniformIndexingEXT";
938     case CapabilitySampledImageArrayNonUniformIndexingEXT:       return "SampledImageArrayNonUniformIndexingEXT";
939     case CapabilityStorageBufferArrayNonUniformIndexingEXT:      return "StorageBufferArrayNonUniformIndexingEXT";
940     case CapabilityStorageImageArrayNonUniformIndexingEXT:       return "StorageImageArrayNonUniformIndexingEXT";
941     case CapabilityInputAttachmentArrayNonUniformIndexingEXT:    return "InputAttachmentArrayNonUniformIndexingEXT";
942     case CapabilityUniformTexelBufferArrayNonUniformIndexingEXT: return "UniformTexelBufferArrayNonUniformIndexingEXT";
943     case CapabilityStorageTexelBufferArrayNonUniformIndexingEXT: return "StorageTexelBufferArrayNonUniformIndexingEXT";
944 
945     case CapabilityVulkanMemoryModelKHR:                return "VulkanMemoryModelKHR";
946     case CapabilityVulkanMemoryModelDeviceScopeKHR:     return "VulkanMemoryModelDeviceScopeKHR";
947 
948     case CapabilityPhysicalStorageBufferAddressesEXT:   return "PhysicalStorageBufferAddressesEXT";
949 
950     case CapabilityVariablePointers:                    return "VariablePointers";
951 
952     case CapabilityCooperativeMatrixNV:     return "CooperativeMatrixNV";
953     case CapabilityShaderSMBuiltinsNV:      return "ShaderSMBuiltinsNV";
954 
955     case CapabilityFragmentShaderSampleInterlockEXT:        return "CapabilityFragmentShaderSampleInterlockEXT";
956     case CapabilityFragmentShaderPixelInterlockEXT:         return "CapabilityFragmentShaderPixelInterlockEXT";
957     case CapabilityFragmentShaderShadingRateInterlockEXT:   return "CapabilityFragmentShaderShadingRateInterlockEXT";
958 
959     case CapabilityFragmentShadingRateKHR:                  return "FragmentShadingRateKHR";
960 
961     case CapabilityDemoteToHelperInvocationEXT:             return "DemoteToHelperInvocationEXT";
962     case CapabilityShaderClockKHR:                          return "ShaderClockKHR";
963     case CapabilityInt64ImageEXT:                           return "Int64ImageEXT";
964 
965     case CapabilityIntegerFunctions2INTEL:              return "CapabilityIntegerFunctions2INTEL";
966 
967     case CapabilityAtomicFloat32AddEXT:                     return "AtomicFloat32AddEXT";
968     case CapabilityAtomicFloat64AddEXT:                     return "AtomicFloat64AddEXT";
969 
970     case CapabilityWorkgroupMemoryExplicitLayoutKHR:            return "CapabilityWorkgroupMemoryExplicitLayoutKHR";
971     case CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR:  return "CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR";
972     case CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR";
973 
974     default: return "Bad";
975     }
976 }
977 
OpcodeString(int op)978 const char* OpcodeString(int op)
979 {
980     switch (op) {
981     case 0:   return "OpNop";
982     case 1:   return "OpUndef";
983     case 2:   return "OpSourceContinued";
984     case 3:   return "OpSource";
985     case 4:   return "OpSourceExtension";
986     case 5:   return "OpName";
987     case 6:   return "OpMemberName";
988     case 7:   return "OpString";
989     case 8:   return "OpLine";
990     case 9:   return "Bad";
991     case 10:  return "OpExtension";
992     case 11:  return "OpExtInstImport";
993     case 12:  return "OpExtInst";
994     case 13:  return "Bad";
995     case 14:  return "OpMemoryModel";
996     case 15:  return "OpEntryPoint";
997     case 16:  return "OpExecutionMode";
998     case 17:  return "OpCapability";
999     case 18:  return "Bad";
1000     case 19:  return "OpTypeVoid";
1001     case 20:  return "OpTypeBool";
1002     case 21:  return "OpTypeInt";
1003     case 22:  return "OpTypeFloat";
1004     case 23:  return "OpTypeVector";
1005     case 24:  return "OpTypeMatrix";
1006     case 25:  return "OpTypeImage";
1007     case 26:  return "OpTypeSampler";
1008     case 27:  return "OpTypeSampledImage";
1009     case 28:  return "OpTypeArray";
1010     case 29:  return "OpTypeRuntimeArray";
1011     case 30:  return "OpTypeStruct";
1012     case 31:  return "OpTypeOpaque";
1013     case 32:  return "OpTypePointer";
1014     case 33:  return "OpTypeFunction";
1015     case 34:  return "OpTypeEvent";
1016     case 35:  return "OpTypeDeviceEvent";
1017     case 36:  return "OpTypeReserveId";
1018     case 37:  return "OpTypeQueue";
1019     case 38:  return "OpTypePipe";
1020     case 39:  return "OpTypeForwardPointer";
1021     case 40:  return "Bad";
1022     case 41:  return "OpConstantTrue";
1023     case 42:  return "OpConstantFalse";
1024     case 43:  return "OpConstant";
1025     case 44:  return "OpConstantComposite";
1026     case 45:  return "OpConstantSampler";
1027     case 46:  return "OpConstantNull";
1028     case 47:  return "Bad";
1029     case 48:  return "OpSpecConstantTrue";
1030     case 49:  return "OpSpecConstantFalse";
1031     case 50:  return "OpSpecConstant";
1032     case 51:  return "OpSpecConstantComposite";
1033     case 52:  return "OpSpecConstantOp";
1034     case 53:  return "Bad";
1035     case 54:  return "OpFunction";
1036     case 55:  return "OpFunctionParameter";
1037     case 56:  return "OpFunctionEnd";
1038     case 57:  return "OpFunctionCall";
1039     case 58:  return "Bad";
1040     case 59:  return "OpVariable";
1041     case 60:  return "OpImageTexelPointer";
1042     case 61:  return "OpLoad";
1043     case 62:  return "OpStore";
1044     case 63:  return "OpCopyMemory";
1045     case 64:  return "OpCopyMemorySized";
1046     case 65:  return "OpAccessChain";
1047     case 66:  return "OpInBoundsAccessChain";
1048     case 67:  return "OpPtrAccessChain";
1049     case 68:  return "OpArrayLength";
1050     case 69:  return "OpGenericPtrMemSemantics";
1051     case 70:  return "OpInBoundsPtrAccessChain";
1052     case 71:  return "OpDecorate";
1053     case 72:  return "OpMemberDecorate";
1054     case 73:  return "OpDecorationGroup";
1055     case 74:  return "OpGroupDecorate";
1056     case 75:  return "OpGroupMemberDecorate";
1057     case 76:  return "Bad";
1058     case 77:  return "OpVectorExtractDynamic";
1059     case 78:  return "OpVectorInsertDynamic";
1060     case 79:  return "OpVectorShuffle";
1061     case 80:  return "OpCompositeConstruct";
1062     case 81:  return "OpCompositeExtract";
1063     case 82:  return "OpCompositeInsert";
1064     case 83:  return "OpCopyObject";
1065     case 84:  return "OpTranspose";
1066     case OpCopyLogical: return "OpCopyLogical";
1067     case 85:  return "Bad";
1068     case 86:  return "OpSampledImage";
1069     case 87:  return "OpImageSampleImplicitLod";
1070     case 88:  return "OpImageSampleExplicitLod";
1071     case 89:  return "OpImageSampleDrefImplicitLod";
1072     case 90:  return "OpImageSampleDrefExplicitLod";
1073     case 91:  return "OpImageSampleProjImplicitLod";
1074     case 92:  return "OpImageSampleProjExplicitLod";
1075     case 93:  return "OpImageSampleProjDrefImplicitLod";
1076     case 94:  return "OpImageSampleProjDrefExplicitLod";
1077     case 95:  return "OpImageFetch";
1078     case 96:  return "OpImageGather";
1079     case 97:  return "OpImageDrefGather";
1080     case 98:  return "OpImageRead";
1081     case 99:  return "OpImageWrite";
1082     case 100: return "OpImage";
1083     case 101: return "OpImageQueryFormat";
1084     case 102: return "OpImageQueryOrder";
1085     case 103: return "OpImageQuerySizeLod";
1086     case 104: return "OpImageQuerySize";
1087     case 105: return "OpImageQueryLod";
1088     case 106: return "OpImageQueryLevels";
1089     case 107: return "OpImageQuerySamples";
1090     case 108: return "Bad";
1091     case 109: return "OpConvertFToU";
1092     case 110: return "OpConvertFToS";
1093     case 111: return "OpConvertSToF";
1094     case 112: return "OpConvertUToF";
1095     case 113: return "OpUConvert";
1096     case 114: return "OpSConvert";
1097     case 115: return "OpFConvert";
1098     case 116: return "OpQuantizeToF16";
1099     case 117: return "OpConvertPtrToU";
1100     case 118: return "OpSatConvertSToU";
1101     case 119: return "OpSatConvertUToS";
1102     case 120: return "OpConvertUToPtr";
1103     case 121: return "OpPtrCastToGeneric";
1104     case 122: return "OpGenericCastToPtr";
1105     case 123: return "OpGenericCastToPtrExplicit";
1106     case 124: return "OpBitcast";
1107     case 125: return "Bad";
1108     case 126: return "OpSNegate";
1109     case 127: return "OpFNegate";
1110     case 128: return "OpIAdd";
1111     case 129: return "OpFAdd";
1112     case 130: return "OpISub";
1113     case 131: return "OpFSub";
1114     case 132: return "OpIMul";
1115     case 133: return "OpFMul";
1116     case 134: return "OpUDiv";
1117     case 135: return "OpSDiv";
1118     case 136: return "OpFDiv";
1119     case 137: return "OpUMod";
1120     case 138: return "OpSRem";
1121     case 139: return "OpSMod";
1122     case 140: return "OpFRem";
1123     case 141: return "OpFMod";
1124     case 142: return "OpVectorTimesScalar";
1125     case 143: return "OpMatrixTimesScalar";
1126     case 144: return "OpVectorTimesMatrix";
1127     case 145: return "OpMatrixTimesVector";
1128     case 146: return "OpMatrixTimesMatrix";
1129     case 147: return "OpOuterProduct";
1130     case 148: return "OpDot";
1131     case 149: return "OpIAddCarry";
1132     case 150: return "OpISubBorrow";
1133     case 151: return "OpUMulExtended";
1134     case 152: return "OpSMulExtended";
1135     case 153: return "Bad";
1136     case 154: return "OpAny";
1137     case 155: return "OpAll";
1138     case 156: return "OpIsNan";
1139     case 157: return "OpIsInf";
1140     case 158: return "OpIsFinite";
1141     case 159: return "OpIsNormal";
1142     case 160: return "OpSignBitSet";
1143     case 161: return "OpLessOrGreater";
1144     case 162: return "OpOrdered";
1145     case 163: return "OpUnordered";
1146     case 164: return "OpLogicalEqual";
1147     case 165: return "OpLogicalNotEqual";
1148     case 166: return "OpLogicalOr";
1149     case 167: return "OpLogicalAnd";
1150     case 168: return "OpLogicalNot";
1151     case 169: return "OpSelect";
1152     case 170: return "OpIEqual";
1153     case 171: return "OpINotEqual";
1154     case 172: return "OpUGreaterThan";
1155     case 173: return "OpSGreaterThan";
1156     case 174: return "OpUGreaterThanEqual";
1157     case 175: return "OpSGreaterThanEqual";
1158     case 176: return "OpULessThan";
1159     case 177: return "OpSLessThan";
1160     case 178: return "OpULessThanEqual";
1161     case 179: return "OpSLessThanEqual";
1162     case 180: return "OpFOrdEqual";
1163     case 181: return "OpFUnordEqual";
1164     case 182: return "OpFOrdNotEqual";
1165     case 183: return "OpFUnordNotEqual";
1166     case 184: return "OpFOrdLessThan";
1167     case 185: return "OpFUnordLessThan";
1168     case 186: return "OpFOrdGreaterThan";
1169     case 187: return "OpFUnordGreaterThan";
1170     case 188: return "OpFOrdLessThanEqual";
1171     case 189: return "OpFUnordLessThanEqual";
1172     case 190: return "OpFOrdGreaterThanEqual";
1173     case 191: return "OpFUnordGreaterThanEqual";
1174     case 192: return "Bad";
1175     case 193: return "Bad";
1176     case 194: return "OpShiftRightLogical";
1177     case 195: return "OpShiftRightArithmetic";
1178     case 196: return "OpShiftLeftLogical";
1179     case 197: return "OpBitwiseOr";
1180     case 198: return "OpBitwiseXor";
1181     case 199: return "OpBitwiseAnd";
1182     case 200: return "OpNot";
1183     case 201: return "OpBitFieldInsert";
1184     case 202: return "OpBitFieldSExtract";
1185     case 203: return "OpBitFieldUExtract";
1186     case 204: return "OpBitReverse";
1187     case 205: return "OpBitCount";
1188     case 206: return "Bad";
1189     case 207: return "OpDPdx";
1190     case 208: return "OpDPdy";
1191     case 209: return "OpFwidth";
1192     case 210: return "OpDPdxFine";
1193     case 211: return "OpDPdyFine";
1194     case 212: return "OpFwidthFine";
1195     case 213: return "OpDPdxCoarse";
1196     case 214: return "OpDPdyCoarse";
1197     case 215: return "OpFwidthCoarse";
1198     case 216: return "Bad";
1199     case 217: return "Bad";
1200     case 218: return "OpEmitVertex";
1201     case 219: return "OpEndPrimitive";
1202     case 220: return "OpEmitStreamVertex";
1203     case 221: return "OpEndStreamPrimitive";
1204     case 222: return "Bad";
1205     case 223: return "Bad";
1206     case 224: return "OpControlBarrier";
1207     case 225: return "OpMemoryBarrier";
1208     case 226: return "Bad";
1209     case 227: return "OpAtomicLoad";
1210     case 228: return "OpAtomicStore";
1211     case 229: return "OpAtomicExchange";
1212     case 230: return "OpAtomicCompareExchange";
1213     case 231: return "OpAtomicCompareExchangeWeak";
1214     case 232: return "OpAtomicIIncrement";
1215     case 233: return "OpAtomicIDecrement";
1216     case 234: return "OpAtomicIAdd";
1217     case 235: return "OpAtomicISub";
1218     case 236: return "OpAtomicSMin";
1219     case 237: return "OpAtomicUMin";
1220     case 238: return "OpAtomicSMax";
1221     case 239: return "OpAtomicUMax";
1222     case 240: return "OpAtomicAnd";
1223     case 241: return "OpAtomicOr";
1224     case 242: return "OpAtomicXor";
1225     case 243: return "Bad";
1226     case 244: return "Bad";
1227     case 245: return "OpPhi";
1228     case 246: return "OpLoopMerge";
1229     case 247: return "OpSelectionMerge";
1230     case 248: return "OpLabel";
1231     case 249: return "OpBranch";
1232     case 250: return "OpBranchConditional";
1233     case 251: return "OpSwitch";
1234     case 252: return "OpKill";
1235     case 253: return "OpReturn";
1236     case 254: return "OpReturnValue";
1237     case 255: return "OpUnreachable";
1238     case 256: return "OpLifetimeStart";
1239     case 257: return "OpLifetimeStop";
1240     case 258: return "Bad";
1241     case 259: return "OpGroupAsyncCopy";
1242     case 260: return "OpGroupWaitEvents";
1243     case 261: return "OpGroupAll";
1244     case 262: return "OpGroupAny";
1245     case 263: return "OpGroupBroadcast";
1246     case 264: return "OpGroupIAdd";
1247     case 265: return "OpGroupFAdd";
1248     case 266: return "OpGroupFMin";
1249     case 267: return "OpGroupUMin";
1250     case 268: return "OpGroupSMin";
1251     case 269: return "OpGroupFMax";
1252     case 270: return "OpGroupUMax";
1253     case 271: return "OpGroupSMax";
1254     case 272: return "Bad";
1255     case 273: return "Bad";
1256     case 274: return "OpReadPipe";
1257     case 275: return "OpWritePipe";
1258     case 276: return "OpReservedReadPipe";
1259     case 277: return "OpReservedWritePipe";
1260     case 278: return "OpReserveReadPipePackets";
1261     case 279: return "OpReserveWritePipePackets";
1262     case 280: return "OpCommitReadPipe";
1263     case 281: return "OpCommitWritePipe";
1264     case 282: return "OpIsValidReserveId";
1265     case 283: return "OpGetNumPipePackets";
1266     case 284: return "OpGetMaxPipePackets";
1267     case 285: return "OpGroupReserveReadPipePackets";
1268     case 286: return "OpGroupReserveWritePipePackets";
1269     case 287: return "OpGroupCommitReadPipe";
1270     case 288: return "OpGroupCommitWritePipe";
1271     case 289: return "Bad";
1272     case 290: return "Bad";
1273     case 291: return "OpEnqueueMarker";
1274     case 292: return "OpEnqueueKernel";
1275     case 293: return "OpGetKernelNDrangeSubGroupCount";
1276     case 294: return "OpGetKernelNDrangeMaxSubGroupSize";
1277     case 295: return "OpGetKernelWorkGroupSize";
1278     case 296: return "OpGetKernelPreferredWorkGroupSizeMultiple";
1279     case 297: return "OpRetainEvent";
1280     case 298: return "OpReleaseEvent";
1281     case 299: return "OpCreateUserEvent";
1282     case 300: return "OpIsValidEvent";
1283     case 301: return "OpSetUserEventStatus";
1284     case 302: return "OpCaptureEventProfilingInfo";
1285     case 303: return "OpGetDefaultQueue";
1286     case 304: return "OpBuildNDRange";
1287     case 305: return "OpImageSparseSampleImplicitLod";
1288     case 306: return "OpImageSparseSampleExplicitLod";
1289     case 307: return "OpImageSparseSampleDrefImplicitLod";
1290     case 308: return "OpImageSparseSampleDrefExplicitLod";
1291     case 309: return "OpImageSparseSampleProjImplicitLod";
1292     case 310: return "OpImageSparseSampleProjExplicitLod";
1293     case 311: return "OpImageSparseSampleProjDrefImplicitLod";
1294     case 312: return "OpImageSparseSampleProjDrefExplicitLod";
1295     case 313: return "OpImageSparseFetch";
1296     case 314: return "OpImageSparseGather";
1297     case 315: return "OpImageSparseDrefGather";
1298     case 316: return "OpImageSparseTexelsResident";
1299     case 317: return "OpNoLine";
1300     case 318: return "OpAtomicFlagTestAndSet";
1301     case 319: return "OpAtomicFlagClear";
1302     case 320: return "OpImageSparseRead";
1303 
1304     case OpModuleProcessed: return "OpModuleProcessed";
1305     case OpExecutionModeId: return "OpExecutionModeId";
1306     case OpDecorateId:      return "OpDecorateId";
1307 
1308     case 333: return "OpGroupNonUniformElect";
1309     case 334: return "OpGroupNonUniformAll";
1310     case 335: return "OpGroupNonUniformAny";
1311     case 336: return "OpGroupNonUniformAllEqual";
1312     case 337: return "OpGroupNonUniformBroadcast";
1313     case 338: return "OpGroupNonUniformBroadcastFirst";
1314     case 339: return "OpGroupNonUniformBallot";
1315     case 340: return "OpGroupNonUniformInverseBallot";
1316     case 341: return "OpGroupNonUniformBallotBitExtract";
1317     case 342: return "OpGroupNonUniformBallotBitCount";
1318     case 343: return "OpGroupNonUniformBallotFindLSB";
1319     case 344: return "OpGroupNonUniformBallotFindMSB";
1320     case 345: return "OpGroupNonUniformShuffle";
1321     case 346: return "OpGroupNonUniformShuffleXor";
1322     case 347: return "OpGroupNonUniformShuffleUp";
1323     case 348: return "OpGroupNonUniformShuffleDown";
1324     case 349: return "OpGroupNonUniformIAdd";
1325     case 350: return "OpGroupNonUniformFAdd";
1326     case 351: return "OpGroupNonUniformIMul";
1327     case 352: return "OpGroupNonUniformFMul";
1328     case 353: return "OpGroupNonUniformSMin";
1329     case 354: return "OpGroupNonUniformUMin";
1330     case 355: return "OpGroupNonUniformFMin";
1331     case 356: return "OpGroupNonUniformSMax";
1332     case 357: return "OpGroupNonUniformUMax";
1333     case 358: return "OpGroupNonUniformFMax";
1334     case 359: return "OpGroupNonUniformBitwiseAnd";
1335     case 360: return "OpGroupNonUniformBitwiseOr";
1336     case 361: return "OpGroupNonUniformBitwiseXor";
1337     case 362: return "OpGroupNonUniformLogicalAnd";
1338     case 363: return "OpGroupNonUniformLogicalOr";
1339     case 364: return "OpGroupNonUniformLogicalXor";
1340     case 365: return "OpGroupNonUniformQuadBroadcast";
1341     case 366: return "OpGroupNonUniformQuadSwap";
1342 
1343     case OpTerminateInvocation: return "OpTerminateInvocation";
1344 
1345     case 4421: return "OpSubgroupBallotKHR";
1346     case 4422: return "OpSubgroupFirstInvocationKHR";
1347     case 4428: return "OpSubgroupAllKHR";
1348     case 4429: return "OpSubgroupAnyKHR";
1349     case 4430: return "OpSubgroupAllEqualKHR";
1350     case 4432: return "OpSubgroupReadInvocationKHR";
1351 
1352     case OpAtomicFAddEXT: return "OpAtomicFAddEXT";
1353 
1354     case 5000: return "OpGroupIAddNonUniformAMD";
1355     case 5001: return "OpGroupFAddNonUniformAMD";
1356     case 5002: return "OpGroupFMinNonUniformAMD";
1357     case 5003: return "OpGroupUMinNonUniformAMD";
1358     case 5004: return "OpGroupSMinNonUniformAMD";
1359     case 5005: return "OpGroupFMaxNonUniformAMD";
1360     case 5006: return "OpGroupUMaxNonUniformAMD";
1361     case 5007: return "OpGroupSMaxNonUniformAMD";
1362 
1363     case 5011: return "OpFragmentMaskFetchAMD";
1364     case 5012: return "OpFragmentFetchAMD";
1365 
1366     case OpReadClockKHR:               return "OpReadClockKHR";
1367 
1368     case OpDecorateStringGOOGLE:       return "OpDecorateStringGOOGLE";
1369     case OpMemberDecorateStringGOOGLE: return "OpMemberDecorateStringGOOGLE";
1370 
1371     case OpReportIntersectionKHR:             return "OpReportIntersectionKHR";
1372     case OpIgnoreIntersectionNV:              return "OpIgnoreIntersectionNV";
1373     case OpIgnoreIntersectionKHR:             return "OpIgnoreIntersectionKHR";
1374     case OpTerminateRayNV:                    return "OpTerminateRayNV";
1375     case OpTerminateRayKHR:                   return "OpTerminateRayKHR";
1376     case OpTraceNV:                           return "OpTraceNV";
1377     case OpTraceRayKHR:                       return "OpTraceRayKHR";
1378     case OpTypeAccelerationStructureKHR:      return "OpTypeAccelerationStructureKHR";
1379     case OpExecuteCallableNV:                 return "OpExecuteCallableNV";
1380     case OpExecuteCallableKHR:                return "OpExecuteCallableKHR";
1381     case OpConvertUToAccelerationStructureKHR: return "OpConvertUToAccelerationStructureKHR";
1382 
1383     case OpGroupNonUniformPartitionNV:       return "OpGroupNonUniformPartitionNV";
1384     case OpImageSampleFootprintNV:           return "OpImageSampleFootprintNV";
1385     case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV";
1386 
1387     case OpTypeRayQueryKHR:                                                   return "OpTypeRayQueryKHR";
1388     case OpRayQueryInitializeKHR:                                             return "OpRayQueryInitializeKHR";
1389     case OpRayQueryTerminateKHR:                                              return "OpRayQueryTerminateKHR";
1390     case OpRayQueryGenerateIntersectionKHR:                                   return "OpRayQueryGenerateIntersectionKHR";
1391     case OpRayQueryConfirmIntersectionKHR:                                    return "OpRayQueryConfirmIntersectionKHR";
1392     case OpRayQueryProceedKHR:                                                return "OpRayQueryProceedKHR";
1393     case OpRayQueryGetIntersectionTypeKHR:                                    return "OpRayQueryGetIntersectionTypeKHR";
1394     case OpRayQueryGetRayTMinKHR:                                             return "OpRayQueryGetRayTMinKHR";
1395     case OpRayQueryGetRayFlagsKHR:                                            return "OpRayQueryGetRayFlagsKHR";
1396     case OpRayQueryGetIntersectionTKHR:                                       return "OpRayQueryGetIntersectionTKHR";
1397     case OpRayQueryGetIntersectionInstanceCustomIndexKHR:                     return "OpRayQueryGetIntersectionInstanceCustomIndexKHR";
1398     case OpRayQueryGetIntersectionInstanceIdKHR:                              return "OpRayQueryGetIntersectionInstanceIdKHR";
1399     case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR:  return "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR";
1400     case OpRayQueryGetIntersectionGeometryIndexKHR:                           return "OpRayQueryGetIntersectionGeometryIndexKHR";
1401     case OpRayQueryGetIntersectionPrimitiveIndexKHR:                          return "OpRayQueryGetIntersectionPrimitiveIndexKHR";
1402     case OpRayQueryGetIntersectionBarycentricsKHR:                            return "OpRayQueryGetIntersectionBarycentricsKHR";
1403     case OpRayQueryGetIntersectionFrontFaceKHR:                               return "OpRayQueryGetIntersectionFrontFaceKHR";
1404     case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR:                     return "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR";
1405     case OpRayQueryGetIntersectionObjectRayDirectionKHR:                      return "OpRayQueryGetIntersectionObjectRayDirectionKHR";
1406     case OpRayQueryGetIntersectionObjectRayOriginKHR:                         return "OpRayQueryGetIntersectionObjectRayOriginKHR";
1407     case OpRayQueryGetWorldRayDirectionKHR:                                   return "OpRayQueryGetWorldRayDirectionKHR";
1408     case OpRayQueryGetWorldRayOriginKHR:                                      return "OpRayQueryGetWorldRayOriginKHR";
1409     case OpRayQueryGetIntersectionObjectToWorldKHR:                           return "OpRayQueryGetIntersectionObjectToWorldKHR";
1410     case OpRayQueryGetIntersectionWorldToObjectKHR:                           return "OpRayQueryGetIntersectionWorldToObjectKHR";
1411 
1412     case OpTypeCooperativeMatrixNV:         return "OpTypeCooperativeMatrixNV";
1413     case OpCooperativeMatrixLoadNV:         return "OpCooperativeMatrixLoadNV";
1414     case OpCooperativeMatrixStoreNV:        return "OpCooperativeMatrixStoreNV";
1415     case OpCooperativeMatrixMulAddNV:       return "OpCooperativeMatrixMulAddNV";
1416     case OpCooperativeMatrixLengthNV:       return "OpCooperativeMatrixLengthNV";
1417     case OpDemoteToHelperInvocationEXT:     return "OpDemoteToHelperInvocationEXT";
1418     case OpIsHelperInvocationEXT:           return "OpIsHelperInvocationEXT";
1419 
1420     case OpBeginInvocationInterlockEXT:     return "OpBeginInvocationInterlockEXT";
1421     case OpEndInvocationInterlockEXT:       return "OpEndInvocationInterlockEXT";
1422 
1423     default:
1424         return "Bad";
1425     }
1426 }
1427 
1428 // The set of objects that hold all the instruction/operand
1429 // parameterization information.
1430 InstructionParameters InstructionDesc[OpCodeMask + 1];
1431 OperandParameters ExecutionModeOperands[ExecutionModeCeiling];
1432 OperandParameters DecorationOperands[DecorationCeiling];
1433 
1434 EnumDefinition OperandClassParams[OperandCount];
1435 EnumParameters ExecutionModeParams[ExecutionModeCeiling];
1436 EnumParameters ImageOperandsParams[ImageOperandsCeiling];
1437 EnumParameters DecorationParams[DecorationCeiling];
1438 EnumParameters LoopControlParams[FunctionControlCeiling];
1439 EnumParameters SelectionControlParams[SelectControlCeiling];
1440 EnumParameters FunctionControlParams[FunctionControlCeiling];
1441 EnumParameters MemoryAccessParams[MemoryAccessCeiling];
1442 
1443 // Set up all the parameterizing descriptions of the opcodes, operands, etc.
Parameterize()1444 void Parameterize()
1445 {
1446     // only do this once.
1447     static bool initialized = false;
1448     if (initialized)
1449         return;
1450     initialized = true;
1451 
1452     // Exceptions to having a result <id> and a resulting type <id>.
1453     // (Everything is initialized to have both).
1454 
1455     InstructionDesc[OpNop].setResultAndType(false, false);
1456     InstructionDesc[OpSource].setResultAndType(false, false);
1457     InstructionDesc[OpSourceContinued].setResultAndType(false, false);
1458     InstructionDesc[OpSourceExtension].setResultAndType(false, false);
1459     InstructionDesc[OpExtension].setResultAndType(false, false);
1460     InstructionDesc[OpExtInstImport].setResultAndType(true, false);
1461     InstructionDesc[OpCapability].setResultAndType(false, false);
1462     InstructionDesc[OpMemoryModel].setResultAndType(false, false);
1463     InstructionDesc[OpEntryPoint].setResultAndType(false, false);
1464     InstructionDesc[OpExecutionMode].setResultAndType(false, false);
1465     InstructionDesc[OpExecutionModeId].setResultAndType(false, false);
1466     InstructionDesc[OpTypeVoid].setResultAndType(true, false);
1467     InstructionDesc[OpTypeBool].setResultAndType(true, false);
1468     InstructionDesc[OpTypeInt].setResultAndType(true, false);
1469     InstructionDesc[OpTypeFloat].setResultAndType(true, false);
1470     InstructionDesc[OpTypeVector].setResultAndType(true, false);
1471     InstructionDesc[OpTypeMatrix].setResultAndType(true, false);
1472     InstructionDesc[OpTypeImage].setResultAndType(true, false);
1473     InstructionDesc[OpTypeSampler].setResultAndType(true, false);
1474     InstructionDesc[OpTypeSampledImage].setResultAndType(true, false);
1475     InstructionDesc[OpTypeArray].setResultAndType(true, false);
1476     InstructionDesc[OpTypeRuntimeArray].setResultAndType(true, false);
1477     InstructionDesc[OpTypeStruct].setResultAndType(true, false);
1478     InstructionDesc[OpTypeOpaque].setResultAndType(true, false);
1479     InstructionDesc[OpTypePointer].setResultAndType(true, false);
1480     InstructionDesc[OpTypeForwardPointer].setResultAndType(false, false);
1481     InstructionDesc[OpTypeFunction].setResultAndType(true, false);
1482     InstructionDesc[OpTypeEvent].setResultAndType(true, false);
1483     InstructionDesc[OpTypeDeviceEvent].setResultAndType(true, false);
1484     InstructionDesc[OpTypeReserveId].setResultAndType(true, false);
1485     InstructionDesc[OpTypeQueue].setResultAndType(true, false);
1486     InstructionDesc[OpTypePipe].setResultAndType(true, false);
1487     InstructionDesc[OpFunctionEnd].setResultAndType(false, false);
1488     InstructionDesc[OpStore].setResultAndType(false, false);
1489     InstructionDesc[OpImageWrite].setResultAndType(false, false);
1490     InstructionDesc[OpDecorationGroup].setResultAndType(true, false);
1491     InstructionDesc[OpDecorate].setResultAndType(false, false);
1492     InstructionDesc[OpDecorateId].setResultAndType(false, false);
1493     InstructionDesc[OpDecorateStringGOOGLE].setResultAndType(false, false);
1494     InstructionDesc[OpMemberDecorate].setResultAndType(false, false);
1495     InstructionDesc[OpMemberDecorateStringGOOGLE].setResultAndType(false, false);
1496     InstructionDesc[OpGroupDecorate].setResultAndType(false, false);
1497     InstructionDesc[OpGroupMemberDecorate].setResultAndType(false, false);
1498     InstructionDesc[OpName].setResultAndType(false, false);
1499     InstructionDesc[OpMemberName].setResultAndType(false, false);
1500     InstructionDesc[OpString].setResultAndType(true, false);
1501     InstructionDesc[OpLine].setResultAndType(false, false);
1502     InstructionDesc[OpNoLine].setResultAndType(false, false);
1503     InstructionDesc[OpCopyMemory].setResultAndType(false, false);
1504     InstructionDesc[OpCopyMemorySized].setResultAndType(false, false);
1505     InstructionDesc[OpEmitVertex].setResultAndType(false, false);
1506     InstructionDesc[OpEndPrimitive].setResultAndType(false, false);
1507     InstructionDesc[OpEmitStreamVertex].setResultAndType(false, false);
1508     InstructionDesc[OpEndStreamPrimitive].setResultAndType(false, false);
1509     InstructionDesc[OpControlBarrier].setResultAndType(false, false);
1510     InstructionDesc[OpMemoryBarrier].setResultAndType(false, false);
1511     InstructionDesc[OpAtomicStore].setResultAndType(false, false);
1512     InstructionDesc[OpLoopMerge].setResultAndType(false, false);
1513     InstructionDesc[OpSelectionMerge].setResultAndType(false, false);
1514     InstructionDesc[OpLabel].setResultAndType(true, false);
1515     InstructionDesc[OpBranch].setResultAndType(false, false);
1516     InstructionDesc[OpBranchConditional].setResultAndType(false, false);
1517     InstructionDesc[OpSwitch].setResultAndType(false, false);
1518     InstructionDesc[OpKill].setResultAndType(false, false);
1519     InstructionDesc[OpTerminateInvocation].setResultAndType(false, false);
1520     InstructionDesc[OpReturn].setResultAndType(false, false);
1521     InstructionDesc[OpReturnValue].setResultAndType(false, false);
1522     InstructionDesc[OpUnreachable].setResultAndType(false, false);
1523     InstructionDesc[OpLifetimeStart].setResultAndType(false, false);
1524     InstructionDesc[OpLifetimeStop].setResultAndType(false, false);
1525     InstructionDesc[OpCommitReadPipe].setResultAndType(false, false);
1526     InstructionDesc[OpCommitWritePipe].setResultAndType(false, false);
1527     InstructionDesc[OpGroupCommitWritePipe].setResultAndType(false, false);
1528     InstructionDesc[OpGroupCommitReadPipe].setResultAndType(false, false);
1529     InstructionDesc[OpCaptureEventProfilingInfo].setResultAndType(false, false);
1530     InstructionDesc[OpSetUserEventStatus].setResultAndType(false, false);
1531     InstructionDesc[OpRetainEvent].setResultAndType(false, false);
1532     InstructionDesc[OpReleaseEvent].setResultAndType(false, false);
1533     InstructionDesc[OpGroupWaitEvents].setResultAndType(false, false);
1534     InstructionDesc[OpAtomicFlagClear].setResultAndType(false, false);
1535     InstructionDesc[OpModuleProcessed].setResultAndType(false, false);
1536     InstructionDesc[OpTypeCooperativeMatrixNV].setResultAndType(true, false);
1537     InstructionDesc[OpCooperativeMatrixStoreNV].setResultAndType(false, false);
1538     InstructionDesc[OpBeginInvocationInterlockEXT].setResultAndType(false, false);
1539     InstructionDesc[OpEndInvocationInterlockEXT].setResultAndType(false, false);
1540 
1541     // Specific additional context-dependent operands
1542 
1543     ExecutionModeOperands[ExecutionModeInvocations].push(OperandLiteralNumber, "'Number of <<Invocation,invocations>>'");
1544 
1545     ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'x size'");
1546     ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'y size'");
1547     ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'z size'");
1548 
1549     ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'x size'");
1550     ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'y size'");
1551     ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'z size'");
1552 
1553     ExecutionModeOperands[ExecutionModeOutputVertices].push(OperandLiteralNumber, "'Vertex count'");
1554     ExecutionModeOperands[ExecutionModeVecTypeHint].push(OperandLiteralNumber, "'Vector type'");
1555 
1556     DecorationOperands[DecorationStream].push(OperandLiteralNumber, "'Stream Number'");
1557     DecorationOperands[DecorationLocation].push(OperandLiteralNumber, "'Location'");
1558     DecorationOperands[DecorationComponent].push(OperandLiteralNumber, "'Component'");
1559     DecorationOperands[DecorationIndex].push(OperandLiteralNumber, "'Index'");
1560     DecorationOperands[DecorationBinding].push(OperandLiteralNumber, "'Binding Point'");
1561     DecorationOperands[DecorationDescriptorSet].push(OperandLiteralNumber, "'Descriptor Set'");
1562     DecorationOperands[DecorationOffset].push(OperandLiteralNumber, "'Byte Offset'");
1563     DecorationOperands[DecorationXfbBuffer].push(OperandLiteralNumber, "'XFB Buffer Number'");
1564     DecorationOperands[DecorationXfbStride].push(OperandLiteralNumber, "'XFB Stride'");
1565     DecorationOperands[DecorationArrayStride].push(OperandLiteralNumber, "'Array Stride'");
1566     DecorationOperands[DecorationMatrixStride].push(OperandLiteralNumber, "'Matrix Stride'");
1567     DecorationOperands[DecorationBuiltIn].push(OperandLiteralNumber, "See <<BuiltIn,*BuiltIn*>>");
1568     DecorationOperands[DecorationFPRoundingMode].push(OperandFPRoundingMode, "'Floating-Point Rounding Mode'");
1569     DecorationOperands[DecorationFPFastMathMode].push(OperandFPFastMath, "'Fast-Math Mode'");
1570     DecorationOperands[DecorationLinkageAttributes].push(OperandLiteralString, "'Name'");
1571     DecorationOperands[DecorationLinkageAttributes].push(OperandLinkageType, "'Linkage Type'");
1572     DecorationOperands[DecorationFuncParamAttr].push(OperandFuncParamAttr, "'Function Parameter Attribute'");
1573     DecorationOperands[DecorationSpecId].push(OperandLiteralNumber, "'Specialization Constant ID'");
1574     DecorationOperands[DecorationInputAttachmentIndex].push(OperandLiteralNumber, "'Attachment Index'");
1575     DecorationOperands[DecorationAlignment].push(OperandLiteralNumber, "'Alignment'");
1576 
1577     OperandClassParams[OperandSource].set(0, SourceString, 0);
1578     OperandClassParams[OperandExecutionModel].set(0, ExecutionModelString, nullptr);
1579     OperandClassParams[OperandAddressing].set(0, AddressingString, nullptr);
1580     OperandClassParams[OperandMemory].set(0, MemoryString, nullptr);
1581     OperandClassParams[OperandExecutionMode].set(ExecutionModeCeiling, ExecutionModeString, ExecutionModeParams);
1582     OperandClassParams[OperandExecutionMode].setOperands(ExecutionModeOperands);
1583     OperandClassParams[OperandStorage].set(0, StorageClassString, nullptr);
1584     OperandClassParams[OperandDimensionality].set(0, DimensionString, nullptr);
1585     OperandClassParams[OperandSamplerAddressingMode].set(0, SamplerAddressingModeString, nullptr);
1586     OperandClassParams[OperandSamplerFilterMode].set(0, SamplerFilterModeString, nullptr);
1587     OperandClassParams[OperandSamplerImageFormat].set(0, ImageFormatString, nullptr);
1588     OperandClassParams[OperandImageChannelOrder].set(0, ImageChannelOrderString, nullptr);
1589     OperandClassParams[OperandImageChannelDataType].set(0, ImageChannelDataTypeString, nullptr);
1590     OperandClassParams[OperandImageOperands].set(ImageOperandsCeiling, ImageOperandsString, ImageOperandsParams, true);
1591     OperandClassParams[OperandFPFastMath].set(0, FPFastMathString, nullptr, true);
1592     OperandClassParams[OperandFPRoundingMode].set(0, FPRoundingModeString, nullptr);
1593     OperandClassParams[OperandLinkageType].set(0, LinkageTypeString, nullptr);
1594     OperandClassParams[OperandFuncParamAttr].set(0, FuncParamAttrString, nullptr);
1595     OperandClassParams[OperandAccessQualifier].set(0, AccessQualifierString, nullptr);
1596     OperandClassParams[OperandDecoration].set(DecorationCeiling, DecorationString, DecorationParams);
1597     OperandClassParams[OperandDecoration].setOperands(DecorationOperands);
1598     OperandClassParams[OperandBuiltIn].set(0, BuiltInString, nullptr);
1599     OperandClassParams[OperandSelect].set(SelectControlCeiling, SelectControlString, SelectionControlParams, true);
1600     OperandClassParams[OperandLoop].set(LoopControlCeiling, LoopControlString, LoopControlParams, true);
1601     OperandClassParams[OperandFunction].set(FunctionControlCeiling, FunctionControlString, FunctionControlParams, true);
1602     OperandClassParams[OperandMemorySemantics].set(0, MemorySemanticsString, nullptr, true);
1603     OperandClassParams[OperandMemoryAccess].set(MemoryAccessCeiling, MemoryAccessString, MemoryAccessParams, true);
1604     OperandClassParams[OperandScope].set(0, ScopeString, nullptr);
1605     OperandClassParams[OperandGroupOperation].set(0, GroupOperationString, nullptr);
1606     OperandClassParams[OperandKernelEnqueueFlags].set(0, KernelEnqueueFlagsString, nullptr);
1607     OperandClassParams[OperandKernelProfilingInfo].set(0, KernelProfilingInfoString, nullptr, true);
1608     OperandClassParams[OperandCapability].set(0, CapabilityString, nullptr);
1609     OperandClassParams[OperandOpcode].set(OpCodeMask + 1, OpcodeString, 0);
1610 
1611     // set name of operator, an initial set of <id> style operands, and the description
1612 
1613     InstructionDesc[OpSource].operands.push(OperandSource, "");
1614     InstructionDesc[OpSource].operands.push(OperandLiteralNumber, "'Version'");
1615     InstructionDesc[OpSource].operands.push(OperandId, "'File'", true);
1616     InstructionDesc[OpSource].operands.push(OperandLiteralString, "'Source'", true);
1617 
1618     InstructionDesc[OpSourceContinued].operands.push(OperandLiteralString, "'Continued Source'");
1619 
1620     InstructionDesc[OpSourceExtension].operands.push(OperandLiteralString, "'Extension'");
1621 
1622     InstructionDesc[OpName].operands.push(OperandId, "'Target'");
1623     InstructionDesc[OpName].operands.push(OperandLiteralString, "'Name'");
1624 
1625     InstructionDesc[OpMemberName].operands.push(OperandId, "'Type'");
1626     InstructionDesc[OpMemberName].operands.push(OperandLiteralNumber, "'Member'");
1627     InstructionDesc[OpMemberName].operands.push(OperandLiteralString, "'Name'");
1628 
1629     InstructionDesc[OpString].operands.push(OperandLiteralString, "'String'");
1630 
1631     InstructionDesc[OpLine].operands.push(OperandId, "'File'");
1632     InstructionDesc[OpLine].operands.push(OperandLiteralNumber, "'Line'");
1633     InstructionDesc[OpLine].operands.push(OperandLiteralNumber, "'Column'");
1634 
1635     InstructionDesc[OpExtension].operands.push(OperandLiteralString, "'Name'");
1636 
1637     InstructionDesc[OpExtInstImport].operands.push(OperandLiteralString, "'Name'");
1638 
1639     InstructionDesc[OpCapability].operands.push(OperandCapability, "'Capability'");
1640 
1641     InstructionDesc[OpMemoryModel].operands.push(OperandAddressing, "");
1642     InstructionDesc[OpMemoryModel].operands.push(OperandMemory, "");
1643 
1644     InstructionDesc[OpEntryPoint].operands.push(OperandExecutionModel, "");
1645     InstructionDesc[OpEntryPoint].operands.push(OperandId, "'Entry Point'");
1646     InstructionDesc[OpEntryPoint].operands.push(OperandLiteralString, "'Name'");
1647     InstructionDesc[OpEntryPoint].operands.push(OperandVariableIds, "'Interface'");
1648 
1649     InstructionDesc[OpExecutionMode].operands.push(OperandId, "'Entry Point'");
1650     InstructionDesc[OpExecutionMode].operands.push(OperandExecutionMode, "'Mode'");
1651     InstructionDesc[OpExecutionMode].operands.push(OperandOptionalLiteral, "See <<Execution_Mode,Execution Mode>>");
1652 
1653     InstructionDesc[OpExecutionModeId].operands.push(OperandId, "'Entry Point'");
1654     InstructionDesc[OpExecutionModeId].operands.push(OperandExecutionMode, "'Mode'");
1655     InstructionDesc[OpExecutionModeId].operands.push(OperandVariableIds, "See <<Execution_Mode,Execution Mode>>");
1656 
1657     InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Width'");
1658     InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Signedness'");
1659 
1660     InstructionDesc[OpTypeFloat].operands.push(OperandLiteralNumber, "'Width'");
1661 
1662     InstructionDesc[OpTypeVector].operands.push(OperandId, "'Component Type'");
1663     InstructionDesc[OpTypeVector].operands.push(OperandLiteralNumber, "'Component Count'");
1664 
1665     InstructionDesc[OpTypeMatrix].operands.push(OperandId, "'Column Type'");
1666     InstructionDesc[OpTypeMatrix].operands.push(OperandLiteralNumber, "'Column Count'");
1667 
1668     InstructionDesc[OpTypeImage].operands.push(OperandId, "'Sampled Type'");
1669     InstructionDesc[OpTypeImage].operands.push(OperandDimensionality, "");
1670     InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Depth'");
1671     InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Arrayed'");
1672     InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'MS'");
1673     InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Sampled'");
1674     InstructionDesc[OpTypeImage].operands.push(OperandSamplerImageFormat, "");
1675     InstructionDesc[OpTypeImage].operands.push(OperandAccessQualifier, "", true);
1676 
1677     InstructionDesc[OpTypeSampledImage].operands.push(OperandId, "'Image Type'");
1678 
1679     InstructionDesc[OpTypeArray].operands.push(OperandId, "'Element Type'");
1680     InstructionDesc[OpTypeArray].operands.push(OperandId, "'Length'");
1681 
1682     InstructionDesc[OpTypeRuntimeArray].operands.push(OperandId, "'Element Type'");
1683 
1684     InstructionDesc[OpTypeStruct].operands.push(OperandVariableIds, "'Member 0 type', +\n'member 1 type', +\n...");
1685 
1686     InstructionDesc[OpTypeOpaque].operands.push(OperandLiteralString, "The name of the opaque type.");
1687 
1688     InstructionDesc[OpTypePointer].operands.push(OperandStorage, "");
1689     InstructionDesc[OpTypePointer].operands.push(OperandId, "'Type'");
1690 
1691     InstructionDesc[OpTypeForwardPointer].operands.push(OperandId, "'Pointer Type'");
1692     InstructionDesc[OpTypeForwardPointer].operands.push(OperandStorage, "");
1693 
1694     InstructionDesc[OpTypePipe].operands.push(OperandAccessQualifier, "'Qualifier'");
1695 
1696     InstructionDesc[OpTypeFunction].operands.push(OperandId, "'Return Type'");
1697     InstructionDesc[OpTypeFunction].operands.push(OperandVariableIds, "'Parameter 0 Type', +\n'Parameter 1 Type', +\n...");
1698 
1699     InstructionDesc[OpConstant].operands.push(OperandVariableLiterals, "'Value'");
1700 
1701     InstructionDesc[OpConstantComposite].operands.push(OperandVariableIds, "'Constituents'");
1702 
1703     InstructionDesc[OpConstantSampler].operands.push(OperandSamplerAddressingMode, "");
1704     InstructionDesc[OpConstantSampler].operands.push(OperandLiteralNumber, "'Param'");
1705     InstructionDesc[OpConstantSampler].operands.push(OperandSamplerFilterMode, "");
1706 
1707     InstructionDesc[OpSpecConstant].operands.push(OperandVariableLiterals, "'Value'");
1708 
1709     InstructionDesc[OpSpecConstantComposite].operands.push(OperandVariableIds, "'Constituents'");
1710 
1711     InstructionDesc[OpSpecConstantOp].operands.push(OperandLiteralNumber, "'Opcode'");
1712     InstructionDesc[OpSpecConstantOp].operands.push(OperandVariableIds, "'Operands'");
1713 
1714     InstructionDesc[OpVariable].operands.push(OperandStorage, "");
1715     InstructionDesc[OpVariable].operands.push(OperandId, "'Initializer'", true);
1716 
1717     InstructionDesc[OpFunction].operands.push(OperandFunction, "");
1718     InstructionDesc[OpFunction].operands.push(OperandId, "'Function Type'");
1719 
1720     InstructionDesc[OpFunctionCall].operands.push(OperandId, "'Function'");
1721     InstructionDesc[OpFunctionCall].operands.push(OperandVariableIds, "'Argument 0', +\n'Argument 1', +\n...");
1722 
1723     InstructionDesc[OpExtInst].operands.push(OperandId, "'Set'");
1724     InstructionDesc[OpExtInst].operands.push(OperandLiteralNumber, "'Instruction'");
1725     InstructionDesc[OpExtInst].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n...");
1726 
1727     InstructionDesc[OpLoad].operands.push(OperandId, "'Pointer'");
1728     InstructionDesc[OpLoad].operands.push(OperandMemoryAccess, "", true);
1729     InstructionDesc[OpLoad].operands.push(OperandLiteralNumber, "", true);
1730     InstructionDesc[OpLoad].operands.push(OperandId, "", true);
1731 
1732     InstructionDesc[OpStore].operands.push(OperandId, "'Pointer'");
1733     InstructionDesc[OpStore].operands.push(OperandId, "'Object'");
1734     InstructionDesc[OpStore].operands.push(OperandMemoryAccess, "", true);
1735     InstructionDesc[OpStore].operands.push(OperandLiteralNumber, "", true);
1736     InstructionDesc[OpStore].operands.push(OperandId, "", true);
1737 
1738     InstructionDesc[OpPhi].operands.push(OperandVariableIds, "'Variable, Parent, ...'");
1739 
1740     InstructionDesc[OpDecorate].operands.push(OperandId, "'Target'");
1741     InstructionDesc[OpDecorate].operands.push(OperandDecoration, "");
1742     InstructionDesc[OpDecorate].operands.push(OperandVariableLiterals, "See <<Decoration,'Decoration'>>.");
1743 
1744     InstructionDesc[OpDecorateId].operands.push(OperandId, "'Target'");
1745     InstructionDesc[OpDecorateId].operands.push(OperandDecoration, "");
1746     InstructionDesc[OpDecorateId].operands.push(OperandVariableIds, "See <<Decoration,'Decoration'>>.");
1747 
1748     InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandId, "'Target'");
1749     InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandDecoration, "");
1750     InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'");
1751 
1752     InstructionDesc[OpMemberDecorate].operands.push(OperandId, "'Structure Type'");
1753     InstructionDesc[OpMemberDecorate].operands.push(OperandLiteralNumber, "'Member'");
1754     InstructionDesc[OpMemberDecorate].operands.push(OperandDecoration, "");
1755     InstructionDesc[OpMemberDecorate].operands.push(OperandVariableLiterals, "See <<Decoration,'Decoration'>>.");
1756 
1757     InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandId, "'Structure Type'");
1758     InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralNumber, "'Member'");
1759     InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandDecoration, "");
1760     InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'");
1761 
1762     InstructionDesc[OpGroupDecorate].operands.push(OperandId, "'Decoration Group'");
1763     InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Targets'");
1764 
1765     InstructionDesc[OpGroupMemberDecorate].operands.push(OperandId, "'Decoration Group'");
1766     InstructionDesc[OpGroupMemberDecorate].operands.push(OperandVariableIdLiteral, "'Targets'");
1767 
1768     InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Vector'");
1769     InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Index'");
1770 
1771     InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Vector'");
1772     InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Component'");
1773     InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Index'");
1774 
1775     InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 1'");
1776     InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 2'");
1777     InstructionDesc[OpVectorShuffle].operands.push(OperandVariableLiterals, "'Components'");
1778 
1779     InstructionDesc[OpCompositeConstruct].operands.push(OperandVariableIds, "'Constituents'");
1780 
1781     InstructionDesc[OpCompositeExtract].operands.push(OperandId, "'Composite'");
1782     InstructionDesc[OpCompositeExtract].operands.push(OperandVariableLiterals, "'Indexes'");
1783 
1784     InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Object'");
1785     InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Composite'");
1786     InstructionDesc[OpCompositeInsert].operands.push(OperandVariableLiterals, "'Indexes'");
1787 
1788     InstructionDesc[OpCopyObject].operands.push(OperandId, "'Operand'");
1789 
1790     InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Target'");
1791     InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Source'");
1792     InstructionDesc[OpCopyMemory].operands.push(OperandMemoryAccess, "", true);
1793 
1794     InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Target'");
1795     InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Source'");
1796     InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Size'");
1797     InstructionDesc[OpCopyMemorySized].operands.push(OperandMemoryAccess, "", true);
1798 
1799     InstructionDesc[OpSampledImage].operands.push(OperandId, "'Image'");
1800     InstructionDesc[OpSampledImage].operands.push(OperandId, "'Sampler'");
1801 
1802     InstructionDesc[OpImage].operands.push(OperandId, "'Sampled Image'");
1803 
1804     InstructionDesc[OpImageRead].operands.push(OperandId, "'Image'");
1805     InstructionDesc[OpImageRead].operands.push(OperandId, "'Coordinate'");
1806     InstructionDesc[OpImageRead].operands.push(OperandImageOperands, "", true);
1807     InstructionDesc[OpImageRead].operands.push(OperandVariableIds, "", true);
1808 
1809     InstructionDesc[OpImageWrite].operands.push(OperandId, "'Image'");
1810     InstructionDesc[OpImageWrite].operands.push(OperandId, "'Coordinate'");
1811     InstructionDesc[OpImageWrite].operands.push(OperandId, "'Texel'");
1812     InstructionDesc[OpImageWrite].operands.push(OperandImageOperands, "", true);
1813     InstructionDesc[OpImageWrite].operands.push(OperandVariableIds, "", true);
1814 
1815     InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Sampled Image'");
1816     InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Coordinate'");
1817     InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandImageOperands, "", true);
1818     InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandVariableIds, "", true);
1819 
1820     InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Sampled Image'");
1821     InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Coordinate'");
1822     InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandImageOperands, "", true);
1823     InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandVariableIds, "", true);
1824 
1825     InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'");
1826     InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'");
1827     InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'");
1828     InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true);
1829     InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true);
1830 
1831     InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'");
1832     InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'");
1833     InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'");
1834     InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true);
1835     InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true);
1836 
1837     InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'");
1838     InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'");
1839     InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandImageOperands, "", true);
1840     InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandVariableIds, "", true);
1841 
1842     InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'");
1843     InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'");
1844     InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandImageOperands, "", true);
1845     InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandVariableIds, "", true);
1846 
1847     InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'");
1848     InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'");
1849     InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'");
1850     InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true);
1851     InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true);
1852 
1853     InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'");
1854     InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'");
1855     InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'");
1856     InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true);
1857     InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true);
1858 
1859     InstructionDesc[OpImageFetch].operands.push(OperandId, "'Image'");
1860     InstructionDesc[OpImageFetch].operands.push(OperandId, "'Coordinate'");
1861     InstructionDesc[OpImageFetch].operands.push(OperandImageOperands, "", true);
1862     InstructionDesc[OpImageFetch].operands.push(OperandVariableIds, "", true);
1863 
1864     InstructionDesc[OpImageGather].operands.push(OperandId, "'Sampled Image'");
1865     InstructionDesc[OpImageGather].operands.push(OperandId, "'Coordinate'");
1866     InstructionDesc[OpImageGather].operands.push(OperandId, "'Component'");
1867     InstructionDesc[OpImageGather].operands.push(OperandImageOperands, "", true);
1868     InstructionDesc[OpImageGather].operands.push(OperandVariableIds, "", true);
1869 
1870     InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Sampled Image'");
1871     InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Coordinate'");
1872     InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'D~ref~'");
1873     InstructionDesc[OpImageDrefGather].operands.push(OperandImageOperands, "", true);
1874     InstructionDesc[OpImageDrefGather].operands.push(OperandVariableIds, "", true);
1875 
1876     InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Sampled Image'");
1877     InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Coordinate'");
1878     InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandImageOperands, "", true);
1879     InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandVariableIds, "", true);
1880 
1881     InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Sampled Image'");
1882     InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Coordinate'");
1883     InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandImageOperands, "", true);
1884     InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandVariableIds, "", true);
1885 
1886     InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'");
1887     InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'");
1888     InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'");
1889     InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true);
1890     InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true);
1891 
1892     InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'");
1893     InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'");
1894     InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'");
1895     InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true);
1896     InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true);
1897 
1898     InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'");
1899     InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'");
1900     InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandImageOperands, "", true);
1901     InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandVariableIds, "", true);
1902 
1903     InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'");
1904     InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'");
1905     InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandImageOperands, "", true);
1906     InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandVariableIds, "", true);
1907 
1908     InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'");
1909     InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'");
1910     InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'");
1911     InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true);
1912     InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true);
1913 
1914     InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'");
1915     InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'");
1916     InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'");
1917     InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true);
1918     InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true);
1919 
1920     InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Image'");
1921     InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Coordinate'");
1922     InstructionDesc[OpImageSparseFetch].operands.push(OperandImageOperands, "", true);
1923     InstructionDesc[OpImageSparseFetch].operands.push(OperandVariableIds, "", true);
1924 
1925     InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Sampled Image'");
1926     InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Coordinate'");
1927     InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Component'");
1928     InstructionDesc[OpImageSparseGather].operands.push(OperandImageOperands, "", true);
1929     InstructionDesc[OpImageSparseGather].operands.push(OperandVariableIds, "", true);
1930 
1931     InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Sampled Image'");
1932     InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Coordinate'");
1933     InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'D~ref~'");
1934     InstructionDesc[OpImageSparseDrefGather].operands.push(OperandImageOperands, "", true);
1935     InstructionDesc[OpImageSparseDrefGather].operands.push(OperandVariableIds, "", true);
1936 
1937     InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Image'");
1938     InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Coordinate'");
1939     InstructionDesc[OpImageSparseRead].operands.push(OperandImageOperands, "", true);
1940     InstructionDesc[OpImageSparseRead].operands.push(OperandVariableIds, "", true);
1941 
1942     InstructionDesc[OpImageSparseTexelsResident].operands.push(OperandId, "'Resident Code'");
1943 
1944     InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Image'");
1945     InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Level of Detail'");
1946 
1947     InstructionDesc[OpImageQuerySize].operands.push(OperandId, "'Image'");
1948 
1949     InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Image'");
1950     InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Coordinate'");
1951 
1952     InstructionDesc[OpImageQueryLevels].operands.push(OperandId, "'Image'");
1953 
1954     InstructionDesc[OpImageQuerySamples].operands.push(OperandId, "'Image'");
1955 
1956     InstructionDesc[OpImageQueryFormat].operands.push(OperandId, "'Image'");
1957 
1958     InstructionDesc[OpImageQueryOrder].operands.push(OperandId, "'Image'");
1959 
1960     InstructionDesc[OpAccessChain].operands.push(OperandId, "'Base'");
1961     InstructionDesc[OpAccessChain].operands.push(OperandVariableIds, "'Indexes'");
1962 
1963     InstructionDesc[OpInBoundsAccessChain].operands.push(OperandId, "'Base'");
1964     InstructionDesc[OpInBoundsAccessChain].operands.push(OperandVariableIds, "'Indexes'");
1965 
1966     InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Base'");
1967     InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Element'");
1968     InstructionDesc[OpPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'");
1969 
1970     InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Base'");
1971     InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Element'");
1972     InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'");
1973 
1974     InstructionDesc[OpSNegate].operands.push(OperandId, "'Operand'");
1975 
1976     InstructionDesc[OpFNegate].operands.push(OperandId, "'Operand'");
1977 
1978     InstructionDesc[OpNot].operands.push(OperandId, "'Operand'");
1979 
1980     InstructionDesc[OpAny].operands.push(OperandId, "'Vector'");
1981 
1982     InstructionDesc[OpAll].operands.push(OperandId, "'Vector'");
1983 
1984     InstructionDesc[OpConvertFToU].operands.push(OperandId, "'Float Value'");
1985 
1986     InstructionDesc[OpConvertFToS].operands.push(OperandId, "'Float Value'");
1987 
1988     InstructionDesc[OpConvertSToF].operands.push(OperandId, "'Signed Value'");
1989 
1990     InstructionDesc[OpConvertUToF].operands.push(OperandId, "'Unsigned Value'");
1991 
1992     InstructionDesc[OpUConvert].operands.push(OperandId, "'Unsigned Value'");
1993 
1994     InstructionDesc[OpSConvert].operands.push(OperandId, "'Signed Value'");
1995 
1996     InstructionDesc[OpFConvert].operands.push(OperandId, "'Float Value'");
1997 
1998     InstructionDesc[OpSatConvertSToU].operands.push(OperandId, "'Signed Value'");
1999 
2000     InstructionDesc[OpSatConvertUToS].operands.push(OperandId, "'Unsigned Value'");
2001 
2002     InstructionDesc[OpConvertPtrToU].operands.push(OperandId, "'Pointer'");
2003 
2004     InstructionDesc[OpConvertUToPtr].operands.push(OperandId, "'Integer Value'");
2005 
2006     InstructionDesc[OpPtrCastToGeneric].operands.push(OperandId, "'Pointer'");
2007 
2008     InstructionDesc[OpGenericCastToPtr].operands.push(OperandId, "'Pointer'");
2009 
2010     InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandId, "'Pointer'");
2011     InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandStorage, "'Storage'");
2012 
2013     InstructionDesc[OpGenericPtrMemSemantics].operands.push(OperandId, "'Pointer'");
2014 
2015     InstructionDesc[OpBitcast].operands.push(OperandId, "'Operand'");
2016 
2017     InstructionDesc[OpQuantizeToF16].operands.push(OperandId, "'Value'");
2018 
2019     InstructionDesc[OpTranspose].operands.push(OperandId, "'Matrix'");
2020 
2021     InstructionDesc[OpCopyLogical].operands.push(OperandId, "'Operand'");
2022 
2023     InstructionDesc[OpIsNan].operands.push(OperandId, "'x'");
2024 
2025     InstructionDesc[OpIsInf].operands.push(OperandId, "'x'");
2026 
2027     InstructionDesc[OpIsFinite].operands.push(OperandId, "'x'");
2028 
2029     InstructionDesc[OpIsNormal].operands.push(OperandId, "'x'");
2030 
2031     InstructionDesc[OpSignBitSet].operands.push(OperandId, "'x'");
2032 
2033     InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'x'");
2034     InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'y'");
2035 
2036     InstructionDesc[OpOrdered].operands.push(OperandId, "'x'");
2037     InstructionDesc[OpOrdered].operands.push(OperandId, "'y'");
2038 
2039     InstructionDesc[OpUnordered].operands.push(OperandId, "'x'");
2040     InstructionDesc[OpUnordered].operands.push(OperandId, "'y'");
2041 
2042     InstructionDesc[OpArrayLength].operands.push(OperandId, "'Structure'");
2043     InstructionDesc[OpArrayLength].operands.push(OperandLiteralNumber, "'Array member'");
2044 
2045     InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 1'");
2046     InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 2'");
2047 
2048     InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 1'");
2049     InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 2'");
2050 
2051     InstructionDesc[OpISub].operands.push(OperandId, "'Operand 1'");
2052     InstructionDesc[OpISub].operands.push(OperandId, "'Operand 2'");
2053 
2054     InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 1'");
2055     InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 2'");
2056 
2057     InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 1'");
2058     InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 2'");
2059 
2060     InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 1'");
2061     InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 2'");
2062 
2063     InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 1'");
2064     InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 2'");
2065 
2066     InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 1'");
2067     InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 2'");
2068 
2069     InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 1'");
2070     InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 2'");
2071 
2072     InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 1'");
2073     InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 2'");
2074 
2075     InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 1'");
2076     InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 2'");
2077 
2078     InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 1'");
2079     InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 2'");
2080 
2081     InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 1'");
2082     InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 2'");
2083 
2084     InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 1'");
2085     InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 2'");
2086 
2087     InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Vector'");
2088     InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Scalar'");
2089 
2090     InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Matrix'");
2091     InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Scalar'");
2092 
2093     InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Vector'");
2094     InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Matrix'");
2095 
2096     InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Matrix'");
2097     InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Vector'");
2098 
2099     InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'LeftMatrix'");
2100     InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'RightMatrix'");
2101 
2102     InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 1'");
2103     InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 2'");
2104 
2105     InstructionDesc[OpDot].operands.push(OperandId, "'Vector 1'");
2106     InstructionDesc[OpDot].operands.push(OperandId, "'Vector 2'");
2107 
2108     InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 1'");
2109     InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 2'");
2110 
2111     InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 1'");
2112     InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 2'");
2113 
2114     InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 1'");
2115     InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 2'");
2116 
2117     InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 1'");
2118     InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 2'");
2119 
2120     InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Base'");
2121     InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Shift'");
2122 
2123     InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Base'");
2124     InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Shift'");
2125 
2126     InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Base'");
2127     InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Shift'");
2128 
2129     InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 1'");
2130     InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 2'");
2131 
2132     InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 1'");
2133     InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 2'");
2134 
2135     InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 1'");
2136     InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 2'");
2137 
2138     InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 1'");
2139     InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 2'");
2140 
2141     InstructionDesc[OpLogicalNot].operands.push(OperandId, "'Operand'");
2142 
2143     InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 1'");
2144     InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 2'");
2145 
2146     InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 1'");
2147     InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 2'");
2148 
2149     InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 1'");
2150     InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 2'");
2151 
2152     InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Base'");
2153     InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Insert'");
2154     InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Offset'");
2155     InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Count'");
2156 
2157     InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Base'");
2158     InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Offset'");
2159     InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Count'");
2160 
2161     InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Base'");
2162     InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Offset'");
2163     InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Count'");
2164 
2165     InstructionDesc[OpBitReverse].operands.push(OperandId, "'Base'");
2166 
2167     InstructionDesc[OpBitCount].operands.push(OperandId, "'Base'");
2168 
2169     InstructionDesc[OpSelect].operands.push(OperandId, "'Condition'");
2170     InstructionDesc[OpSelect].operands.push(OperandId, "'Object 1'");
2171     InstructionDesc[OpSelect].operands.push(OperandId, "'Object 2'");
2172 
2173     InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 1'");
2174     InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 2'");
2175 
2176     InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 1'");
2177     InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 2'");
2178 
2179     InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 1'");
2180     InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 2'");
2181 
2182     InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 1'");
2183     InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 2'");
2184 
2185     InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 1'");
2186     InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 2'");
2187 
2188     InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 1'");
2189     InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 2'");
2190 
2191     InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 1'");
2192     InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 2'");
2193 
2194     InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 1'");
2195     InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 2'");
2196 
2197     InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 1'");
2198     InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 2'");
2199 
2200     InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 1'");
2201     InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 2'");
2202 
2203     InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 1'");
2204     InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 2'");
2205 
2206     InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 1'");
2207     InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 2'");
2208 
2209     InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 1'");
2210     InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 2'");
2211 
2212     InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 1'");
2213     InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 2'");
2214 
2215     InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 1'");
2216     InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 2'");
2217 
2218     InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 1'");
2219     InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 2'");
2220 
2221     InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 1'");
2222     InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 2'");
2223 
2224     InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 1'");
2225     InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 2'");
2226 
2227     InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
2228     InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
2229 
2230     InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
2231     InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
2232 
2233     InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
2234     InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
2235 
2236     InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
2237     InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
2238 
2239     InstructionDesc[OpDPdx].operands.push(OperandId, "'P'");
2240 
2241     InstructionDesc[OpDPdy].operands.push(OperandId, "'P'");
2242 
2243     InstructionDesc[OpFwidth].operands.push(OperandId, "'P'");
2244 
2245     InstructionDesc[OpDPdxFine].operands.push(OperandId, "'P'");
2246 
2247     InstructionDesc[OpDPdyFine].operands.push(OperandId, "'P'");
2248 
2249     InstructionDesc[OpFwidthFine].operands.push(OperandId, "'P'");
2250 
2251     InstructionDesc[OpDPdxCoarse].operands.push(OperandId, "'P'");
2252 
2253     InstructionDesc[OpDPdyCoarse].operands.push(OperandId, "'P'");
2254 
2255     InstructionDesc[OpFwidthCoarse].operands.push(OperandId, "'P'");
2256 
2257     InstructionDesc[OpEmitStreamVertex].operands.push(OperandId, "'Stream'");
2258 
2259     InstructionDesc[OpEndStreamPrimitive].operands.push(OperandId, "'Stream'");
2260 
2261     InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Execution'");
2262     InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Memory'");
2263     InstructionDesc[OpControlBarrier].operands.push(OperandMemorySemantics, "'Semantics'");
2264 
2265     InstructionDesc[OpMemoryBarrier].operands.push(OperandScope, "'Memory'");
2266     InstructionDesc[OpMemoryBarrier].operands.push(OperandMemorySemantics, "'Semantics'");
2267 
2268     InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Image'");
2269     InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Coordinate'");
2270     InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Sample'");
2271 
2272     InstructionDesc[OpAtomicLoad].operands.push(OperandId, "'Pointer'");
2273     InstructionDesc[OpAtomicLoad].operands.push(OperandScope, "'Scope'");
2274     InstructionDesc[OpAtomicLoad].operands.push(OperandMemorySemantics, "'Semantics'");
2275 
2276     InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Pointer'");
2277     InstructionDesc[OpAtomicStore].operands.push(OperandScope, "'Scope'");
2278     InstructionDesc[OpAtomicStore].operands.push(OperandMemorySemantics, "'Semantics'");
2279     InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Value'");
2280 
2281     InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Pointer'");
2282     InstructionDesc[OpAtomicExchange].operands.push(OperandScope, "'Scope'");
2283     InstructionDesc[OpAtomicExchange].operands.push(OperandMemorySemantics, "'Semantics'");
2284     InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Value'");
2285 
2286     InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Pointer'");
2287     InstructionDesc[OpAtomicCompareExchange].operands.push(OperandScope, "'Scope'");
2288     InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Equal'");
2289     InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Unequal'");
2290     InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Value'");
2291     InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Comparator'");
2292 
2293     InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Pointer'");
2294     InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandScope, "'Scope'");
2295     InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Equal'");
2296     InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Unequal'");
2297     InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Value'");
2298     InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Comparator'");
2299 
2300     InstructionDesc[OpAtomicIIncrement].operands.push(OperandId, "'Pointer'");
2301     InstructionDesc[OpAtomicIIncrement].operands.push(OperandScope, "'Scope'");
2302     InstructionDesc[OpAtomicIIncrement].operands.push(OperandMemorySemantics, "'Semantics'");
2303 
2304     InstructionDesc[OpAtomicIDecrement].operands.push(OperandId, "'Pointer'");
2305     InstructionDesc[OpAtomicIDecrement].operands.push(OperandScope, "'Scope'");
2306     InstructionDesc[OpAtomicIDecrement].operands.push(OperandMemorySemantics, "'Semantics'");
2307 
2308     InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Pointer'");
2309     InstructionDesc[OpAtomicIAdd].operands.push(OperandScope, "'Scope'");
2310     InstructionDesc[OpAtomicIAdd].operands.push(OperandMemorySemantics, "'Semantics'");
2311     InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Value'");
2312 
2313     InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Pointer'");
2314     InstructionDesc[OpAtomicFAddEXT].operands.push(OperandScope, "'Scope'");
2315     InstructionDesc[OpAtomicFAddEXT].operands.push(OperandMemorySemantics, "'Semantics'");
2316     InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Value'");
2317 
2318     InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Pointer'");
2319     InstructionDesc[OpAtomicISub].operands.push(OperandScope, "'Scope'");
2320     InstructionDesc[OpAtomicISub].operands.push(OperandMemorySemantics, "'Semantics'");
2321     InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Value'");
2322 
2323     InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Pointer'");
2324     InstructionDesc[OpAtomicUMin].operands.push(OperandScope, "'Scope'");
2325     InstructionDesc[OpAtomicUMin].operands.push(OperandMemorySemantics, "'Semantics'");
2326     InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Value'");
2327 
2328     InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Pointer'");
2329     InstructionDesc[OpAtomicUMax].operands.push(OperandScope, "'Scope'");
2330     InstructionDesc[OpAtomicUMax].operands.push(OperandMemorySemantics, "'Semantics'");
2331     InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Value'");
2332 
2333     InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Pointer'");
2334     InstructionDesc[OpAtomicSMin].operands.push(OperandScope, "'Scope'");
2335     InstructionDesc[OpAtomicSMin].operands.push(OperandMemorySemantics, "'Semantics'");
2336     InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Value'");
2337 
2338     InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Pointer'");
2339     InstructionDesc[OpAtomicSMax].operands.push(OperandScope, "'Scope'");
2340     InstructionDesc[OpAtomicSMax].operands.push(OperandMemorySemantics, "'Semantics'");
2341     InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Value'");
2342 
2343     InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Pointer'");
2344     InstructionDesc[OpAtomicAnd].operands.push(OperandScope, "'Scope'");
2345     InstructionDesc[OpAtomicAnd].operands.push(OperandMemorySemantics, "'Semantics'");
2346     InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Value'");
2347 
2348     InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Pointer'");
2349     InstructionDesc[OpAtomicOr].operands.push(OperandScope, "'Scope'");
2350     InstructionDesc[OpAtomicOr].operands.push(OperandMemorySemantics, "'Semantics'");
2351     InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Value'");
2352 
2353     InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Pointer'");
2354     InstructionDesc[OpAtomicXor].operands.push(OperandScope, "'Scope'");
2355     InstructionDesc[OpAtomicXor].operands.push(OperandMemorySemantics, "'Semantics'");
2356     InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Value'");
2357 
2358     InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandId, "'Pointer'");
2359     InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandScope, "'Scope'");
2360     InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandMemorySemantics, "'Semantics'");
2361 
2362     InstructionDesc[OpAtomicFlagClear].operands.push(OperandId, "'Pointer'");
2363     InstructionDesc[OpAtomicFlagClear].operands.push(OperandScope, "'Scope'");
2364     InstructionDesc[OpAtomicFlagClear].operands.push(OperandMemorySemantics, "'Semantics'");
2365 
2366     InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Merge Block'");
2367     InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Continue Target'");
2368     InstructionDesc[OpLoopMerge].operands.push(OperandLoop, "");
2369     InstructionDesc[OpLoopMerge].operands.push(OperandOptionalLiteral, "");
2370 
2371     InstructionDesc[OpSelectionMerge].operands.push(OperandId, "'Merge Block'");
2372     InstructionDesc[OpSelectionMerge].operands.push(OperandSelect, "");
2373 
2374     InstructionDesc[OpBranch].operands.push(OperandId, "'Target Label'");
2375 
2376     InstructionDesc[OpBranchConditional].operands.push(OperandId, "'Condition'");
2377     InstructionDesc[OpBranchConditional].operands.push(OperandId, "'True Label'");
2378     InstructionDesc[OpBranchConditional].operands.push(OperandId, "'False Label'");
2379     InstructionDesc[OpBranchConditional].operands.push(OperandVariableLiterals, "'Branch weights'");
2380 
2381     InstructionDesc[OpSwitch].operands.push(OperandId, "'Selector'");
2382     InstructionDesc[OpSwitch].operands.push(OperandId, "'Default'");
2383     InstructionDesc[OpSwitch].operands.push(OperandVariableLiteralId, "'Target'");
2384 
2385 
2386     InstructionDesc[OpReturnValue].operands.push(OperandId, "'Value'");
2387 
2388     InstructionDesc[OpLifetimeStart].operands.push(OperandId, "'Pointer'");
2389     InstructionDesc[OpLifetimeStart].operands.push(OperandLiteralNumber, "'Size'");
2390 
2391     InstructionDesc[OpLifetimeStop].operands.push(OperandId, "'Pointer'");
2392     InstructionDesc[OpLifetimeStop].operands.push(OperandLiteralNumber, "'Size'");
2393 
2394     InstructionDesc[OpGroupAsyncCopy].operands.push(OperandScope, "'Execution'");
2395     InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Destination'");
2396     InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Source'");
2397     InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Num Elements'");
2398     InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Stride'");
2399     InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Event'");
2400 
2401     InstructionDesc[OpGroupWaitEvents].operands.push(OperandScope, "'Execution'");
2402     InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Num Events'");
2403     InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Events List'");
2404 
2405     InstructionDesc[OpGroupAll].operands.push(OperandScope, "'Execution'");
2406     InstructionDesc[OpGroupAll].operands.push(OperandId, "'Predicate'");
2407 
2408     InstructionDesc[OpGroupAny].operands.push(OperandScope, "'Execution'");
2409     InstructionDesc[OpGroupAny].operands.push(OperandId, "'Predicate'");
2410 
2411     InstructionDesc[OpGroupBroadcast].operands.push(OperandScope, "'Execution'");
2412     InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'Value'");
2413     InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'LocalId'");
2414 
2415     InstructionDesc[OpGroupIAdd].operands.push(OperandScope, "'Execution'");
2416     InstructionDesc[OpGroupIAdd].operands.push(OperandGroupOperation, "'Operation'");
2417     InstructionDesc[OpGroupIAdd].operands.push(OperandId, "'X'");
2418 
2419     InstructionDesc[OpGroupFAdd].operands.push(OperandScope, "'Execution'");
2420     InstructionDesc[OpGroupFAdd].operands.push(OperandGroupOperation, "'Operation'");
2421     InstructionDesc[OpGroupFAdd].operands.push(OperandId, "'X'");
2422 
2423     InstructionDesc[OpGroupUMin].operands.push(OperandScope, "'Execution'");
2424     InstructionDesc[OpGroupUMin].operands.push(OperandGroupOperation, "'Operation'");
2425     InstructionDesc[OpGroupUMin].operands.push(OperandId, "'X'");
2426 
2427     InstructionDesc[OpGroupSMin].operands.push(OperandScope, "'Execution'");
2428     InstructionDesc[OpGroupSMin].operands.push(OperandGroupOperation, "'Operation'");
2429     InstructionDesc[OpGroupSMin].operands.push(OperandId, "X");
2430 
2431     InstructionDesc[OpGroupFMin].operands.push(OperandScope, "'Execution'");
2432     InstructionDesc[OpGroupFMin].operands.push(OperandGroupOperation, "'Operation'");
2433     InstructionDesc[OpGroupFMin].operands.push(OperandId, "X");
2434 
2435     InstructionDesc[OpGroupUMax].operands.push(OperandScope, "'Execution'");
2436     InstructionDesc[OpGroupUMax].operands.push(OperandGroupOperation, "'Operation'");
2437     InstructionDesc[OpGroupUMax].operands.push(OperandId, "X");
2438 
2439     InstructionDesc[OpGroupSMax].operands.push(OperandScope, "'Execution'");
2440     InstructionDesc[OpGroupSMax].operands.push(OperandGroupOperation, "'Operation'");
2441     InstructionDesc[OpGroupSMax].operands.push(OperandId, "X");
2442 
2443     InstructionDesc[OpGroupFMax].operands.push(OperandScope, "'Execution'");
2444     InstructionDesc[OpGroupFMax].operands.push(OperandGroupOperation, "'Operation'");
2445     InstructionDesc[OpGroupFMax].operands.push(OperandId, "X");
2446 
2447     InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pipe'");
2448     InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pointer'");
2449     InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Size'");
2450     InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Alignment'");
2451 
2452     InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pipe'");
2453     InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pointer'");
2454     InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Size'");
2455     InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Alignment'");
2456 
2457     InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pipe'");
2458     InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Reserve Id'");
2459     InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Index'");
2460     InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pointer'");
2461     InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Size'");
2462     InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Alignment'");
2463 
2464     InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pipe'");
2465     InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Reserve Id'");
2466     InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Index'");
2467     InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pointer'");
2468     InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Size'");
2469     InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Alignment'");
2470 
2471     InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Pipe'");
2472     InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Num Packets'");
2473     InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Size'");
2474     InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'");
2475 
2476     InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Pipe'");
2477     InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Num Packets'");
2478     InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Size'");
2479     InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'");
2480 
2481     InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Pipe'");
2482     InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Reserve Id'");
2483     InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Size'");
2484     InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Alignment'");
2485 
2486     InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Pipe'");
2487     InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Reserve Id'");
2488     InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Size'");
2489     InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Alignment'");
2490 
2491     InstructionDesc[OpIsValidReserveId].operands.push(OperandId, "'Reserve Id'");
2492 
2493     InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Pipe'");
2494     InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Size'");
2495     InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Alignment'");
2496 
2497     InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Pipe'");
2498     InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Size'");
2499     InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Alignment'");
2500 
2501     InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandScope, "'Execution'");
2502     InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Pipe'");
2503     InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Num Packets'");
2504     InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Size'");
2505     InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'");
2506 
2507     InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandScope, "'Execution'");
2508     InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Pipe'");
2509     InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Num Packets'");
2510     InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Size'");
2511     InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'");
2512 
2513     InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandScope, "'Execution'");
2514     InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Pipe'");
2515     InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Reserve Id'");
2516     InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Size'");
2517     InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Alignment'");
2518 
2519     InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandScope, "'Execution'");
2520     InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Pipe'");
2521     InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Reserve Id'");
2522     InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Size'");
2523     InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Alignment'");
2524 
2525     InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkSize'");
2526     InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'LocalWorkSize'");
2527     InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkOffset'");
2528 
2529     InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Event'");
2530     InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Profiling Info'");
2531     InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Value'");
2532 
2533     InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Event'");
2534     InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Status'");
2535 
2536     InstructionDesc[OpIsValidEvent].operands.push(OperandId, "'Event'");
2537 
2538     InstructionDesc[OpRetainEvent].operands.push(OperandId, "'Event'");
2539 
2540     InstructionDesc[OpReleaseEvent].operands.push(OperandId, "'Event'");
2541 
2542     InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Invoke'");
2543     InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param'");
2544     InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Size'");
2545     InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Align'");
2546 
2547     InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Invoke'");
2548     InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param'");
2549     InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Size'");
2550     InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Align'");
2551 
2552     InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'ND Range'");
2553     InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Invoke'");
2554     InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param'");
2555     InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Size'");
2556     InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Align'");
2557 
2558     InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'ND Range'");
2559     InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Invoke'");
2560     InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param'");
2561     InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Size'");
2562     InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Align'");
2563 
2564     InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Queue'");
2565     InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Flags'");
2566     InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'ND Range'");
2567     InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Num Events'");
2568     InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Wait Events'");
2569     InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Ret Event'");
2570     InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Invoke'");
2571     InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param'");
2572     InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Size'");
2573     InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Align'");
2574     InstructionDesc[OpEnqueueKernel].operands.push(OperandVariableIds, "'Local Size'");
2575 
2576     InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Queue'");
2577     InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Num Events'");
2578     InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Wait Events'");
2579     InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Ret Event'");
2580 
2581     InstructionDesc[OpGroupNonUniformElect].operands.push(OperandScope, "'Execution'");
2582 
2583     InstructionDesc[OpGroupNonUniformAll].operands.push(OperandScope, "'Execution'");
2584     InstructionDesc[OpGroupNonUniformAll].operands.push(OperandId, "X");
2585 
2586     InstructionDesc[OpGroupNonUniformAny].operands.push(OperandScope, "'Execution'");
2587     InstructionDesc[OpGroupNonUniformAny].operands.push(OperandId, "X");
2588 
2589     InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandScope, "'Execution'");
2590     InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandId, "X");
2591 
2592     InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandScope, "'Execution'");
2593     InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "X");
2594     InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "ID");
2595 
2596     InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandScope, "'Execution'");
2597     InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandId, "X");
2598 
2599     InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandScope, "'Execution'");
2600     InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandId, "X");
2601 
2602     InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandScope, "'Execution'");
2603     InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandId, "X");
2604 
2605     InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandScope, "'Execution'");
2606     InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "X");
2607     InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "Bit");
2608 
2609     InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandScope, "'Execution'");
2610     InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandGroupOperation, "'Operation'");
2611     InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandId, "X");
2612 
2613     InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandScope, "'Execution'");
2614     InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandId, "X");
2615 
2616     InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandScope, "'Execution'");
2617     InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandId, "X");
2618 
2619     InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandScope, "'Execution'");
2620     InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "X");
2621     InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "'Id'");
2622 
2623     InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandScope, "'Execution'");
2624     InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "X");
2625     InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "Mask");
2626 
2627     InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandScope, "'Execution'");
2628     InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "X");
2629     InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "Offset");
2630 
2631     InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandScope, "'Execution'");
2632     InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "X");
2633     InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "Offset");
2634 
2635     InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandScope, "'Execution'");
2636     InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandGroupOperation, "'Operation'");
2637     InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "X");
2638     InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "'ClusterSize'", true);
2639 
2640     InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandScope, "'Execution'");
2641     InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandGroupOperation, "'Operation'");
2642     InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "X");
2643     InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "'ClusterSize'", true);
2644 
2645     InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandScope, "'Execution'");
2646     InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandGroupOperation, "'Operation'");
2647     InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "X");
2648     InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "'ClusterSize'", true);
2649 
2650     InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandScope, "'Execution'");
2651     InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandGroupOperation, "'Operation'");
2652     InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "X");
2653     InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "'ClusterSize'", true);
2654 
2655     InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandScope, "'Execution'");
2656     InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandGroupOperation, "'Operation'");
2657     InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "X");
2658     InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "'ClusterSize'", true);
2659 
2660     InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandScope, "'Execution'");
2661     InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandGroupOperation, "'Operation'");
2662     InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "X");
2663     InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "'ClusterSize'", true);
2664 
2665     InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandScope, "'Execution'");
2666     InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandGroupOperation, "'Operation'");
2667     InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "X");
2668     InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "'ClusterSize'", true);
2669 
2670     InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandScope, "'Execution'");
2671     InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandGroupOperation, "'Operation'");
2672     InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "X");
2673     InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "'ClusterSize'", true);
2674 
2675     InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandScope, "'Execution'");
2676     InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandGroupOperation, "'Operation'");
2677     InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "X");
2678     InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "'ClusterSize'", true);
2679 
2680     InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandScope, "'Execution'");
2681     InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandGroupOperation, "'Operation'");
2682     InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "X");
2683     InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "'ClusterSize'", true);
2684 
2685     InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandScope, "'Execution'");
2686     InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandGroupOperation, "'Operation'");
2687     InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "X");
2688     InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "'ClusterSize'", true);
2689 
2690     InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandScope, "'Execution'");
2691     InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandGroupOperation, "'Operation'");
2692     InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "X");
2693     InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "'ClusterSize'", true);
2694 
2695     InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandScope, "'Execution'");
2696     InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandGroupOperation, "'Operation'");
2697     InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "X");
2698     InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "'ClusterSize'", true);
2699 
2700     InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandScope, "'Execution'");
2701     InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandGroupOperation, "'Operation'");
2702     InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "X");
2703     InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "'ClusterSize'", true);
2704 
2705     InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandScope, "'Execution'");
2706     InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandGroupOperation, "'Operation'");
2707     InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "X");
2708     InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "'ClusterSize'", true);
2709 
2710     InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandScope, "'Execution'");
2711     InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandGroupOperation, "'Operation'");
2712     InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "X");
2713     InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "'ClusterSize'", true);
2714 
2715     InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandScope, "'Execution'");
2716     InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "X");
2717     InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "'Id'");
2718 
2719     InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandScope, "'Execution'");
2720     InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "X");
2721     InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandLiteralNumber, "'Direction'");
2722 
2723     InstructionDesc[OpSubgroupBallotKHR].operands.push(OperandId, "'Predicate'");
2724 
2725     InstructionDesc[OpSubgroupFirstInvocationKHR].operands.push(OperandId, "'Value'");
2726 
2727     InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandScope, "'Execution'");
2728     InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandId, "'Predicate'");
2729 
2730     InstructionDesc[OpSubgroupAllKHR].operands.push(OperandScope, "'Execution'");
2731     InstructionDesc[OpSubgroupAllKHR].operands.push(OperandId, "'Predicate'");
2732 
2733     InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandScope, "'Execution'");
2734     InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandId, "'Predicate'");
2735 
2736     InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Value'");
2737     InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Index'");
2738 
2739     InstructionDesc[OpModuleProcessed].operands.push(OperandLiteralString, "'process'");
2740 
2741     InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandScope, "'Execution'");
2742     InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
2743     InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandId, "'X'");
2744 
2745     InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandScope, "'Execution'");
2746     InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
2747     InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandId, "'X'");
2748 
2749     InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandScope, "'Execution'");
2750     InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
2751     InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandId, "'X'");
2752 
2753     InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandScope, "'Execution'");
2754     InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
2755     InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandId, "X");
2756 
2757     InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandScope, "'Execution'");
2758     InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
2759     InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandId, "X");
2760 
2761     InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandScope, "'Execution'");
2762     InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
2763     InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandId, "X");
2764 
2765     InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandScope, "'Execution'");
2766     InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
2767     InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandId, "X");
2768 
2769     InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandScope, "'Execution'");
2770     InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
2771     InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandId, "X");
2772 
2773     InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Image'");
2774     InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Coordinate'");
2775 
2776     InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Image'");
2777     InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Coordinate'");
2778     InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Fragment Index'");
2779 
2780     InstructionDesc[OpGroupNonUniformPartitionNV].operands.push(OperandId, "X");
2781 
2782     InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false);
2783 
2784     InstructionDesc[OpTraceNV].operands.push(OperandId, "'Acceleration Structure'");
2785     InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Flags'");
2786     InstructionDesc[OpTraceNV].operands.push(OperandId, "'Cull Mask'");
2787     InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Offset'");
2788     InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Stride'");
2789     InstructionDesc[OpTraceNV].operands.push(OperandId, "'Miss Index'");
2790     InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Origin'");
2791     InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMin'");
2792     InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Direction'");
2793     InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMax'");
2794     InstructionDesc[OpTraceNV].operands.push(OperandId, "'Payload'");
2795     InstructionDesc[OpTraceNV].setResultAndType(false, false);
2796 
2797     InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Acceleration Structure'");
2798     InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Flags'");
2799     InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Cull Mask'");
2800     InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Offset'");
2801     InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Stride'");
2802     InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Miss Index'");
2803     InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Origin'");
2804     InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMin'");
2805     InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Direction'");
2806     InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMax'");
2807     InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Payload'");
2808     InstructionDesc[OpTraceRayKHR].setResultAndType(false, false);
2809 
2810     InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Parameter'");
2811     InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Kind'");
2812 
2813     InstructionDesc[OpIgnoreIntersectionNV].setResultAndType(false, false);
2814 
2815     InstructionDesc[OpIgnoreIntersectionKHR].setResultAndType(false, false);
2816 
2817     InstructionDesc[OpTerminateRayNV].setResultAndType(false, false);
2818 
2819     InstructionDesc[OpTerminateRayKHR].setResultAndType(false, false);
2820 
2821     InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "SBT Record Index");
2822     InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "CallableData ID");
2823     InstructionDesc[OpExecuteCallableNV].setResultAndType(false, false);
2824 
2825     InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "SBT Record Index");
2826     InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "CallableData");
2827     InstructionDesc[OpExecuteCallableKHR].setResultAndType(false, false);
2828 
2829     InstructionDesc[OpConvertUToAccelerationStructureKHR].operands.push(OperandId, "Value");
2830     InstructionDesc[OpConvertUToAccelerationStructureKHR].setResultAndType(true, true);
2831 
2832     // Ray Query
2833     InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false);
2834     InstructionDesc[OpTypeRayQueryKHR].setResultAndType(true, false);
2835 
2836     InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayQuery'");
2837     InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'AccelerationS'");
2838     InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayFlags'");
2839     InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'CullMask'");
2840     InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Origin'");
2841     InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmin'");
2842     InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Direction'");
2843     InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmax'");
2844     InstructionDesc[OpRayQueryInitializeKHR].setResultAndType(false, false);
2845 
2846     InstructionDesc[OpRayQueryTerminateKHR].operands.push(OperandId, "'RayQuery'");
2847     InstructionDesc[OpRayQueryTerminateKHR].setResultAndType(false, false);
2848 
2849     InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'RayQuery'");
2850     InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'THit'");
2851     InstructionDesc[OpRayQueryGenerateIntersectionKHR].setResultAndType(false, false);
2852 
2853     InstructionDesc[OpRayQueryConfirmIntersectionKHR].operands.push(OperandId, "'RayQuery'");
2854     InstructionDesc[OpRayQueryConfirmIntersectionKHR].setResultAndType(false, false);
2855 
2856     InstructionDesc[OpRayQueryProceedKHR].operands.push(OperandId, "'RayQuery'");
2857     InstructionDesc[OpRayQueryProceedKHR].setResultAndType(true, true);
2858 
2859     InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'RayQuery'");
2860     InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'Committed'");
2861     InstructionDesc[OpRayQueryGetIntersectionTypeKHR].setResultAndType(true, true);
2862 
2863     InstructionDesc[OpRayQueryGetRayTMinKHR].operands.push(OperandId, "'RayQuery'");
2864     InstructionDesc[OpRayQueryGetRayTMinKHR].setResultAndType(true, true);
2865 
2866     InstructionDesc[OpRayQueryGetRayFlagsKHR].operands.push(OperandId, "'RayQuery'");
2867     InstructionDesc[OpRayQueryGetRayFlagsKHR].setResultAndType(true, true);
2868 
2869     InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'RayQuery'");
2870     InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'Committed'");
2871     InstructionDesc[OpRayQueryGetIntersectionTKHR].setResultAndType(true, true);
2872 
2873     InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'RayQuery'");
2874     InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'Committed'");
2875     InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].setResultAndType(true, true);
2876 
2877     InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'RayQuery'");
2878     InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'Committed'");
2879     InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].setResultAndType(true, true);
2880 
2881     InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'RayQuery'");
2882     InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'Committed'");
2883     InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].setResultAndType(true, true);
2884 
2885     InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'RayQuery'");
2886     InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'Committed'");
2887     InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].setResultAndType(true, true);
2888 
2889     InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'RayQuery'");
2890     InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'Committed'");
2891     InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].setResultAndType(true, true);
2892 
2893     InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'RayQuery'");
2894     InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'Committed'");
2895     InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].setResultAndType(true, true);
2896 
2897     InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'RayQuery'");
2898     InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'Committed'");
2899     InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].setResultAndType(true, true);
2900 
2901     InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].operands.push(OperandId, "'RayQuery'");
2902     InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].setResultAndType(true, true);
2903 
2904     InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'RayQuery'");
2905     InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'Committed'");
2906     InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].setResultAndType(true, true);
2907 
2908     InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'RayQuery'");
2909     InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'Committed'");
2910     InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].setResultAndType(true, true);
2911 
2912     InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].operands.push(OperandId, "'RayQuery'");
2913     InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].setResultAndType(true, true);
2914 
2915     InstructionDesc[OpRayQueryGetWorldRayOriginKHR].operands.push(OperandId, "'RayQuery'");
2916     InstructionDesc[OpRayQueryGetWorldRayOriginKHR].setResultAndType(true, true);
2917 
2918     InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'RayQuery'");
2919     InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'Committed'");
2920     InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].setResultAndType(true, true);
2921 
2922     InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'RayQuery'");
2923     InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'Committed'");
2924     InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].setResultAndType(true, true);
2925 
2926     InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'");
2927     InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'");
2928     InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'");
2929     InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coarse'");
2930     InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandImageOperands, "", true);
2931     InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandVariableIds, "", true);
2932 
2933     InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Index Offset'");
2934     InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Packed Indices'");
2935 
2936     InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Component Type'");
2937     InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Scope'");
2938     InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Rows'");
2939     InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Columns'");
2940 
2941     InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Pointer'");
2942     InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Stride'");
2943     InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Column Major'");
2944     InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandMemoryAccess, "'Memory Access'");
2945     InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandLiteralNumber, "", true);
2946     InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "", true);
2947 
2948     InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Pointer'");
2949     InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Object'");
2950     InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Stride'");
2951     InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Column Major'");
2952     InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandMemoryAccess, "'Memory Access'");
2953     InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandLiteralNumber, "", true);
2954     InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "", true);
2955 
2956     InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'A'");
2957     InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'B'");
2958     InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'C'");
2959 
2960     InstructionDesc[OpCooperativeMatrixLengthNV].operands.push(OperandId, "'Type'");
2961 
2962     InstructionDesc[OpDemoteToHelperInvocationEXT].setResultAndType(false, false);
2963 
2964     InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'");
2965 }
2966 
2967 }; // end spv namespace
2968