blob: 388b29faf6e45346b79bd714d45474c94745c027 [file] [log] [blame]
John Kessenich140f3df2015-06-26 16:58:36 -06001//
John Kessenich927608b2017-01-06 12:34:14 -07002// Copyright (C) 2014-2015 LunarG, Inc.
John Kessenich140f3df2015-06-26 16:58:36 -06003//
John Kessenich927608b2017-01-06 12:34:14 -07004// All rights reserved.
John Kessenich140f3df2015-06-26 16:58:36 -06005//
John Kessenich927608b2017-01-06 12:34:14 -07006// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions
8// are met:
John Kessenich140f3df2015-06-26 16:58:36 -06009//
10// Redistributions of source code must retain the above copyright
11// notice, this list of conditions and the following disclaimer.
12//
13// Redistributions in binary form must reproduce the above
14// copyright notice, this list of conditions and the following
15// disclaimer in the documentation and/or other materials provided
16// with the distribution.
17//
18// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
19// contributors may be used to endorse or promote products derived
20// from this software without specific prior written permission.
21//
John Kessenich927608b2017-01-06 12:34:14 -070022// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33// POSSIBILITY OF SUCH DAMAGE.
John Kessenich140f3df2015-06-26 16:58:36 -060034
35//
John Kessenich66ec80e2016-08-05 14:04:23 -060036// 1) Programmatically fill in instruction/operand information.
John Kessenich140f3df2015-06-26 16:58:36 -060037// This can be used for disassembly, printing documentation, etc.
38//
39// 2) Print documentation from this parameterization.
40//
41
42#include "doc.h"
43
John Kessenich66ec80e2016-08-05 14:04:23 -060044#include <cstdio>
45#include <cstring>
John Kessenich140f3df2015-06-26 16:58:36 -060046#include <algorithm>
47
Rex Xu9d93a232016-05-05 12:30:44 +080048namespace spv {
49 extern "C" {
50 // Include C-based headers that don't have a namespace
John Kessenich6c8aaac2017-02-27 01:20:51 -070051 #include "GLSL.ext.KHR.h"
Piers Daniell1c5443c2017-12-13 13:07:22 -070052 #include "GLSL.ext.EXT.h"
Rex Xu51596642016-09-21 18:56:12 +080053#ifdef AMD_EXTENSIONS
Rex Xu9d93a232016-05-05 12:30:44 +080054 #include "GLSL.ext.AMD.h"
Rex Xu51596642016-09-21 18:56:12 +080055#endif
chaoc0ad6a4e2016-12-19 16:29:34 -080056#ifdef NV_EXTENSIONS
57 #include "GLSL.ext.NV.h"
58#endif
Rex Xu9d93a232016-05-05 12:30:44 +080059 }
60}
Rex Xu9d93a232016-05-05 12:30:44 +080061
John Kessenich140f3df2015-06-26 16:58:36 -060062namespace spv {
63
64//
65// Whole set of functions that translate enumerants to their text strings for
66// the specification (or their sanitized versions for auto-generating the
John Kessenich5e4b1242015-08-06 22:53:06 -060067// spirv headers.
John Kessenich140f3df2015-06-26 16:58:36 -060068//
John Kessenich10971552018-03-30 00:11:39 -060069// Also, for masks the ceilings are declared next to these, to help keep them in sync.
John Kessenich140f3df2015-06-26 16:58:36 -060070// Ceilings should be
71// - one more than the maximum value an enumerant takes on, for non-mask enumerants
John Kessenicha09eefd2017-04-07 15:40:30 -060072// (for non-sparse enums, this is the number of enumerants)
John Kessenich140f3df2015-06-26 16:58:36 -060073// - the number of bits consumed by the set of masks
John Kessenicha09eefd2017-04-07 15:40:30 -060074// (for non-sparse mask enums, this is the number of enumerants)
John Kessenich140f3df2015-06-26 16:58:36 -060075//
76
John Kessenich140f3df2015-06-26 16:58:36 -060077const char* SourceString(int source)
78{
79 switch (source) {
80 case 0: return "Unknown";
81 case 1: return "ESSL";
82 case 2: return "GLSL";
John Kessenich55e7d112015-11-15 21:33:39 -070083 case 3: return "OpenCL_C";
84 case 4: return "OpenCL_CPP";
John Kessenich66e2faf2016-03-12 18:34:36 -070085 case 5: return "HLSL";
John Kessenich140f3df2015-06-26 16:58:36 -060086
John Kessenich140f3df2015-06-26 16:58:36 -060087 default: return "Bad";
88 }
89}
90
John Kessenich140f3df2015-06-26 16:58:36 -060091const char* ExecutionModelString(int model)
92{
93 switch (model) {
94 case 0: return "Vertex";
95 case 1: return "TessellationControl";
96 case 2: return "TessellationEvaluation";
97 case 3: return "Geometry";
98 case 4: return "Fragment";
99 case 5: return "GLCompute";
100 case 6: return "Kernel";
Chao Chen3c366992018-09-19 11:41:59 -0700101#ifdef NV_EXTENSIONS
102 case ExecutionModelTaskNV: return "TaskNV";
103 case ExecutionModelMeshNV: return "MeshNV";
104#endif
John Kessenich140f3df2015-06-26 16:58:36 -0600105
John Kessenich140f3df2015-06-26 16:58:36 -0600106 default: return "Bad";
Chao Chenb50c02e2018-09-19 11:42:24 -0700107
108#ifdef NV_EXTENSIONS
Ashwin Leleff1783d2018-10-22 16:41:44 -0700109 case ExecutionModelRayGenerationNV: return "RayGenerationNV";
110 case ExecutionModelIntersectionNV: return "IntersectionNV";
111 case ExecutionModelAnyHitNV: return "AnyHitNV";
112 case ExecutionModelClosestHitNV: return "ClosestHitNV";
113 case ExecutionModelMissNV: return "MissNV";
114 case ExecutionModelCallableNV: return "CallableNV";
Chao Chenb50c02e2018-09-19 11:42:24 -0700115#endif
116
John Kessenich140f3df2015-06-26 16:58:36 -0600117 }
118}
119
John Kessenich140f3df2015-06-26 16:58:36 -0600120const char* AddressingString(int addr)
121{
122 switch (addr) {
123 case 0: return "Logical";
124 case 1: return "Physical32";
125 case 2: return "Physical64";
126
Jeff Bolz9f2aec42019-01-06 17:58:04 -0600127 case AddressingModelPhysicalStorageBuffer64EXT: return "PhysicalStorageBuffer64EXT";
128
John Kessenich140f3df2015-06-26 16:58:36 -0600129 default: return "Bad";
130 }
131}
132
John Kessenich140f3df2015-06-26 16:58:36 -0600133const char* MemoryString(int mem)
134{
135 switch (mem) {
Jeff Bolz36831c92018-09-05 10:11:41 -0500136 case MemoryModelSimple: return "Simple";
137 case MemoryModelGLSL450: return "GLSL450";
138 case MemoryModelOpenCL: return "OpenCL";
139 case MemoryModelVulkanKHR: return "VulkanKHR";
John Kessenich140f3df2015-06-26 16:58:36 -0600140
John Kessenich140f3df2015-06-26 16:58:36 -0600141 default: return "Bad";
142 }
143}
144
John Kessenich55e7d112015-11-15 21:33:39 -0700145const int ExecutionModeCeiling = 33;
John Kessenich140f3df2015-06-26 16:58:36 -0600146
147const char* ExecutionModeString(int mode)
148{
149 switch (mode) {
150 case 0: return "Invocations";
151 case 1: return "SpacingEqual";
152 case 2: return "SpacingFractionalEven";
153 case 3: return "SpacingFractionalOdd";
154 case 4: return "VertexOrderCw";
155 case 5: return "VertexOrderCcw";
156 case 6: return "PixelCenterInteger";
157 case 7: return "OriginUpperLeft";
John Kessenich5e4b1242015-08-06 22:53:06 -0600158 case 8: return "OriginLowerLeft";
159 case 9: return "EarlyFragmentTests";
160 case 10: return "PointMode";
161 case 11: return "Xfb";
162 case 12: return "DepthReplacing";
John Kessenich55e7d112015-11-15 21:33:39 -0700163 case 13: return "Bad";
John Kessenich5e4b1242015-08-06 22:53:06 -0600164 case 14: return "DepthGreater";
165 case 15: return "DepthLess";
166 case 16: return "DepthUnchanged";
167 case 17: return "LocalSize";
168 case 18: return "LocalSizeHint";
169 case 19: return "InputPoints";
170 case 20: return "InputLines";
171 case 21: return "InputLinesAdjacency";
John Kessenich55e7d112015-11-15 21:33:39 -0700172 case 22: return "Triangles";
John Kessenich5e4b1242015-08-06 22:53:06 -0600173 case 23: return "InputTrianglesAdjacency";
John Kessenich55e7d112015-11-15 21:33:39 -0700174 case 24: return "Quads";
175 case 25: return "Isolines";
John Kessenich5e4b1242015-08-06 22:53:06 -0600176 case 26: return "OutputVertices";
177 case 27: return "OutputPoints";
178 case 28: return "OutputLineStrip";
179 case 29: return "OutputTriangleStrip";
180 case 30: return "VecTypeHint";
181 case 31: return "ContractionOff";
John Kessenich55e7d112015-11-15 21:33:39 -0700182 case 32: return "Bad";
John Kessenich140f3df2015-06-26 16:58:36 -0600183
chaocc1204522017-06-30 17:14:30 -0700184 case 4446: return "PostDepthCoverage";
Chao Chenbeae2252018-09-19 11:40:45 -0700185
186#ifdef NV_EXTENSIONS
Chao Chen3c366992018-09-19 11:41:59 -0700187 case ExecutionModeOutputLinesNV: return "OutputLinesNV";
188 case ExecutionModeOutputPrimitivesNV: return "OutputPrimitivesNV";
189 case ExecutionModeOutputTrianglesNV: return "OutputTrianglesNV";
Chao Chenbeae2252018-09-19 11:40:45 -0700190 case ExecutionModeDerivativeGroupQuadsNV: return "DerivativeGroupQuadsNV";
191 case ExecutionModeDerivativeGroupLinearNV: return "DerivativeGroupLinearNV";
192#endif
193
Jeff Bolzc6f0ce82019-06-03 11:33:50 -0500194 case ExecutionModePixelInterlockOrderedEXT: return "PixelInterlockOrderedEXT";
195 case ExecutionModePixelInterlockUnorderedEXT: return "PixelInterlockUnorderedEXT";
196 case ExecutionModeSampleInterlockOrderedEXT: return "SampleInterlockOrderedEXT";
197 case ExecutionModeSampleInterlockUnorderedEXT: return "SampleInterlockUnorderedEXT";
198 case ExecutionModeShadingRateInterlockOrderedEXT: return "ShadingRateInterlockOrderedEXT";
199 case ExecutionModeShadingRateInterlockUnorderedEXT: return "ShadingRateInterlockUnorderedEXT";
200
John Kessenich140f3df2015-06-26 16:58:36 -0600201 case ExecutionModeCeiling:
202 default: return "Bad";
203 }
204}
205
John Kessenich140f3df2015-06-26 16:58:36 -0600206const char* StorageClassString(int StorageClass)
207{
208 switch (StorageClass) {
209 case 0: return "UniformConstant";
210 case 1: return "Input";
211 case 2: return "Uniform";
212 case 3: return "Output";
John Kessenich55e7d112015-11-15 21:33:39 -0700213 case 4: return "Workgroup";
214 case 5: return "CrossWorkgroup";
215 case 6: return "Private";
John Kessenich140f3df2015-06-26 16:58:36 -0600216 case 7: return "Function";
217 case 8: return "Generic";
John Kessenich55e7d112015-11-15 21:33:39 -0700218 case 9: return "PushConstant";
John Kessenich140f3df2015-06-26 16:58:36 -0600219 case 10: return "AtomicCounter";
John Kessenich5e4b1242015-08-06 22:53:06 -0600220 case 11: return "Image";
John Kessenich67027182017-04-19 18:34:49 -0600221 case 12: return "StorageBuffer";
John Kessenich140f3df2015-06-26 16:58:36 -0600222
Chao Chenb50c02e2018-09-19 11:42:24 -0700223#ifdef NV_EXTENSIONS
Ashwin Leleff1783d2018-10-22 16:41:44 -0700224 case StorageClassRayPayloadNV: return "RayPayloadNV";
225 case StorageClassHitAttributeNV: return "HitAttributeNV";
226 case StorageClassIncomingRayPayloadNV: return "IncomingRayPayloadNV";
227 case StorageClassShaderRecordBufferNV: return "ShaderRecordBufferNV";
228 case StorageClassCallableDataNV: return "CallableDataNV";
229 case StorageClassIncomingCallableDataNV: return "IncomingCallableDataNV";
Chao Chenb50c02e2018-09-19 11:42:24 -0700230#endif
231
Jeff Bolz9f2aec42019-01-06 17:58:04 -0600232 case StorageClassPhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT";
233
John Kessenich140f3df2015-06-26 16:58:36 -0600234 default: return "Bad";
235 }
236}
237
John Kessenich55e7d112015-11-15 21:33:39 -0700238const int DecorationCeiling = 45;
John Kessenich140f3df2015-06-26 16:58:36 -0600239
240const char* DecorationString(int decoration)
241{
242 switch (decoration) {
John Kessenich5e4b1242015-08-06 22:53:06 -0600243 case 0: return "RelaxedPrecision";
244 case 1: return "SpecId";
245 case 2: return "Block";
246 case 3: return "BufferBlock";
247 case 4: return "RowMajor";
248 case 5: return "ColMajor";
249 case 6: return "ArrayStride";
250 case 7: return "MatrixStride";
251 case 8: return "GLSLShared";
252 case 9: return "GLSLPacked";
253 case 10: return "CPacked";
254 case 11: return "BuiltIn";
John Kessenich55e7d112015-11-15 21:33:39 -0700255 case 12: return "Bad";
256 case 13: return "NoPerspective";
John Kessenich5e4b1242015-08-06 22:53:06 -0600257 case 14: return "Flat";
258 case 15: return "Patch";
259 case 16: return "Centroid";
260 case 17: return "Sample";
261 case 18: return "Invariant";
262 case 19: return "Restrict";
263 case 20: return "Aliased";
264 case 21: return "Volatile";
265 case 22: return "Constant";
266 case 23: return "Coherent";
John Kessenich55e7d112015-11-15 21:33:39 -0700267 case 24: return "NonWritable";
268 case 25: return "NonReadable";
John Kessenich5e4b1242015-08-06 22:53:06 -0600269 case 26: return "Uniform";
John Kessenich55e7d112015-11-15 21:33:39 -0700270 case 27: return "Bad";
John Kessenich140f3df2015-06-26 16:58:36 -0600271 case 28: return "SaturatedConversion";
272 case 29: return "Stream";
273 case 30: return "Location";
274 case 31: return "Component";
275 case 32: return "Index";
276 case 33: return "Binding";
277 case 34: return "DescriptorSet";
278 case 35: return "Offset";
John Kessenich5e4b1242015-08-06 22:53:06 -0600279 case 36: return "XfbBuffer";
280 case 37: return "XfbStride";
281 case 38: return "FuncParamAttr";
282 case 39: return "FP Rounding Mode";
283 case 40: return "FP Fast Math Mode";
284 case 41: return "Linkage Attributes";
John Kessenich55e7d112015-11-15 21:33:39 -0700285 case 42: return "NoContraction";
286 case 43: return "InputAttachmentIndex";
287 case 44: return "Alignment";
John Kessenich140f3df2015-06-26 16:58:36 -0600288
289 case DecorationCeiling:
290 default: return "Bad";
Rex Xu9d93a232016-05-05 12:30:44 +0800291
292#ifdef AMD_EXTENSIONS
John Kessenich10971552018-03-30 00:11:39 -0600293 case DecorationExplicitInterpAMD: return "ExplicitInterpAMD";
Rex Xu9d93a232016-05-05 12:30:44 +0800294#endif
chaoc0ad6a4e2016-12-19 16:29:34 -0800295#ifdef NV_EXTENSIONS
John Kessenich10971552018-03-30 00:11:39 -0600296 case DecorationOverrideCoverageNV: return "OverrideCoverageNV";
297 case DecorationPassthroughNV: return "PassthroughNV";
298 case DecorationViewportRelativeNV: return "ViewportRelativeNV";
299 case DecorationSecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV";
Chao Chen3c366992018-09-19 11:41:59 -0700300 case DecorationPerPrimitiveNV: return "PerPrimitiveNV";
301 case DecorationPerViewNV: return "PerViewNV";
302 case DecorationPerTaskNV: return "PerTaskNV";
Chao Chen9eada4b2018-09-19 11:39:56 -0700303 case DecorationPerVertexNV: return "PerVertexNV";
chaoc0ad6a4e2016-12-19 16:29:34 -0800304#endif
John Kessenich5d610ee2018-03-07 18:05:55 -0700305
John Kessenich5611c6d2018-04-05 11:25:02 -0600306 case DecorationNonUniformEXT: return "DecorationNonUniformEXT";
John Kessenich5d610ee2018-03-07 18:05:55 -0700307 case DecorationHlslCounterBufferGOOGLE: return "DecorationHlslCounterBufferGOOGLE";
308 case DecorationHlslSemanticGOOGLE: return "DecorationHlslSemanticGOOGLE";
Jeff Bolz9f2aec42019-01-06 17:58:04 -0600309 case DecorationRestrictPointerEXT: return "DecorationRestrictPointerEXT";
310 case DecorationAliasedPointerEXT: return "DecorationAliasedPointerEXT";
John Kessenich140f3df2015-06-26 16:58:36 -0600311 }
312}
313
John Kessenich140f3df2015-06-26 16:58:36 -0600314const char* BuiltInString(int builtIn)
315{
316 switch (builtIn) {
317 case 0: return "Position";
318 case 1: return "PointSize";
John Kessenich5e4b1242015-08-06 22:53:06 -0600319 case 2: return "Bad";
John Kessenich140f3df2015-06-26 16:58:36 -0600320 case 3: return "ClipDistance";
321 case 4: return "CullDistance";
322 case 5: return "VertexId";
323 case 6: return "InstanceId";
324 case 7: return "PrimitiveId";
325 case 8: return "InvocationId";
326 case 9: return "Layer";
327 case 10: return "ViewportIndex";
328 case 11: return "TessLevelOuter";
329 case 12: return "TessLevelInner";
330 case 13: return "TessCoord";
331 case 14: return "PatchVertices";
332 case 15: return "FragCoord";
333 case 16: return "PointCoord";
334 case 17: return "FrontFacing";
335 case 18: return "SampleId";
336 case 19: return "SamplePosition";
337 case 20: return "SampleMask";
John Kessenich55e7d112015-11-15 21:33:39 -0700338 case 21: return "Bad";
John Kessenich140f3df2015-06-26 16:58:36 -0600339 case 22: return "FragDepth";
340 case 23: return "HelperInvocation";
341 case 24: return "NumWorkgroups";
342 case 25: return "WorkgroupSize";
343 case 26: return "WorkgroupId";
344 case 27: return "LocalInvocationId";
345 case 28: return "GlobalInvocationId";
346 case 29: return "LocalInvocationIndex";
347 case 30: return "WorkDim";
348 case 31: return "GlobalSize";
349 case 32: return "EnqueuedWorkgroupSize";
350 case 33: return "GlobalOffset";
351 case 34: return "GlobalLinearId";
John Kessenich55e7d112015-11-15 21:33:39 -0700352 case 35: return "Bad";
John Kessenich140f3df2015-06-26 16:58:36 -0600353 case 36: return "SubgroupSize";
354 case 37: return "SubgroupMaxSize";
355 case 38: return "NumSubgroups";
356 case 39: return "NumEnqueuedSubgroups";
357 case 40: return "SubgroupId";
358 case 41: return "SubgroupLocalInvocationId";
John Kessenich55e7d112015-11-15 21:33:39 -0700359 case 42: return "VertexIndex"; // TBD: put next to VertexId?
360 case 43: return "InstanceIndex"; // TBD: put next to InstanceId?
John Kessenich140f3df2015-06-26 16:58:36 -0600361
Rex Xu51596642016-09-21 18:56:12 +0800362 case 4416: return "SubgroupEqMaskKHR";
363 case 4417: return "SubgroupGeMaskKHR";
364 case 4418: return "SubgroupGtMaskKHR";
365 case 4419: return "SubgroupLeMaskKHR";
366 case 4420: return "SubgroupLtMaskKHR";
John Kessenich6c8aaac2017-02-27 01:20:51 -0700367 case 4438: return "DeviceIndex";
368 case 4440: return "ViewIndex";
Rex Xuf3b27472016-07-22 18:15:31 +0800369 case 4424: return "BaseVertex";
370 case 4425: return "BaseInstance";
371 case 4426: return "DrawIndex";
Rex Xue8fdd792017-08-23 23:24:42 +0800372 case 5014: return "FragStencilRefEXT";
Rex Xuf3b27472016-07-22 18:15:31 +0800373
Rex Xu9d93a232016-05-05 12:30:44 +0800374#ifdef AMD_EXTENSIONS
375 case 4992: return "BaryCoordNoPerspAMD";
376 case 4993: return "BaryCoordNoPerspCentroidAMD";
377 case 4994: return "BaryCoordNoPerspSampleAMD";
378 case 4995: return "BaryCoordSmoothAMD";
379 case 4996: return "BaryCoordSmoothCentroidAMD";
380 case 4997: return "BaryCoordSmoothSampleAMD";
381 case 4998: return "BaryCoordPullModelAMD";
382#endif
John Kessenich6c8aaac2017-02-27 01:20:51 -0700383
chaoc771d89f2017-01-13 01:10:53 -0800384#ifdef NV_EXTENSIONS
Ashwin Leleff1783d2018-10-22 16:41:44 -0700385 case BuiltInLaunchIdNV: return "LaunchIdNV";
386 case BuiltInLaunchSizeNV: return "LaunchSizeNV";
387 case BuiltInWorldRayOriginNV: return "WorldRayOriginNV";
388 case BuiltInWorldRayDirectionNV: return "WorldRayDirectionNV";
389 case BuiltInObjectRayOriginNV: return "ObjectRayOriginNV";
390 case BuiltInObjectRayDirectionNV: return "ObjectRayDirectionNV";
391 case BuiltInRayTminNV: return "RayTminNV";
392 case BuiltInRayTmaxNV: return "RayTmaxNV";
393 case BuiltInInstanceCustomIndexNV: return "InstanceCustomIndexNV";
394 case BuiltInObjectToWorldNV: return "ObjectToWorldNV";
395 case BuiltInWorldToObjectNV: return "WorldToObjectNV";
396 case BuiltInHitTNV: return "HitTNV";
397 case BuiltInHitKindNV: return "HitKindNV";
398 case BuiltInIncomingRayFlagsNV: return "IncomingRayFlagsNV";
Chao Chenb50c02e2018-09-19 11:42:24 -0700399 case BuiltInViewportMaskNV: return "ViewportMaskNV";
400 case BuiltInSecondaryPositionNV: return "SecondaryPositionNV";
401 case BuiltInSecondaryViewportMaskNV: return "SecondaryViewportMaskNV";
402 case BuiltInPositionPerViewNV: return "PositionPerViewNV";
403 case BuiltInViewportMaskPerViewNV: return "ViewportMaskPerViewNV";
Daniel Koch5154db52018-11-26 10:01:58 -0500404// case BuiltInFragmentSizeNV: return "FragmentSizeNV"; // superseded by BuiltInFragSizeEXT
405// case BuiltInInvocationsPerPixelNV: return "InvocationsPerPixelNV"; // superseded by BuiltInFragInvocationCountEXT
Chao Chenb50c02e2018-09-19 11:42:24 -0700406 case BuiltInBaryCoordNV: return "BaryCoordNV";
407 case BuiltInBaryCoordNoPerspNV: return "BaryCoordNoPerspNV";
chaoc771d89f2017-01-13 01:10:53 -0800408#endif
John Kessenich6c8aaac2017-02-27 01:20:51 -0700409
Daniel Koch5154db52018-11-26 10:01:58 -0500410 case BuiltInFragSizeEXT: return "FragSizeEXT";
411 case BuiltInFragInvocationCountEXT: return "FragInvocationCountEXT";
412
Piers Daniell1c5443c2017-12-13 13:07:22 -0700413 case 5264: return "FullyCoveredEXT";
414
Chao Chen3c366992018-09-19 11:41:59 -0700415#ifdef NV_EXTENSIONS
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#endif
Daniel Koch2cb2f192019-06-04 08:43:32 -0400425 case BuiltInWarpsPerSMNV: return "WarpsPerSMNV";
426 case BuiltInSMCountNV: return "SMCountNV";
427 case BuiltInWarpIDNV: return "WarpIDNV";
428 case BuiltInSMIDNV: return "SMIDNV";
Chao Chen3c366992018-09-19 11:41:59 -0700429
John Kessenich6c8aaac2017-02-27 01:20:51 -0700430 default: return "Bad";
John Kessenich140f3df2015-06-26 16:58:36 -0600431 }
432}
433
John Kessenich140f3df2015-06-26 16:58:36 -0600434const char* DimensionString(int dim)
435{
436 switch (dim) {
437 case 0: return "1D";
438 case 1: return "2D";
439 case 2: return "3D";
440 case 3: return "Cube";
441 case 4: return "Rect";
442 case 5: return "Buffer";
John Kessenich55e7d112015-11-15 21:33:39 -0700443 case 6: return "SubpassData";
John Kessenich140f3df2015-06-26 16:58:36 -0600444
John Kessenich140f3df2015-06-26 16:58:36 -0600445 default: return "Bad";
446 }
447}
448
John Kessenich140f3df2015-06-26 16:58:36 -0600449const char* SamplerAddressingModeString(int mode)
450{
451 switch (mode) {
452 case 0: return "None";
453 case 1: return "ClampToEdge";
454 case 2: return "Clamp";
455 case 3: return "Repeat";
456 case 4: return "RepeatMirrored";
457
John Kessenich140f3df2015-06-26 16:58:36 -0600458 default: return "Bad";
459 }
460}
461
John Kessenich140f3df2015-06-26 16:58:36 -0600462const char* SamplerFilterModeString(int mode)
463{
464 switch (mode) {
465 case 0: return "Nearest";
466 case 1: return "Linear";
467
John Kessenich140f3df2015-06-26 16:58:36 -0600468 default: return "Bad";
469 }
470}
471
John Kessenich5e4b1242015-08-06 22:53:06 -0600472const char* ImageFormatString(int format)
473{
474 switch (format) {
475 case 0: return "Unknown";
476
477 // ES/Desktop float
478 case 1: return "Rgba32f";
479 case 2: return "Rgba16f";
480 case 3: return "R32f";
481 case 4: return "Rgba8";
482 case 5: return "Rgba8Snorm";
483
484 // Desktop float
485 case 6: return "Rg32f";
486 case 7: return "Rg16f";
487 case 8: return "R11fG11fB10f";
488 case 9: return "R16f";
489 case 10: return "Rgba16";
490 case 11: return "Rgb10A2";
491 case 12: return "Rg16";
492 case 13: return "Rg8";
493 case 14: return "R16";
494 case 15: return "R8";
495 case 16: return "Rgba16Snorm";
496 case 17: return "Rg16Snorm";
497 case 18: return "Rg8Snorm";
498 case 19: return "R16Snorm";
499 case 20: return "R8Snorm";
500
501 // ES/Desktop int
502 case 21: return "Rgba32i";
503 case 22: return "Rgba16i";
504 case 23: return "Rgba8i";
505 case 24: return "R32i";
506
507 // Desktop int
508 case 25: return "Rg32i";
509 case 26: return "Rg16i";
510 case 27: return "Rg8i";
511 case 28: return "R16i";
512 case 29: return "R8i";
513
514 // ES/Desktop uint
515 case 30: return "Rgba32ui";
516 case 31: return "Rgba16ui";
517 case 32: return "Rgba8ui";
518 case 33: return "R32ui";
519
520 // Desktop uint
521 case 34: return "Rgb10a2ui";
522 case 35: return "Rg32ui";
523 case 36: return "Rg16ui";
524 case 37: return "Rg8ui";
525 case 38: return "R16ui";
526 case 39: return "R8ui";
527
John Kessenich5e4b1242015-08-06 22:53:06 -0600528 default:
529 return "Bad";
530 }
531}
532
John Kessenich5e4b1242015-08-06 22:53:06 -0600533const char* ImageChannelOrderString(int format)
534{
535 switch (format) {
536 case 0: return "R";
537 case 1: return "A";
538 case 2: return "RG";
539 case 3: return "RA";
540 case 4: return "RGB";
541 case 5: return "RGBA";
542 case 6: return "BGRA";
543 case 7: return "ARGB";
544 case 8: return "Intensity";
545 case 9: return "Luminance";
546 case 10: return "Rx";
547 case 11: return "RGx";
548 case 12: return "RGBx";
549 case 13: return "Depth";
550 case 14: return "DepthStencil";
551 case 15: return "sRGB";
552 case 16: return "sRGBx";
553 case 17: return "sRGBA";
554 case 18: return "sBGRA";
555
John Kessenich5e4b1242015-08-06 22:53:06 -0600556 default:
557 return "Bad";
558 }
559}
560
John Kessenich5e4b1242015-08-06 22:53:06 -0600561const char* ImageChannelDataTypeString(int type)
562{
563 switch (type)
564 {
565 case 0: return "SnormInt8";
566 case 1: return "SnormInt16";
567 case 2: return "UnormInt8";
568 case 3: return "UnormInt16";
569 case 4: return "UnormShort565";
570 case 5: return "UnormShort555";
571 case 6: return "UnormInt101010";
572 case 7: return "SignedInt8";
573 case 8: return "SignedInt16";
574 case 9: return "SignedInt32";
575 case 10: return "UnsignedInt8";
576 case 11: return "UnsignedInt16";
577 case 12: return "UnsignedInt32";
578 case 13: return "HalfFloat";
579 case 14: return "Float";
580 case 15: return "UnormInt24";
John Kessenich55e7d112015-11-15 21:33:39 -0700581 case 16: return "UnormInt101010_2";
John Kessenich5e4b1242015-08-06 22:53:06 -0600582
John Kessenich5e4b1242015-08-06 22:53:06 -0600583 default:
584 return "Bad";
585 }
586}
587
John Kessenichf43c7392019-03-31 10:51:57 -0600588const int ImageOperandsCeiling = 14;
John Kessenich5e4b1242015-08-06 22:53:06 -0600589
590const char* ImageOperandsString(int format)
591{
592 switch (format) {
Jeff Bolz36831c92018-09-05 10:11:41 -0500593 case ImageOperandsBiasShift: return "Bias";
594 case ImageOperandsLodShift: return "Lod";
595 case ImageOperandsGradShift: return "Grad";
596 case ImageOperandsConstOffsetShift: return "ConstOffset";
597 case ImageOperandsOffsetShift: return "Offset";
598 case ImageOperandsConstOffsetsShift: return "ConstOffsets";
599 case ImageOperandsSampleShift: return "Sample";
600 case ImageOperandsMinLodShift: return "MinLod";
601 case ImageOperandsMakeTexelAvailableKHRShift: return "MakeTexelAvailableKHR";
602 case ImageOperandsMakeTexelVisibleKHRShift: return "MakeTexelVisibleKHR";
603 case ImageOperandsNonPrivateTexelKHRShift: return "NonPrivateTexelKHR";
604 case ImageOperandsVolatileTexelKHRShift: return "VolatileTexelKHR";
John Kessenichf43c7392019-03-31 10:51:57 -0600605 case ImageOperandsSignExtendShift: return "SignExtend";
606 case ImageOperandsZeroExtendShift: return "ZeroExtend";
John Kessenich5e4b1242015-08-06 22:53:06 -0600607
608 case ImageOperandsCeiling:
609 default:
610 return "Bad";
611 }
612}
613
John Kessenich140f3df2015-06-26 16:58:36 -0600614const char* FPFastMathString(int mode)
615{
616 switch (mode) {
617 case 0: return "NotNaN";
618 case 1: return "NotInf";
619 case 2: return "NSZ";
620 case 3: return "AllowRecip";
621 case 4: return "Fast";
622
John Kessenich140f3df2015-06-26 16:58:36 -0600623 default: return "Bad";
624 }
625}
626
John Kessenich140f3df2015-06-26 16:58:36 -0600627const char* FPRoundingModeString(int mode)
628{
629 switch (mode) {
630 case 0: return "RTE";
631 case 1: return "RTZ";
632 case 2: return "RTP";
633 case 3: return "RTN";
634
John Kessenich140f3df2015-06-26 16:58:36 -0600635 default: return "Bad";
636 }
637}
638
John Kessenich140f3df2015-06-26 16:58:36 -0600639const char* LinkageTypeString(int type)
640{
641 switch (type) {
642 case 0: return "Export";
643 case 1: return "Import";
644
John Kessenich140f3df2015-06-26 16:58:36 -0600645 default: return "Bad";
646 }
647}
648
John Kessenich140f3df2015-06-26 16:58:36 -0600649const char* FuncParamAttrString(int attr)
650{
651 switch (attr) {
652 case 0: return "Zext";
653 case 1: return "Sext";
654 case 2: return "ByVal";
655 case 3: return "Sret";
656 case 4: return "NoAlias";
657 case 5: return "NoCapture";
John Kessenich5e4b1242015-08-06 22:53:06 -0600658 case 6: return "NoWrite";
659 case 7: return "NoReadWrite";
John Kessenich140f3df2015-06-26 16:58:36 -0600660
John Kessenich140f3df2015-06-26 16:58:36 -0600661 default: return "Bad";
662 }
663}
664
John Kessenich140f3df2015-06-26 16:58:36 -0600665const char* AccessQualifierString(int attr)
666{
667 switch (attr) {
668 case 0: return "ReadOnly";
669 case 1: return "WriteOnly";
670 case 2: return "ReadWrite";
671
John Kessenich140f3df2015-06-26 16:58:36 -0600672 default: return "Bad";
673 }
674}
675
676const int SelectControlCeiling = 2;
677
678const char* SelectControlString(int cont)
679{
680 switch (cont) {
681 case 0: return "Flatten";
682 case 1: return "DontFlatten";
683
684 case SelectControlCeiling:
John Kessenich5e4b1242015-08-06 22:53:06 -0600685 default: return "Bad";
John Kessenich140f3df2015-06-26 16:58:36 -0600686 }
687}
688
John Kessenich1f4d0462019-01-12 17:31:41 +0700689const int LoopControlCeiling = LoopControlPartialCountShift + 1;
John Kessenich140f3df2015-06-26 16:58:36 -0600690
691const char* LoopControlString(int cont)
692{
693 switch (cont) {
John Kessenich1f4d0462019-01-12 17:31:41 +0700694 case LoopControlUnrollShift: return "Unroll";
695 case LoopControlDontUnrollShift: return "DontUnroll";
696 case LoopControlDependencyInfiniteShift: return "DependencyInfinite";
697 case LoopControlDependencyLengthShift: return "DependencyLength";
698 case LoopControlMinIterationsShift: return "MinIterations";
699 case LoopControlMaxIterationsShift: return "MaxIterations";
700 case LoopControlIterationMultipleShift: return "IterationMultiple";
701 case LoopControlPeelCountShift: return "PeelCount";
702 case LoopControlPartialCountShift: return "PartialCount";
John Kessenich140f3df2015-06-26 16:58:36 -0600703
704 case LoopControlCeiling:
John Kessenich5e4b1242015-08-06 22:53:06 -0600705 default: return "Bad";
John Kessenich140f3df2015-06-26 16:58:36 -0600706 }
707}
708
709const int FunctionControlCeiling = 4;
710
711const char* FunctionControlString(int cont)
712{
713 switch (cont) {
714 case 0: return "Inline";
715 case 1: return "DontInline";
716 case 2: return "Pure";
717 case 3: return "Const";
718
719 case FunctionControlCeiling:
720 default: return "Bad";
721 }
722}
723
John Kessenich140f3df2015-06-26 16:58:36 -0600724const char* MemorySemanticsString(int mem)
725{
John Kessenich55e7d112015-11-15 21:33:39 -0700726 // Note: No bits set (None) means "Relaxed"
John Kessenich140f3df2015-06-26 16:58:36 -0600727 switch (mem) {
John Kessenich55e7d112015-11-15 21:33:39 -0700728 case 0: return "Bad"; // Note: this is a placeholder for 'Consume'
729 case 1: return "Acquire";
730 case 2: return "Release";
731 case 3: return "AcquireRelease";
732 case 4: return "SequentiallyConsistent";
733 case 5: return "Bad"; // Note: reserved for future expansion
734 case 6: return "UniformMemory";
735 case 7: return "SubgroupMemory";
736 case 8: return "WorkgroupMemory";
737 case 9: return "CrossWorkgroupMemory";
738 case 10: return "AtomicCounterMemory";
739 case 11: return "ImageMemory";
John Kessenich140f3df2015-06-26 16:58:36 -0600740
John Kessenich140f3df2015-06-26 16:58:36 -0600741 default: return "Bad";
742 }
743}
744
Jeff Bolz36831c92018-09-05 10:11:41 -0500745const int MemoryAccessCeiling = 6;
746
John Kessenich140f3df2015-06-26 16:58:36 -0600747const char* MemoryAccessString(int mem)
748{
749 switch (mem) {
Jeff Bolz36831c92018-09-05 10:11:41 -0500750 case MemoryAccessVolatileShift: return "Volatile";
751 case MemoryAccessAlignedShift: return "Aligned";
752 case MemoryAccessNontemporalShift: return "Nontemporal";
753 case MemoryAccessMakePointerAvailableKHRShift: return "MakePointerAvailableKHR";
754 case MemoryAccessMakePointerVisibleKHRShift: return "MakePointerVisibleKHR";
755 case MemoryAccessNonPrivatePointerKHRShift: return "NonPrivatePointerKHR";
John Kessenich140f3df2015-06-26 16:58:36 -0600756
John Kessenich140f3df2015-06-26 16:58:36 -0600757 default: return "Bad";
758 }
759}
760
John Kessenich5e4b1242015-08-06 22:53:06 -0600761const char* ScopeString(int mem)
John Kessenich140f3df2015-06-26 16:58:36 -0600762{
763 switch (mem) {
764 case 0: return "CrossDevice";
765 case 1: return "Device";
766 case 2: return "Workgroup";
767 case 3: return "Subgroup";
John Kessenich5e4b1242015-08-06 22:53:06 -0600768 case 4: return "Invocation";
John Kessenich140f3df2015-06-26 16:58:36 -0600769
John Kessenich140f3df2015-06-26 16:58:36 -0600770 default: return "Bad";
771 }
772}
773
John Kessenich140f3df2015-06-26 16:58:36 -0600774const char* GroupOperationString(int gop)
775{
776
777 switch (gop)
778 {
Jeff Bolz2abe9a42018-03-29 22:52:17 -0500779 case GroupOperationReduce: return "Reduce";
780 case GroupOperationInclusiveScan: return "InclusiveScan";
781 case GroupOperationExclusiveScan: return "ExclusiveScan";
782 case GroupOperationClusteredReduce: return "ClusteredReduce";
783#ifdef NV_EXTENSIONS
784 case GroupOperationPartitionedReduceNV: return "PartitionedReduceNV";
785 case GroupOperationPartitionedInclusiveScanNV: return "PartitionedInclusiveScanNV";
786 case GroupOperationPartitionedExclusiveScanNV: return "PartitionedExclusiveScanNV";
787#endif
John Kessenich140f3df2015-06-26 16:58:36 -0600788
John Kessenich140f3df2015-06-26 16:58:36 -0600789 default: return "Bad";
790 }
791}
792
John Kessenich140f3df2015-06-26 16:58:36 -0600793const char* KernelEnqueueFlagsString(int flag)
794{
795 switch (flag)
796 {
797 case 0: return "NoWait";
798 case 1: return "WaitKernel";
799 case 2: return "WaitWorkGroup";
800
John Kessenich140f3df2015-06-26 16:58:36 -0600801 default: return "Bad";
802 }
803}
804
John Kessenich140f3df2015-06-26 16:58:36 -0600805const char* KernelProfilingInfoString(int info)
806{
807 switch (info)
808 {
809 case 0: return "CmdExecTime";
810
John Kessenich140f3df2015-06-26 16:58:36 -0600811 default: return "Bad";
812 }
813}
814
John Kessenich5e4b1242015-08-06 22:53:06 -0600815const char* CapabilityString(int info)
816{
817 switch (info)
818 {
819 case 0: return "Matrix";
820 case 1: return "Shader";
821 case 2: return "Geometry";
822 case 3: return "Tessellation";
823 case 4: return "Addresses";
824 case 5: return "Linkage";
825 case 6: return "Kernel";
826 case 7: return "Vector16";
827 case 8: return "Float16Buffer";
828 case 9: return "Float16";
829 case 10: return "Float64";
830 case 11: return "Int64";
831 case 12: return "Int64Atomics";
832 case 13: return "ImageBasic";
833 case 14: return "ImageReadWrite";
834 case 15: return "ImageMipmap";
John Kessenich55e7d112015-11-15 21:33:39 -0700835 case 16: return "Bad";
John Kessenich5e4b1242015-08-06 22:53:06 -0600836 case 17: return "Pipes";
837 case 18: return "Groups";
838 case 19: return "DeviceEnqueue";
839 case 20: return "LiteralSampler";
840 case 21: return "AtomicStorage";
841 case 22: return "Int16";
842 case 23: return "TessellationPointSize";
843 case 24: return "GeometryPointSize";
844 case 25: return "ImageGatherExtended";
John Kessenich55e7d112015-11-15 21:33:39 -0700845 case 26: return "Bad";
John Kessenich5e4b1242015-08-06 22:53:06 -0600846 case 27: return "StorageImageMultisample";
847 case 28: return "UniformBufferArrayDynamicIndexing";
848 case 29: return "SampledImageArrayDynamicIndexing";
849 case 30: return "StorageBufferArrayDynamicIndexing";
850 case 31: return "StorageImageArrayDynamicIndexing";
851 case 32: return "ClipDistance";
852 case 33: return "CullDistance";
853 case 34: return "ImageCubeArray";
854 case 35: return "SampleRateShading";
John Kessenich55e7d112015-11-15 21:33:39 -0700855 case 36: return "ImageRect";
856 case 37: return "SampledRect";
857 case 38: return "GenericPointer";
858 case 39: return "Int8";
859 case 40: return "InputAttachment";
860 case 41: return "SparseResidency";
861 case 42: return "MinLod";
862 case 43: return "Sampled1D";
863 case 44: return "Image1D";
864 case 45: return "SampledCubeArray";
865 case 46: return "SampledBuffer";
866 case 47: return "ImageBuffer";
867 case 48: return "ImageMSArray";
868 case 49: return "StorageImageExtendedFormats";
869 case 50: return "ImageQuery";
870 case 51: return "DerivativeControl";
871 case 52: return "InterpolationFunction";
872 case 53: return "TransformFeedback";
873 case 54: return "GeometryStreams";
874 case 55: return "StorageImageReadWithoutFormat";
875 case 56: return "StorageImageWriteWithoutFormat";
John Kessenich6c292d32016-02-15 20:58:50 -0700876 case 57: return "MultiViewport";
John Kessenich66011cb2018-03-06 16:12:04 -0700877 case 61: return "GroupNonUniform";
878 case 62: return "GroupNonUniformVote";
879 case 63: return "GroupNonUniformArithmetic";
880 case 64: return "GroupNonUniformBallot";
881 case 65: return "GroupNonUniformShuffle";
882 case 66: return "GroupNonUniformShuffleRelative";
883 case 67: return "GroupNonUniformClustered";
884 case 68: return "GroupNonUniformQuad";
John Kessenich5e4b1242015-08-06 22:53:06 -0600885
John Kessenich10971552018-03-30 00:11:39 -0600886 case CapabilitySubgroupBallotKHR: return "SubgroupBallotKHR";
887 case CapabilityDrawParameters: return "DrawParameters";
888 case CapabilitySubgroupVoteKHR: return "SubgroupVoteKHR";
chaoc6e5acae2016-12-20 13:28:52 -0800889
John Kessenich10971552018-03-30 00:11:39 -0600890 case CapabilityStorageUniformBufferBlock16: return "StorageUniformBufferBlock16";
891 case CapabilityStorageUniform16: return "StorageUniform16";
892 case CapabilityStoragePushConstant16: return "StoragePushConstant16";
893 case CapabilityStorageInputOutput16: return "StorageInputOutput16";
Rex Xuf89ad982017-04-07 23:22:33 +0800894
Daniel Koch9bb17cd2019-05-28 15:23:10 -0400895 case CapabilityStorageBuffer8BitAccess: return "StorageBuffer8BitAccess";
896 case CapabilityUniformAndStorageBuffer8BitAccess: return "UniformAndStorageBuffer8BitAccess";
897 case CapabilityStoragePushConstant8: return "StoragePushConstant8";
John Kessenich312dcfb2018-07-03 13:19:51 -0600898
John Kessenich10971552018-03-30 00:11:39 -0600899 case CapabilityDeviceGroup: return "DeviceGroup";
900 case CapabilityMultiView: return "MultiView";
John Kessenichd1141842017-04-13 17:08:11 -0600901
John Kessenich10971552018-03-30 00:11:39 -0600902 case CapabilityStencilExportEXT: return "StencilExportEXT";
Rex Xue8fdd792017-08-23 23:24:42 +0800903
Rex Xu225e0fc2016-11-17 17:47:59 +0800904#ifdef AMD_EXTENSIONS
John Kessenich10971552018-03-30 00:11:39 -0600905 case CapabilityFloat16ImageAMD: return "Float16ImageAMD";
906 case CapabilityImageGatherBiasLodAMD: return "ImageGatherBiasLodAMD";
907 case CapabilityFragmentMaskAMD: return "FragmentMaskAMD";
908 case CapabilityImageReadWriteLodAMD: return "ImageReadWriteLodAMD";
Rex Xu225e0fc2016-11-17 17:47:59 +0800909#endif
910
John Kessenich10971552018-03-30 00:11:39 -0600911 case CapabilityAtomicStorageOps: return "AtomicStorageOps";
John Kessenich0d0c6d32017-07-23 16:08:26 -0600912
John Kessenich10971552018-03-30 00:11:39 -0600913 case CapabilitySampleMaskPostDepthCoverage: return "SampleMaskPostDepthCoverage";
chaoc6e5acae2016-12-20 13:28:52 -0800914#ifdef NV_EXTENSIONS
Chao Chenbeae2252018-09-19 11:40:45 -0700915 case CapabilityGeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV";
916 case CapabilityShaderViewportIndexLayerNV: return "ShaderViewportIndexLayerNV";
917 case CapabilityShaderViewportMaskNV: return "ShaderViewportMaskNV";
918 case CapabilityShaderStereoViewNV: return "ShaderStereoViewNV";
919 case CapabilityPerViewAttributesNV: return "PerViewAttributesNV";
920 case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV";
Ashwin Leleff1783d2018-10-22 16:41:44 -0700921 case CapabilityRayTracingNV: return "RayTracingNV";
Chao Chenbeae2252018-09-19 11:40:45 -0700922 case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV";
923 case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV";
924 case CapabilityFragmentBarycentricNV: return "FragmentBarycentricNV";
Chao Chen3c366992018-09-19 11:41:59 -0700925 case CapabilityMeshShadingNV: return "MeshShadingNV";
Daniel Koch9bb17cd2019-05-28 15:23:10 -0400926 case CapabilityImageFootprintNV: return "ImageFootprintNV";
927// case CapabilityShadingRateNV: return "ShadingRateNV"; // superseded by FragmentDensityEXT
Jason Macnakdbd4c3c2019-07-12 14:33:02 -0700928 case CapabilitySampleMaskOverrideCoverageNV: return "SampleMaskOverrideCoverageNV";
chaoc6e5acae2016-12-20 13:28:52 -0800929#endif
Daniel Koch5154db52018-11-26 10:01:58 -0500930 case CapabilityFragmentDensityEXT: return "FragmentDensityEXT";
chaoc6e5acae2016-12-20 13:28:52 -0800931
John Kessenich10971552018-03-30 00:11:39 -0600932 case CapabilityFragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT";
Piers Daniell1c5443c2017-12-13 13:07:22 -0700933
Daniel Koch9bb17cd2019-05-28 15:23:10 -0400934 case CapabilityShaderNonUniformEXT: return "ShaderNonUniformEXT";
935 case CapabilityRuntimeDescriptorArrayEXT: return "RuntimeDescriptorArrayEXT";
936 case CapabilityInputAttachmentArrayDynamicIndexingEXT: return "InputAttachmentArrayDynamicIndexingEXT";
937 case CapabilityUniformTexelBufferArrayDynamicIndexingEXT: return "UniformTexelBufferArrayDynamicIndexingEXT";
938 case CapabilityStorageTexelBufferArrayDynamicIndexingEXT: return "StorageTexelBufferArrayDynamicIndexingEXT";
939 case CapabilityUniformBufferArrayNonUniformIndexingEXT: return "UniformBufferArrayNonUniformIndexingEXT";
940 case CapabilitySampledImageArrayNonUniformIndexingEXT: return "SampledImageArrayNonUniformIndexingEXT";
941 case CapabilityStorageBufferArrayNonUniformIndexingEXT: return "StorageBufferArrayNonUniformIndexingEXT";
942 case CapabilityStorageImageArrayNonUniformIndexingEXT: return "StorageImageArrayNonUniformIndexingEXT";
943 case CapabilityInputAttachmentArrayNonUniformIndexingEXT: return "InputAttachmentArrayNonUniformIndexingEXT";
944 case CapabilityUniformTexelBufferArrayNonUniformIndexingEXT: return "UniformTexelBufferArrayNonUniformIndexingEXT";
945 case CapabilityStorageTexelBufferArrayNonUniformIndexingEXT: return "StorageTexelBufferArrayNonUniformIndexingEXT";
John Kessenich5611c6d2018-04-05 11:25:02 -0600946
Daniel Koch9bb17cd2019-05-28 15:23:10 -0400947 case CapabilityVulkanMemoryModelKHR: return "VulkanMemoryModelKHR";
948 case CapabilityVulkanMemoryModelDeviceScopeKHR: return "VulkanMemoryModelDeviceScopeKHR";
Jeff Bolz36831c92018-09-05 10:11:41 -0500949
Daniel Koch9bb17cd2019-05-28 15:23:10 -0400950 case CapabilityPhysicalStorageBufferAddressesEXT: return "PhysicalStorageBufferAddressesEXT";
Jeff Bolz9f2aec42019-01-06 17:58:04 -0600951
Daniel Koch9bb17cd2019-05-28 15:23:10 -0400952 case CapabilityVariablePointers: return "VariablePointers";
Jeff Bolz4605e2e2019-02-19 13:10:32 -0600953
Daniel Koch9bb17cd2019-05-28 15:23:10 -0400954 case CapabilityCooperativeMatrixNV: return "CooperativeMatrixNV";
Daniel Koch2cb2f192019-06-04 08:43:32 -0400955 case CapabilityShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV";
Jeff Bolz4605e2e2019-02-19 13:10:32 -0600956
Jeff Bolzc6f0ce82019-06-03 11:33:50 -0500957 case CapabilityFragmentShaderSampleInterlockEXT: return "CapabilityFragmentShaderSampleInterlockEXT";
958 case CapabilityFragmentShaderPixelInterlockEXT: return "CapabilityFragmentShaderPixelInterlockEXT";
959 case CapabilityFragmentShaderShadingRateInterlockEXT: return "CapabilityFragmentShaderShadingRateInterlockEXT";
960
Jeff Bolz6a50a782019-07-02 10:57:48 -0500961 case CapabilityDemoteToHelperInvocationEXT: return "DemoteToHelperInvocationEXT";
amhagan91fb0092019-07-10 21:14:38 -0400962 case CapabilityShaderClockKHR: return "ShaderClockKHR";
Jeff Bolz6a50a782019-07-02 10:57:48 -0500963
John Kessenich6c8aaac2017-02-27 01:20:51 -0700964 default: return "Bad";
John Kessenich5e4b1242015-08-06 22:53:06 -0600965 }
966}
967
John Kessenich140f3df2015-06-26 16:58:36 -0600968const char* OpcodeString(int op)
969{
970 switch (op) {
971 case 0: return "OpNop";
John Kessenich5e4b1242015-08-06 22:53:06 -0600972 case 1: return "OpUndef";
John Kessenich55e7d112015-11-15 21:33:39 -0700973 case 2: return "OpSourceContinued";
John Kessenich5e4b1242015-08-06 22:53:06 -0600974 case 3: return "OpSource";
975 case 4: return "OpSourceExtension";
976 case 5: return "OpName";
977 case 6: return "OpMemberName";
978 case 7: return "OpString";
979 case 8: return "OpLine";
980 case 9: return "Bad";
981 case 10: return "OpExtension";
982 case 11: return "OpExtInstImport";
983 case 12: return "OpExtInst";
984 case 13: return "Bad";
985 case 14: return "OpMemoryModel";
986 case 15: return "OpEntryPoint";
987 case 16: return "OpExecutionMode";
988 case 17: return "OpCapability";
989 case 18: return "Bad";
990 case 19: return "OpTypeVoid";
991 case 20: return "OpTypeBool";
992 case 21: return "OpTypeInt";
993 case 22: return "OpTypeFloat";
994 case 23: return "OpTypeVector";
995 case 24: return "OpTypeMatrix";
996 case 25: return "OpTypeImage";
997 case 26: return "OpTypeSampler";
998 case 27: return "OpTypeSampledImage";
999 case 28: return "OpTypeArray";
1000 case 29: return "OpTypeRuntimeArray";
1001 case 30: return "OpTypeStruct";
1002 case 31: return "OpTypeOpaque";
1003 case 32: return "OpTypePointer";
1004 case 33: return "OpTypeFunction";
1005 case 34: return "OpTypeEvent";
1006 case 35: return "OpTypeDeviceEvent";
1007 case 36: return "OpTypeReserveId";
1008 case 37: return "OpTypeQueue";
1009 case 38: return "OpTypePipe";
John Kessenich55e7d112015-11-15 21:33:39 -07001010 case 39: return "OpTypeForwardPointer";
John Kessenich5e4b1242015-08-06 22:53:06 -06001011 case 40: return "Bad";
1012 case 41: return "OpConstantTrue";
1013 case 42: return "OpConstantFalse";
1014 case 43: return "OpConstant";
1015 case 44: return "OpConstantComposite";
1016 case 45: return "OpConstantSampler";
1017 case 46: return "OpConstantNull";
1018 case 47: return "Bad";
1019 case 48: return "OpSpecConstantTrue";
1020 case 49: return "OpSpecConstantFalse";
1021 case 50: return "OpSpecConstant";
1022 case 51: return "OpSpecConstantComposite";
1023 case 52: return "OpSpecConstantOp";
1024 case 53: return "Bad";
1025 case 54: return "OpFunction";
1026 case 55: return "OpFunctionParameter";
1027 case 56: return "OpFunctionEnd";
1028 case 57: return "OpFunctionCall";
1029 case 58: return "Bad";
1030 case 59: return "OpVariable";
1031 case 60: return "OpImageTexelPointer";
1032 case 61: return "OpLoad";
1033 case 62: return "OpStore";
1034 case 63: return "OpCopyMemory";
1035 case 64: return "OpCopyMemorySized";
1036 case 65: return "OpAccessChain";
1037 case 66: return "OpInBoundsAccessChain";
1038 case 67: return "OpPtrAccessChain";
1039 case 68: return "OpArrayLength";
1040 case 69: return "OpGenericPtrMemSemantics";
John Kessenich55e7d112015-11-15 21:33:39 -07001041 case 70: return "OpInBoundsPtrAccessChain";
John Kessenich5e4b1242015-08-06 22:53:06 -06001042 case 71: return "OpDecorate";
1043 case 72: return "OpMemberDecorate";
1044 case 73: return "OpDecorationGroup";
1045 case 74: return "OpGroupDecorate";
1046 case 75: return "OpGroupMemberDecorate";
1047 case 76: return "Bad";
1048 case 77: return "OpVectorExtractDynamic";
1049 case 78: return "OpVectorInsertDynamic";
1050 case 79: return "OpVectorShuffle";
1051 case 80: return "OpCompositeConstruct";
1052 case 81: return "OpCompositeExtract";
1053 case 82: return "OpCompositeInsert";
1054 case 83: return "OpCopyObject";
1055 case 84: return "OpTranspose";
John Kessenichfbb6bdf2019-01-15 21:48:27 +07001056 case OpCopyLogical: return "OpCopyLogical";
John Kessenich5e4b1242015-08-06 22:53:06 -06001057 case 85: return "Bad";
1058 case 86: return "OpSampledImage";
1059 case 87: return "OpImageSampleImplicitLod";
1060 case 88: return "OpImageSampleExplicitLod";
1061 case 89: return "OpImageSampleDrefImplicitLod";
1062 case 90: return "OpImageSampleDrefExplicitLod";
1063 case 91: return "OpImageSampleProjImplicitLod";
1064 case 92: return "OpImageSampleProjExplicitLod";
1065 case 93: return "OpImageSampleProjDrefImplicitLod";
1066 case 94: return "OpImageSampleProjDrefExplicitLod";
1067 case 95: return "OpImageFetch";
1068 case 96: return "OpImageGather";
1069 case 97: return "OpImageDrefGather";
1070 case 98: return "OpImageRead";
1071 case 99: return "OpImageWrite";
John Kessenich55e7d112015-11-15 21:33:39 -07001072 case 100: return "OpImage";
John Kessenich5e4b1242015-08-06 22:53:06 -06001073 case 101: return "OpImageQueryFormat";
1074 case 102: return "OpImageQueryOrder";
1075 case 103: return "OpImageQuerySizeLod";
1076 case 104: return "OpImageQuerySize";
1077 case 105: return "OpImageQueryLod";
1078 case 106: return "OpImageQueryLevels";
1079 case 107: return "OpImageQuerySamples";
1080 case 108: return "Bad";
1081 case 109: return "OpConvertFToU";
1082 case 110: return "OpConvertFToS";
1083 case 111: return "OpConvertSToF";
1084 case 112: return "OpConvertUToF";
1085 case 113: return "OpUConvert";
1086 case 114: return "OpSConvert";
1087 case 115: return "OpFConvert";
1088 case 116: return "OpQuantizeToF16";
1089 case 117: return "OpConvertPtrToU";
1090 case 118: return "OpSatConvertSToU";
1091 case 119: return "OpSatConvertUToS";
1092 case 120: return "OpConvertUToPtr";
1093 case 121: return "OpPtrCastToGeneric";
1094 case 122: return "OpGenericCastToPtr";
1095 case 123: return "OpGenericCastToPtrExplicit";
1096 case 124: return "OpBitcast";
1097 case 125: return "Bad";
1098 case 126: return "OpSNegate";
1099 case 127: return "OpFNegate";
1100 case 128: return "OpIAdd";
1101 case 129: return "OpFAdd";
1102 case 130: return "OpISub";
1103 case 131: return "OpFSub";
1104 case 132: return "OpIMul";
1105 case 133: return "OpFMul";
1106 case 134: return "OpUDiv";
1107 case 135: return "OpSDiv";
1108 case 136: return "OpFDiv";
1109 case 137: return "OpUMod";
1110 case 138: return "OpSRem";
1111 case 139: return "OpSMod";
1112 case 140: return "OpFRem";
1113 case 141: return "OpFMod";
1114 case 142: return "OpVectorTimesScalar";
1115 case 143: return "OpMatrixTimesScalar";
1116 case 144: return "OpVectorTimesMatrix";
1117 case 145: return "OpMatrixTimesVector";
1118 case 146: return "OpMatrixTimesMatrix";
1119 case 147: return "OpOuterProduct";
1120 case 148: return "OpDot";
1121 case 149: return "OpIAddCarry";
1122 case 150: return "OpISubBorrow";
John Kessenich55e7d112015-11-15 21:33:39 -07001123 case 151: return "OpUMulExtended";
1124 case 152: return "OpSMulExtended";
John Kessenich5e4b1242015-08-06 22:53:06 -06001125 case 153: return "Bad";
1126 case 154: return "OpAny";
1127 case 155: return "OpAll";
1128 case 156: return "OpIsNan";
1129 case 157: return "OpIsInf";
1130 case 158: return "OpIsFinite";
1131 case 159: return "OpIsNormal";
1132 case 160: return "OpSignBitSet";
1133 case 161: return "OpLessOrGreater";
1134 case 162: return "OpOrdered";
1135 case 163: return "OpUnordered";
1136 case 164: return "OpLogicalEqual";
1137 case 165: return "OpLogicalNotEqual";
1138 case 166: return "OpLogicalOr";
1139 case 167: return "OpLogicalAnd";
1140 case 168: return "OpLogicalNot";
1141 case 169: return "OpSelect";
1142 case 170: return "OpIEqual";
1143 case 171: return "OpINotEqual";
1144 case 172: return "OpUGreaterThan";
1145 case 173: return "OpSGreaterThan";
1146 case 174: return "OpUGreaterThanEqual";
1147 case 175: return "OpSGreaterThanEqual";
1148 case 176: return "OpULessThan";
1149 case 177: return "OpSLessThan";
1150 case 178: return "OpULessThanEqual";
1151 case 179: return "OpSLessThanEqual";
1152 case 180: return "OpFOrdEqual";
1153 case 181: return "OpFUnordEqual";
1154 case 182: return "OpFOrdNotEqual";
1155 case 183: return "OpFUnordNotEqual";
1156 case 184: return "OpFOrdLessThan";
1157 case 185: return "OpFUnordLessThan";
1158 case 186: return "OpFOrdGreaterThan";
1159 case 187: return "OpFUnordGreaterThan";
1160 case 188: return "OpFOrdLessThanEqual";
1161 case 189: return "OpFUnordLessThanEqual";
1162 case 190: return "OpFOrdGreaterThanEqual";
1163 case 191: return "OpFUnordGreaterThanEqual";
1164 case 192: return "Bad";
1165 case 193: return "Bad";
1166 case 194: return "OpShiftRightLogical";
1167 case 195: return "OpShiftRightArithmetic";
1168 case 196: return "OpShiftLeftLogical";
1169 case 197: return "OpBitwiseOr";
1170 case 198: return "OpBitwiseXor";
1171 case 199: return "OpBitwiseAnd";
1172 case 200: return "OpNot";
1173 case 201: return "OpBitFieldInsert";
1174 case 202: return "OpBitFieldSExtract";
1175 case 203: return "OpBitFieldUExtract";
1176 case 204: return "OpBitReverse";
1177 case 205: return "OpBitCount";
1178 case 206: return "Bad";
1179 case 207: return "OpDPdx";
1180 case 208: return "OpDPdy";
1181 case 209: return "OpFwidth";
1182 case 210: return "OpDPdxFine";
1183 case 211: return "OpDPdyFine";
1184 case 212: return "OpFwidthFine";
1185 case 213: return "OpDPdxCoarse";
1186 case 214: return "OpDPdyCoarse";
1187 case 215: return "OpFwidthCoarse";
1188 case 216: return "Bad";
1189 case 217: return "Bad";
1190 case 218: return "OpEmitVertex";
1191 case 219: return "OpEndPrimitive";
1192 case 220: return "OpEmitStreamVertex";
1193 case 221: return "OpEndStreamPrimitive";
1194 case 222: return "Bad";
1195 case 223: return "Bad";
1196 case 224: return "OpControlBarrier";
1197 case 225: return "OpMemoryBarrier";
1198 case 226: return "Bad";
1199 case 227: return "OpAtomicLoad";
1200 case 228: return "OpAtomicStore";
1201 case 229: return "OpAtomicExchange";
1202 case 230: return "OpAtomicCompareExchange";
1203 case 231: return "OpAtomicCompareExchangeWeak";
1204 case 232: return "OpAtomicIIncrement";
1205 case 233: return "OpAtomicIDecrement";
1206 case 234: return "OpAtomicIAdd";
1207 case 235: return "OpAtomicISub";
1208 case 236: return "OpAtomicSMin";
1209 case 237: return "OpAtomicUMin";
1210 case 238: return "OpAtomicSMax";
1211 case 239: return "OpAtomicUMax";
1212 case 240: return "OpAtomicAnd";
1213 case 241: return "OpAtomicOr";
1214 case 242: return "OpAtomicXor";
1215 case 243: return "Bad";
1216 case 244: return "Bad";
1217 case 245: return "OpPhi";
1218 case 246: return "OpLoopMerge";
1219 case 247: return "OpSelectionMerge";
1220 case 248: return "OpLabel";
1221 case 249: return "OpBranch";
1222 case 250: return "OpBranchConditional";
1223 case 251: return "OpSwitch";
1224 case 252: return "OpKill";
1225 case 253: return "OpReturn";
1226 case 254: return "OpReturnValue";
1227 case 255: return "OpUnreachable";
1228 case 256: return "OpLifetimeStart";
1229 case 257: return "OpLifetimeStop";
1230 case 258: return "Bad";
John Kessenich55e7d112015-11-15 21:33:39 -07001231 case 259: return "OpGroupAsyncCopy";
1232 case 260: return "OpGroupWaitEvents";
John Kessenich5e4b1242015-08-06 22:53:06 -06001233 case 261: return "OpGroupAll";
1234 case 262: return "OpGroupAny";
1235 case 263: return "OpGroupBroadcast";
1236 case 264: return "OpGroupIAdd";
1237 case 265: return "OpGroupFAdd";
1238 case 266: return "OpGroupFMin";
1239 case 267: return "OpGroupUMin";
1240 case 268: return "OpGroupSMin";
1241 case 269: return "OpGroupFMax";
1242 case 270: return "OpGroupUMax";
1243 case 271: return "OpGroupSMax";
1244 case 272: return "Bad";
1245 case 273: return "Bad";
1246 case 274: return "OpReadPipe";
1247 case 275: return "OpWritePipe";
1248 case 276: return "OpReservedReadPipe";
1249 case 277: return "OpReservedWritePipe";
1250 case 278: return "OpReserveReadPipePackets";
1251 case 279: return "OpReserveWritePipePackets";
1252 case 280: return "OpCommitReadPipe";
1253 case 281: return "OpCommitWritePipe";
1254 case 282: return "OpIsValidReserveId";
1255 case 283: return "OpGetNumPipePackets";
1256 case 284: return "OpGetMaxPipePackets";
1257 case 285: return "OpGroupReserveReadPipePackets";
1258 case 286: return "OpGroupReserveWritePipePackets";
1259 case 287: return "OpGroupCommitReadPipe";
1260 case 288: return "OpGroupCommitWritePipe";
1261 case 289: return "Bad";
1262 case 290: return "Bad";
1263 case 291: return "OpEnqueueMarker";
1264 case 292: return "OpEnqueueKernel";
1265 case 293: return "OpGetKernelNDrangeSubGroupCount";
1266 case 294: return "OpGetKernelNDrangeMaxSubGroupSize";
1267 case 295: return "OpGetKernelWorkGroupSize";
1268 case 296: return "OpGetKernelPreferredWorkGroupSizeMultiple";
1269 case 297: return "OpRetainEvent";
1270 case 298: return "OpReleaseEvent";
1271 case 299: return "OpCreateUserEvent";
1272 case 300: return "OpIsValidEvent";
1273 case 301: return "OpSetUserEventStatus";
1274 case 302: return "OpCaptureEventProfilingInfo";
1275 case 303: return "OpGetDefaultQueue";
1276 case 304: return "OpBuildNDRange";
John Kessenich55e7d112015-11-15 21:33:39 -07001277 case 305: return "OpImageSparseSampleImplicitLod";
1278 case 306: return "OpImageSparseSampleExplicitLod";
1279 case 307: return "OpImageSparseSampleDrefImplicitLod";
1280 case 308: return "OpImageSparseSampleDrefExplicitLod";
1281 case 309: return "OpImageSparseSampleProjImplicitLod";
1282 case 310: return "OpImageSparseSampleProjExplicitLod";
1283 case 311: return "OpImageSparseSampleProjDrefImplicitLod";
1284 case 312: return "OpImageSparseSampleProjDrefExplicitLod";
1285 case 313: return "OpImageSparseFetch";
1286 case 314: return "OpImageSparseGather";
1287 case 315: return "OpImageSparseDrefGather";
1288 case 316: return "OpImageSparseTexelsResident";
1289 case 317: return "OpNoLine";
1290 case 318: return "OpAtomicFlagTestAndSet";
1291 case 319: return "OpAtomicFlagClear";
John Kessenich6c292d32016-02-15 20:58:50 -07001292 case 320: return "OpImageSparseRead";
John Kessenich140f3df2015-06-26 16:58:36 -06001293
John Kessenich5630d0e2018-03-02 01:09:28 -07001294 case OpModuleProcessed: return "OpModuleProcessed";
John Kessenich5d610ee2018-03-07 18:05:55 -07001295 case OpDecorateId: return "OpDecorateId";
John Kessenich57f6a012018-02-22 19:36:18 -07001296
John Kessenich66011cb2018-03-06 16:12:04 -07001297 case 333: return "OpGroupNonUniformElect";
1298 case 334: return "OpGroupNonUniformAll";
1299 case 335: return "OpGroupNonUniformAny";
1300 case 336: return "OpGroupNonUniformAllEqual";
1301 case 337: return "OpGroupNonUniformBroadcast";
1302 case 338: return "OpGroupNonUniformBroadcastFirst";
1303 case 339: return "OpGroupNonUniformBallot";
1304 case 340: return "OpGroupNonUniformInverseBallot";
1305 case 341: return "OpGroupNonUniformBallotBitExtract";
1306 case 342: return "OpGroupNonUniformBallotBitCount";
1307 case 343: return "OpGroupNonUniformBallotFindLSB";
1308 case 344: return "OpGroupNonUniformBallotFindMSB";
1309 case 345: return "OpGroupNonUniformShuffle";
1310 case 346: return "OpGroupNonUniformShuffleXor";
1311 case 347: return "OpGroupNonUniformShuffleUp";
1312 case 348: return "OpGroupNonUniformShuffleDown";
1313 case 349: return "OpGroupNonUniformIAdd";
1314 case 350: return "OpGroupNonUniformFAdd";
1315 case 351: return "OpGroupNonUniformIMul";
1316 case 352: return "OpGroupNonUniformFMul";
1317 case 353: return "OpGroupNonUniformSMin";
1318 case 354: return "OpGroupNonUniformUMin";
1319 case 355: return "OpGroupNonUniformFMin";
1320 case 356: return "OpGroupNonUniformSMax";
1321 case 357: return "OpGroupNonUniformUMax";
1322 case 358: return "OpGroupNonUniformFMax";
1323 case 359: return "OpGroupNonUniformBitwiseAnd";
1324 case 360: return "OpGroupNonUniformBitwiseOr";
1325 case 361: return "OpGroupNonUniformBitwiseXor";
1326 case 362: return "OpGroupNonUniformLogicalAnd";
1327 case 363: return "OpGroupNonUniformLogicalOr";
1328 case 364: return "OpGroupNonUniformLogicalXor";
1329 case 365: return "OpGroupNonUniformQuadBroadcast";
1330 case 366: return "OpGroupNonUniformQuadSwap";
1331
Rex Xu51596642016-09-21 18:56:12 +08001332 case 4421: return "OpSubgroupBallotKHR";
1333 case 4422: return "OpSubgroupFirstInvocationKHR";
Maciej Jesionowski5227b6d2017-02-17 13:45:08 +01001334 case 4428: return "OpSubgroupAllKHR";
1335 case 4429: return "OpSubgroupAnyKHR";
Ashwin Kolhec720f3e2017-01-18 14:16:49 -08001336 case 4430: return "OpSubgroupAllEqualKHR";
chaocf200da82016-12-20 12:44:35 -08001337 case 4432: return "OpSubgroupReadInvocationKHR";
Rex Xu51596642016-09-21 18:56:12 +08001338
Rex Xu9d93a232016-05-05 12:30:44 +08001339#ifdef AMD_EXTENSIONS
1340 case 5000: return "OpGroupIAddNonUniformAMD";
1341 case 5001: return "OpGroupFAddNonUniformAMD";
1342 case 5002: return "OpGroupFMinNonUniformAMD";
1343 case 5003: return "OpGroupUMinNonUniformAMD";
1344 case 5004: return "OpGroupSMinNonUniformAMD";
1345 case 5005: return "OpGroupFMaxNonUniformAMD";
1346 case 5006: return "OpGroupUMaxNonUniformAMD";
1347 case 5007: return "OpGroupSMaxNonUniformAMD";
amhagan05506bb2017-06-13 16:53:02 -04001348
1349 case 5011: return "OpFragmentMaskFetchAMD";
1350 case 5012: return "OpFragmentFetchAMD";
Rex Xu9d93a232016-05-05 12:30:44 +08001351#endif
John Kessenich6c8aaac2017-02-27 01:20:51 -07001352
amhagan91fb0092019-07-10 21:14:38 -04001353 case OpReadClockKHR: return "OpReadClockKHR";
1354
John Kessenich5d610ee2018-03-07 18:05:55 -07001355 case OpDecorateStringGOOGLE: return "OpDecorateStringGOOGLE";
1356 case OpMemberDecorateStringGOOGLE: return "OpMemberDecorateStringGOOGLE";
1357
Jeff Bolz2abe9a42018-03-29 22:52:17 -05001358#ifdef NV_EXTENSIONS
Chao Chen3c366992018-09-19 11:41:59 -07001359 case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV";
Ashwin Leleff1783d2018-10-22 16:41:44 -07001360 case OpReportIntersectionNV: return "OpReportIntersectionNV";
1361 case OpIgnoreIntersectionNV: return "OpIgnoreIntersectionNV";
1362 case OpTerminateRayNV: return "OpTerminateRayNV";
1363 case OpTraceNV: return "OpTraceNV";
1364 case OpTypeAccelerationStructureNV: return "OpTypeAccelerationStructureNV";
1365 case OpExecuteCallableNV: return "OpExecuteCallableNV";
Chao Chen3c366992018-09-19 11:41:59 -07001366 case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV";
1367 case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV";
Jeff Bolz2abe9a42018-03-29 22:52:17 -05001368#endif
Chao Chen3a137962018-09-19 11:41:27 -07001369
Jeff Bolz4605e2e2019-02-19 13:10:32 -06001370 case OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV";
1371 case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV";
1372 case OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV";
1373 case OpCooperativeMatrixMulAddNV: return "OpCooperativeMatrixMulAddNV";
1374 case OpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV";
Jeff Bolzba6170b2019-07-01 09:23:23 -05001375 case OpDemoteToHelperInvocationEXT: return "OpDemoteToHelperInvocationEXT";
1376 case OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT";
Jeff Bolz4605e2e2019-02-19 13:10:32 -06001377
Jeff Bolzc6f0ce82019-06-03 11:33:50 -05001378 case OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT";
1379 case OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT";
1380
John Kessenich6c8aaac2017-02-27 01:20:51 -07001381 default:
1382 return "Bad";
John Kessenich140f3df2015-06-26 16:58:36 -06001383 }
1384}
1385
1386// The set of objects that hold all the instruction/operand
1387// parameterization information.
Rex Xu9d93a232016-05-05 12:30:44 +08001388InstructionParameters InstructionDesc[OpCodeMask + 1];
John Kessenich140f3df2015-06-26 16:58:36 -06001389OperandParameters ExecutionModeOperands[ExecutionModeCeiling];
1390OperandParameters DecorationOperands[DecorationCeiling];
1391
1392EnumDefinition OperandClassParams[OperandCount];
John Kessenich140f3df2015-06-26 16:58:36 -06001393EnumParameters ExecutionModeParams[ExecutionModeCeiling];
John Kessenich5e4b1242015-08-06 22:53:06 -06001394EnumParameters ImageOperandsParams[ImageOperandsCeiling];
John Kessenich140f3df2015-06-26 16:58:36 -06001395EnumParameters DecorationParams[DecorationCeiling];
John Kessenich140f3df2015-06-26 16:58:36 -06001396EnumParameters LoopControlParams[FunctionControlCeiling];
1397EnumParameters SelectionControlParams[SelectControlCeiling];
1398EnumParameters FunctionControlParams[FunctionControlCeiling];
Jeff Bolz36831c92018-09-05 10:11:41 -05001399EnumParameters MemoryAccessParams[MemoryAccessCeiling];
John Kessenich140f3df2015-06-26 16:58:36 -06001400
1401// Set up all the parameterizing descriptions of the opcodes, operands, etc.
1402void Parameterize()
1403{
John Kessenich140f3df2015-06-26 16:58:36 -06001404 // only do this once.
John Kessenich5e4b1242015-08-06 22:53:06 -06001405 static bool initialized = false;
John Kessenich140f3df2015-06-26 16:58:36 -06001406 if (initialized)
1407 return;
John Kessenich140f3df2015-06-26 16:58:36 -06001408 initialized = true;
1409
1410 // Exceptions to having a result <id> and a resulting type <id>.
1411 // (Everything is initialized to have both).
1412
1413 InstructionDesc[OpNop].setResultAndType(false, false);
1414 InstructionDesc[OpSource].setResultAndType(false, false);
John Kessenich55e7d112015-11-15 21:33:39 -07001415 InstructionDesc[OpSourceContinued].setResultAndType(false, false);
John Kessenich140f3df2015-06-26 16:58:36 -06001416 InstructionDesc[OpSourceExtension].setResultAndType(false, false);
1417 InstructionDesc[OpExtension].setResultAndType(false, false);
1418 InstructionDesc[OpExtInstImport].setResultAndType(true, false);
John Kessenich5e4b1242015-08-06 22:53:06 -06001419 InstructionDesc[OpCapability].setResultAndType(false, false);
John Kessenich140f3df2015-06-26 16:58:36 -06001420 InstructionDesc[OpMemoryModel].setResultAndType(false, false);
1421 InstructionDesc[OpEntryPoint].setResultAndType(false, false);
1422 InstructionDesc[OpExecutionMode].setResultAndType(false, false);
1423 InstructionDesc[OpTypeVoid].setResultAndType(true, false);
1424 InstructionDesc[OpTypeBool].setResultAndType(true, false);
1425 InstructionDesc[OpTypeInt].setResultAndType(true, false);
1426 InstructionDesc[OpTypeFloat].setResultAndType(true, false);
1427 InstructionDesc[OpTypeVector].setResultAndType(true, false);
1428 InstructionDesc[OpTypeMatrix].setResultAndType(true, false);
John Kessenich5e4b1242015-08-06 22:53:06 -06001429 InstructionDesc[OpTypeImage].setResultAndType(true, false);
John Kessenich140f3df2015-06-26 16:58:36 -06001430 InstructionDesc[OpTypeSampler].setResultAndType(true, false);
John Kessenich5e4b1242015-08-06 22:53:06 -06001431 InstructionDesc[OpTypeSampledImage].setResultAndType(true, false);
John Kessenich140f3df2015-06-26 16:58:36 -06001432 InstructionDesc[OpTypeArray].setResultAndType(true, false);
1433 InstructionDesc[OpTypeRuntimeArray].setResultAndType(true, false);
1434 InstructionDesc[OpTypeStruct].setResultAndType(true, false);
1435 InstructionDesc[OpTypeOpaque].setResultAndType(true, false);
1436 InstructionDesc[OpTypePointer].setResultAndType(true, false);
John Kessenich55e7d112015-11-15 21:33:39 -07001437 InstructionDesc[OpTypeForwardPointer].setResultAndType(false, false);
John Kessenich140f3df2015-06-26 16:58:36 -06001438 InstructionDesc[OpTypeFunction].setResultAndType(true, false);
1439 InstructionDesc[OpTypeEvent].setResultAndType(true, false);
1440 InstructionDesc[OpTypeDeviceEvent].setResultAndType(true, false);
1441 InstructionDesc[OpTypeReserveId].setResultAndType(true, false);
1442 InstructionDesc[OpTypeQueue].setResultAndType(true, false);
1443 InstructionDesc[OpTypePipe].setResultAndType(true, false);
1444 InstructionDesc[OpFunctionEnd].setResultAndType(false, false);
1445 InstructionDesc[OpStore].setResultAndType(false, false);
John Kessenich5e4b1242015-08-06 22:53:06 -06001446 InstructionDesc[OpImageWrite].setResultAndType(false, false);
John Kessenich140f3df2015-06-26 16:58:36 -06001447 InstructionDesc[OpDecorationGroup].setResultAndType(true, false);
1448 InstructionDesc[OpDecorate].setResultAndType(false, false);
John Kessenich5d610ee2018-03-07 18:05:55 -07001449 InstructionDesc[OpDecorateId].setResultAndType(false, false);
1450 InstructionDesc[OpDecorateStringGOOGLE].setResultAndType(false, false);
John Kessenich140f3df2015-06-26 16:58:36 -06001451 InstructionDesc[OpMemberDecorate].setResultAndType(false, false);
John Kessenich5d610ee2018-03-07 18:05:55 -07001452 InstructionDesc[OpMemberDecorateStringGOOGLE].setResultAndType(false, false);
John Kessenich140f3df2015-06-26 16:58:36 -06001453 InstructionDesc[OpGroupDecorate].setResultAndType(false, false);
1454 InstructionDesc[OpGroupMemberDecorate].setResultAndType(false, false);
1455 InstructionDesc[OpName].setResultAndType(false, false);
1456 InstructionDesc[OpMemberName].setResultAndType(false, false);
1457 InstructionDesc[OpString].setResultAndType(true, false);
1458 InstructionDesc[OpLine].setResultAndType(false, false);
John Kessenich55e7d112015-11-15 21:33:39 -07001459 InstructionDesc[OpNoLine].setResultAndType(false, false);
John Kessenich140f3df2015-06-26 16:58:36 -06001460 InstructionDesc[OpCopyMemory].setResultAndType(false, false);
1461 InstructionDesc[OpCopyMemorySized].setResultAndType(false, false);
1462 InstructionDesc[OpEmitVertex].setResultAndType(false, false);
1463 InstructionDesc[OpEndPrimitive].setResultAndType(false, false);
1464 InstructionDesc[OpEmitStreamVertex].setResultAndType(false, false);
1465 InstructionDesc[OpEndStreamPrimitive].setResultAndType(false, false);
1466 InstructionDesc[OpControlBarrier].setResultAndType(false, false);
1467 InstructionDesc[OpMemoryBarrier].setResultAndType(false, false);
John Kessenich140f3df2015-06-26 16:58:36 -06001468 InstructionDesc[OpAtomicStore].setResultAndType(false, false);
1469 InstructionDesc[OpLoopMerge].setResultAndType(false, false);
1470 InstructionDesc[OpSelectionMerge].setResultAndType(false, false);
1471 InstructionDesc[OpLabel].setResultAndType(true, false);
1472 InstructionDesc[OpBranch].setResultAndType(false, false);
1473 InstructionDesc[OpBranchConditional].setResultAndType(false, false);
1474 InstructionDesc[OpSwitch].setResultAndType(false, false);
1475 InstructionDesc[OpKill].setResultAndType(false, false);
1476 InstructionDesc[OpReturn].setResultAndType(false, false);
1477 InstructionDesc[OpReturnValue].setResultAndType(false, false);
1478 InstructionDesc[OpUnreachable].setResultAndType(false, false);
1479 InstructionDesc[OpLifetimeStart].setResultAndType(false, false);
1480 InstructionDesc[OpLifetimeStop].setResultAndType(false, false);
John Kessenich140f3df2015-06-26 16:58:36 -06001481 InstructionDesc[OpCommitReadPipe].setResultAndType(false, false);
1482 InstructionDesc[OpCommitWritePipe].setResultAndType(false, false);
1483 InstructionDesc[OpGroupCommitWritePipe].setResultAndType(false, false);
1484 InstructionDesc[OpGroupCommitReadPipe].setResultAndType(false, false);
1485 InstructionDesc[OpCaptureEventProfilingInfo].setResultAndType(false, false);
1486 InstructionDesc[OpSetUserEventStatus].setResultAndType(false, false);
1487 InstructionDesc[OpRetainEvent].setResultAndType(false, false);
1488 InstructionDesc[OpReleaseEvent].setResultAndType(false, false);
John Kessenich55e7d112015-11-15 21:33:39 -07001489 InstructionDesc[OpGroupWaitEvents].setResultAndType(false, false);
1490 InstructionDesc[OpAtomicFlagClear].setResultAndType(false, false);
John Kessenich57f6a012018-02-22 19:36:18 -07001491 InstructionDesc[OpModuleProcessed].setResultAndType(false, false);
Jeff Bolz4605e2e2019-02-19 13:10:32 -06001492 InstructionDesc[OpTypeCooperativeMatrixNV].setResultAndType(true, false);
1493 InstructionDesc[OpCooperativeMatrixStoreNV].setResultAndType(false, false);
Jeff Bolzc6f0ce82019-06-03 11:33:50 -05001494 InstructionDesc[OpBeginInvocationInterlockEXT].setResultAndType(false, false);
1495 InstructionDesc[OpEndInvocationInterlockEXT].setResultAndType(false, false);
John Kessenich140f3df2015-06-26 16:58:36 -06001496
1497 // Specific additional context-dependent operands
1498
John Kessenich55e7d112015-11-15 21:33:39 -07001499 ExecutionModeOperands[ExecutionModeInvocations].push(OperandLiteralNumber, "'Number of <<Invocation,invocations>>'");
John Kessenich140f3df2015-06-26 16:58:36 -06001500
1501 ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'x size'");
1502 ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'y size'");
1503 ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'z size'");
1504
1505 ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'x size'");
1506 ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'y size'");
1507 ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'z size'");
1508
John Kessenich5e4b1242015-08-06 22:53:06 -06001509 ExecutionModeOperands[ExecutionModeOutputVertices].push(OperandLiteralNumber, "'Vertex count'");
1510 ExecutionModeOperands[ExecutionModeVecTypeHint].push(OperandLiteralNumber, "'Vector type'");
John Kessenich140f3df2015-06-26 16:58:36 -06001511
John Kessenich55e7d112015-11-15 21:33:39 -07001512 DecorationOperands[DecorationStream].push(OperandLiteralNumber, "'Stream Number'");
1513 DecorationOperands[DecorationLocation].push(OperandLiteralNumber, "'Location'");
1514 DecorationOperands[DecorationComponent].push(OperandLiteralNumber, "'Component'");
1515 DecorationOperands[DecorationIndex].push(OperandLiteralNumber, "'Index'");
1516 DecorationOperands[DecorationBinding].push(OperandLiteralNumber, "'Binding Point'");
1517 DecorationOperands[DecorationDescriptorSet].push(OperandLiteralNumber, "'Descriptor Set'");
1518 DecorationOperands[DecorationOffset].push(OperandLiteralNumber, "'Byte Offset'");
1519 DecorationOperands[DecorationXfbBuffer].push(OperandLiteralNumber, "'XFB Buffer Number'");
1520 DecorationOperands[DecorationXfbStride].push(OperandLiteralNumber, "'XFB Stride'");
1521 DecorationOperands[DecorationArrayStride].push(OperandLiteralNumber, "'Array Stride'");
1522 DecorationOperands[DecorationMatrixStride].push(OperandLiteralNumber, "'Matrix Stride'");
John Kessenich140f3df2015-06-26 16:58:36 -06001523 DecorationOperands[DecorationBuiltIn].push(OperandLiteralNumber, "See <<BuiltIn,*BuiltIn*>>");
John Kessenich55e7d112015-11-15 21:33:39 -07001524 DecorationOperands[DecorationFPRoundingMode].push(OperandFPRoundingMode, "'Floating-Point Rounding Mode'");
1525 DecorationOperands[DecorationFPFastMathMode].push(OperandFPFastMath, "'Fast-Math Mode'");
1526 DecorationOperands[DecorationLinkageAttributes].push(OperandLiteralString, "'Name'");
1527 DecorationOperands[DecorationLinkageAttributes].push(OperandLinkageType, "'Linkage Type'");
1528 DecorationOperands[DecorationFuncParamAttr].push(OperandFuncParamAttr, "'Function Parameter Attribute'");
1529 DecorationOperands[DecorationSpecId].push(OperandLiteralNumber, "'Specialization Constant ID'");
1530 DecorationOperands[DecorationInputAttachmentIndex].push(OperandLiteralNumber, "'Attachment Index'");
1531 DecorationOperands[DecorationAlignment].push(OperandLiteralNumber, "'Alignment'");
John Kessenich140f3df2015-06-26 16:58:36 -06001532
John Kessenich10971552018-03-30 00:11:39 -06001533 OperandClassParams[OperandSource].set(0, SourceString, 0);
1534 OperandClassParams[OperandExecutionModel].set(0, ExecutionModelString, nullptr);
1535 OperandClassParams[OperandAddressing].set(0, AddressingString, nullptr);
1536 OperandClassParams[OperandMemory].set(0, MemoryString, nullptr);
John Kessenich140f3df2015-06-26 16:58:36 -06001537 OperandClassParams[OperandExecutionMode].set(ExecutionModeCeiling, ExecutionModeString, ExecutionModeParams);
1538 OperandClassParams[OperandExecutionMode].setOperands(ExecutionModeOperands);
John Kessenich10971552018-03-30 00:11:39 -06001539 OperandClassParams[OperandStorage].set(0, StorageClassString, nullptr);
1540 OperandClassParams[OperandDimensionality].set(0, DimensionString, nullptr);
1541 OperandClassParams[OperandSamplerAddressingMode].set(0, SamplerAddressingModeString, nullptr);
1542 OperandClassParams[OperandSamplerFilterMode].set(0, SamplerFilterModeString, nullptr);
1543 OperandClassParams[OperandSamplerImageFormat].set(0, ImageFormatString, nullptr);
1544 OperandClassParams[OperandImageChannelOrder].set(0, ImageChannelOrderString, nullptr);
1545 OperandClassParams[OperandImageChannelDataType].set(0, ImageChannelDataTypeString, nullptr);
John Kessenich5e4b1242015-08-06 22:53:06 -06001546 OperandClassParams[OperandImageOperands].set(ImageOperandsCeiling, ImageOperandsString, ImageOperandsParams, true);
John Kessenich10971552018-03-30 00:11:39 -06001547 OperandClassParams[OperandFPFastMath].set(0, FPFastMathString, nullptr, true);
1548 OperandClassParams[OperandFPRoundingMode].set(0, FPRoundingModeString, nullptr);
1549 OperandClassParams[OperandLinkageType].set(0, LinkageTypeString, nullptr);
1550 OperandClassParams[OperandFuncParamAttr].set(0, FuncParamAttrString, nullptr);
1551 OperandClassParams[OperandAccessQualifier].set(0, AccessQualifierString, nullptr);
John Kessenich140f3df2015-06-26 16:58:36 -06001552 OperandClassParams[OperandDecoration].set(DecorationCeiling, DecorationString, DecorationParams);
1553 OperandClassParams[OperandDecoration].setOperands(DecorationOperands);
John Kessenich10971552018-03-30 00:11:39 -06001554 OperandClassParams[OperandBuiltIn].set(0, BuiltInString, nullptr);
John Kessenich140f3df2015-06-26 16:58:36 -06001555 OperandClassParams[OperandSelect].set(SelectControlCeiling, SelectControlString, SelectionControlParams, true);
1556 OperandClassParams[OperandLoop].set(LoopControlCeiling, LoopControlString, LoopControlParams, true);
1557 OperandClassParams[OperandFunction].set(FunctionControlCeiling, FunctionControlString, FunctionControlParams, true);
John Kessenich10971552018-03-30 00:11:39 -06001558 OperandClassParams[OperandMemorySemantics].set(0, MemorySemanticsString, nullptr, true);
Jeff Bolz36831c92018-09-05 10:11:41 -05001559 OperandClassParams[OperandMemoryAccess].set(MemoryAccessCeiling, MemoryAccessString, MemoryAccessParams, true);
John Kessenich10971552018-03-30 00:11:39 -06001560 OperandClassParams[OperandScope].set(0, ScopeString, nullptr);
1561 OperandClassParams[OperandGroupOperation].set(0, GroupOperationString, nullptr);
1562 OperandClassParams[OperandKernelEnqueueFlags].set(0, KernelEnqueueFlagsString, nullptr);
1563 OperandClassParams[OperandKernelProfilingInfo].set(0, KernelProfilingInfoString, nullptr, true);
1564 OperandClassParams[OperandCapability].set(0, CapabilityString, nullptr);
1565 OperandClassParams[OperandOpcode].set(OpCodeMask + 1, OpcodeString, 0);
John Kessenich140f3df2015-06-26 16:58:36 -06001566
1567 // set name of operator, an initial set of <id> style operands, and the description
1568
1569 InstructionDesc[OpSource].operands.push(OperandSource, "");
1570 InstructionDesc[OpSource].operands.push(OperandLiteralNumber, "'Version'");
John Kessenich55e7d112015-11-15 21:33:39 -07001571 InstructionDesc[OpSource].operands.push(OperandId, "'File'", true);
1572 InstructionDesc[OpSource].operands.push(OperandLiteralString, "'Source'", true);
1573
1574 InstructionDesc[OpSourceContinued].operands.push(OperandLiteralString, "'Continued Source'");
John Kessenich140f3df2015-06-26 16:58:36 -06001575
1576 InstructionDesc[OpSourceExtension].operands.push(OperandLiteralString, "'Extension'");
1577
1578 InstructionDesc[OpName].operands.push(OperandId, "'Target'");
1579 InstructionDesc[OpName].operands.push(OperandLiteralString, "'Name'");
1580
1581 InstructionDesc[OpMemberName].operands.push(OperandId, "'Type'");
1582 InstructionDesc[OpMemberName].operands.push(OperandLiteralNumber, "'Member'");
1583 InstructionDesc[OpMemberName].operands.push(OperandLiteralString, "'Name'");
1584
1585 InstructionDesc[OpString].operands.push(OperandLiteralString, "'String'");
1586
John Kessenich140f3df2015-06-26 16:58:36 -06001587 InstructionDesc[OpLine].operands.push(OperandId, "'File'");
1588 InstructionDesc[OpLine].operands.push(OperandLiteralNumber, "'Line'");
1589 InstructionDesc[OpLine].operands.push(OperandLiteralNumber, "'Column'");
1590
1591 InstructionDesc[OpExtension].operands.push(OperandLiteralString, "'Name'");
1592
1593 InstructionDesc[OpExtInstImport].operands.push(OperandLiteralString, "'Name'");
1594
John Kessenich5e4b1242015-08-06 22:53:06 -06001595 InstructionDesc[OpCapability].operands.push(OperandCapability, "'Capability'");
1596
John Kessenich140f3df2015-06-26 16:58:36 -06001597 InstructionDesc[OpMemoryModel].operands.push(OperandAddressing, "");
1598 InstructionDesc[OpMemoryModel].operands.push(OperandMemory, "");
1599
1600 InstructionDesc[OpEntryPoint].operands.push(OperandExecutionModel, "");
1601 InstructionDesc[OpEntryPoint].operands.push(OperandId, "'Entry Point'");
John Kessenich5e4b1242015-08-06 22:53:06 -06001602 InstructionDesc[OpEntryPoint].operands.push(OperandLiteralString, "'Name'");
John Kessenich55e7d112015-11-15 21:33:39 -07001603 InstructionDesc[OpEntryPoint].operands.push(OperandVariableIds, "'Interface'");
John Kessenich140f3df2015-06-26 16:58:36 -06001604
1605 InstructionDesc[OpExecutionMode].operands.push(OperandId, "'Entry Point'");
1606 InstructionDesc[OpExecutionMode].operands.push(OperandExecutionMode, "'Mode'");
John Kessenich55e7d112015-11-15 21:33:39 -07001607 InstructionDesc[OpExecutionMode].operands.push(OperandOptionalLiteral, "See <<Execution_Mode,Execution Mode>>");
John Kessenich140f3df2015-06-26 16:58:36 -06001608
1609 InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Width'");
1610 InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Signedness'");
1611
1612 InstructionDesc[OpTypeFloat].operands.push(OperandLiteralNumber, "'Width'");
1613
John Kessenich5e4b1242015-08-06 22:53:06 -06001614 InstructionDesc[OpTypeVector].operands.push(OperandId, "'Component Type'");
1615 InstructionDesc[OpTypeVector].operands.push(OperandLiteralNumber, "'Component Count'");
John Kessenich140f3df2015-06-26 16:58:36 -06001616
John Kessenich5e4b1242015-08-06 22:53:06 -06001617 InstructionDesc[OpTypeMatrix].operands.push(OperandId, "'Column Type'");
1618 InstructionDesc[OpTypeMatrix].operands.push(OperandLiteralNumber, "'Column Count'");
John Kessenich140f3df2015-06-26 16:58:36 -06001619
John Kessenich5e4b1242015-08-06 22:53:06 -06001620 InstructionDesc[OpTypeImage].operands.push(OperandId, "'Sampled Type'");
1621 InstructionDesc[OpTypeImage].operands.push(OperandDimensionality, "");
1622 InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Depth'");
1623 InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Arrayed'");
1624 InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'MS'");
1625 InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Sampled'");
1626 InstructionDesc[OpTypeImage].operands.push(OperandSamplerImageFormat, "");
John Kessenich55e7d112015-11-15 21:33:39 -07001627 InstructionDesc[OpTypeImage].operands.push(OperandAccessQualifier, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001628
John Kessenich5e4b1242015-08-06 22:53:06 -06001629 InstructionDesc[OpTypeSampledImage].operands.push(OperandId, "'Image Type'");
1630
1631 InstructionDesc[OpTypeArray].operands.push(OperandId, "'Element Type'");
John Kessenich140f3df2015-06-26 16:58:36 -06001632 InstructionDesc[OpTypeArray].operands.push(OperandId, "'Length'");
1633
John Kessenich5e4b1242015-08-06 22:53:06 -06001634 InstructionDesc[OpTypeRuntimeArray].operands.push(OperandId, "'Element Type'");
John Kessenich140f3df2015-06-26 16:58:36 -06001635
1636 InstructionDesc[OpTypeStruct].operands.push(OperandVariableIds, "'Member 0 type', +\n'member 1 type', +\n...");
1637
John Kessenich140f3df2015-06-26 16:58:36 -06001638 InstructionDesc[OpTypeOpaque].operands.push(OperandLiteralString, "The name of the opaque type.");
1639
1640 InstructionDesc[OpTypePointer].operands.push(OperandStorage, "");
1641 InstructionDesc[OpTypePointer].operands.push(OperandId, "'Type'");
1642
John Kessenich55e7d112015-11-15 21:33:39 -07001643 InstructionDesc[OpTypeForwardPointer].operands.push(OperandId, "'Pointer Type'");
1644 InstructionDesc[OpTypeForwardPointer].operands.push(OperandStorage, "");
1645
John Kessenich140f3df2015-06-26 16:58:36 -06001646 InstructionDesc[OpTypePipe].operands.push(OperandAccessQualifier, "'Qualifier'");
John Kessenich140f3df2015-06-26 16:58:36 -06001647
1648 InstructionDesc[OpTypeFunction].operands.push(OperandId, "'Return Type'");
1649 InstructionDesc[OpTypeFunction].operands.push(OperandVariableIds, "'Parameter 0 Type', +\n'Parameter 1 Type', +\n...");
1650
1651 InstructionDesc[OpConstant].operands.push(OperandVariableLiterals, "'Value'");
1652
1653 InstructionDesc[OpConstantComposite].operands.push(OperandVariableIds, "'Constituents'");
1654
John Kessenich5e4b1242015-08-06 22:53:06 -06001655 InstructionDesc[OpConstantSampler].operands.push(OperandSamplerAddressingMode, "");
John Kessenich140f3df2015-06-26 16:58:36 -06001656 InstructionDesc[OpConstantSampler].operands.push(OperandLiteralNumber, "'Param'");
John Kessenich5e4b1242015-08-06 22:53:06 -06001657 InstructionDesc[OpConstantSampler].operands.push(OperandSamplerFilterMode, "");
John Kessenich140f3df2015-06-26 16:58:36 -06001658
1659 InstructionDesc[OpSpecConstant].operands.push(OperandVariableLiterals, "'Value'");
John Kessenich140f3df2015-06-26 16:58:36 -06001660
1661 InstructionDesc[OpSpecConstantComposite].operands.push(OperandVariableIds, "'Constituents'");
John Kessenich5e4b1242015-08-06 22:53:06 -06001662
1663 InstructionDesc[OpSpecConstantOp].operands.push(OperandLiteralNumber, "'Opcode'");
1664 InstructionDesc[OpSpecConstantOp].operands.push(OperandVariableIds, "'Operands'");
John Kessenich140f3df2015-06-26 16:58:36 -06001665
1666 InstructionDesc[OpVariable].operands.push(OperandStorage, "");
John Kessenich55e7d112015-11-15 21:33:39 -07001667 InstructionDesc[OpVariable].operands.push(OperandId, "'Initializer'", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001668
John Kessenich140f3df2015-06-26 16:58:36 -06001669 InstructionDesc[OpFunction].operands.push(OperandFunction, "");
1670 InstructionDesc[OpFunction].operands.push(OperandId, "'Function Type'");
1671
1672 InstructionDesc[OpFunctionCall].operands.push(OperandId, "'Function'");
1673 InstructionDesc[OpFunctionCall].operands.push(OperandVariableIds, "'Argument 0', +\n'Argument 1', +\n...");
1674
1675 InstructionDesc[OpExtInst].operands.push(OperandId, "'Set'");
1676 InstructionDesc[OpExtInst].operands.push(OperandLiteralNumber, "'Instruction'");
1677 InstructionDesc[OpExtInst].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n...");
1678
1679 InstructionDesc[OpLoad].operands.push(OperandId, "'Pointer'");
John Kessenich55e7d112015-11-15 21:33:39 -07001680 InstructionDesc[OpLoad].operands.push(OperandMemoryAccess, "", true);
Jeff Bolz36831c92018-09-05 10:11:41 -05001681 InstructionDesc[OpLoad].operands.push(OperandLiteralNumber, "", true);
1682 InstructionDesc[OpLoad].operands.push(OperandId, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001683
1684 InstructionDesc[OpStore].operands.push(OperandId, "'Pointer'");
1685 InstructionDesc[OpStore].operands.push(OperandId, "'Object'");
John Kessenich55e7d112015-11-15 21:33:39 -07001686 InstructionDesc[OpStore].operands.push(OperandMemoryAccess, "", true);
Jeff Bolz36831c92018-09-05 10:11:41 -05001687 InstructionDesc[OpStore].operands.push(OperandLiteralNumber, "", true);
1688 InstructionDesc[OpStore].operands.push(OperandId, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001689
John Kessenich5e4b1242015-08-06 22:53:06 -06001690 InstructionDesc[OpPhi].operands.push(OperandVariableIds, "'Variable, Parent, ...'");
John Kessenich140f3df2015-06-26 16:58:36 -06001691
1692 InstructionDesc[OpDecorate].operands.push(OperandId, "'Target'");
1693 InstructionDesc[OpDecorate].operands.push(OperandDecoration, "");
1694 InstructionDesc[OpDecorate].operands.push(OperandVariableLiterals, "See <<Decoration,'Decoration'>>.");
1695
John Kessenich5d610ee2018-03-07 18:05:55 -07001696 InstructionDesc[OpDecorateId].operands.push(OperandId, "'Target'");
1697 InstructionDesc[OpDecorateId].operands.push(OperandDecoration, "");
1698 InstructionDesc[OpDecorateId].operands.push(OperandVariableIds, "See <<Decoration,'Decoration'>>.");
1699
1700 InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandId, "'Target'");
1701 InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandDecoration, "");
1702 InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandLiteralString, "'Literal String'");
1703
John Kessenich5e4b1242015-08-06 22:53:06 -06001704 InstructionDesc[OpMemberDecorate].operands.push(OperandId, "'Structure Type'");
John Kessenich140f3df2015-06-26 16:58:36 -06001705 InstructionDesc[OpMemberDecorate].operands.push(OperandLiteralNumber, "'Member'");
1706 InstructionDesc[OpMemberDecorate].operands.push(OperandDecoration, "");
1707 InstructionDesc[OpMemberDecorate].operands.push(OperandVariableLiterals, "See <<Decoration,'Decoration'>>.");
1708
John Kessenich5d610ee2018-03-07 18:05:55 -07001709 InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandId, "'Structure Type'");
1710 InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralNumber, "'Member'");
1711 InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandDecoration, "");
1712 InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralString, "'Literal String'");
1713
John Kessenich5e4b1242015-08-06 22:53:06 -06001714 InstructionDesc[OpGroupDecorate].operands.push(OperandId, "'Decoration Group'");
1715 InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Targets'");
John Kessenich140f3df2015-06-26 16:58:36 -06001716
John Kessenich5e4b1242015-08-06 22:53:06 -06001717 InstructionDesc[OpGroupMemberDecorate].operands.push(OperandId, "'Decoration Group'");
1718 InstructionDesc[OpGroupMemberDecorate].operands.push(OperandVariableIdLiteral, "'Targets'");
John Kessenich140f3df2015-06-26 16:58:36 -06001719
1720 InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Vector'");
1721 InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Index'");
1722
1723 InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Vector'");
1724 InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Component'");
1725 InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Index'");
1726
1727 InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 1'");
1728 InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 2'");
1729 InstructionDesc[OpVectorShuffle].operands.push(OperandVariableLiterals, "'Components'");
1730
1731 InstructionDesc[OpCompositeConstruct].operands.push(OperandVariableIds, "'Constituents'");
1732
1733 InstructionDesc[OpCompositeExtract].operands.push(OperandId, "'Composite'");
1734 InstructionDesc[OpCompositeExtract].operands.push(OperandVariableLiterals, "'Indexes'");
1735
1736 InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Object'");
1737 InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Composite'");
1738 InstructionDesc[OpCompositeInsert].operands.push(OperandVariableLiterals, "'Indexes'");
1739
1740 InstructionDesc[OpCopyObject].operands.push(OperandId, "'Operand'");
1741
1742 InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Target'");
1743 InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Source'");
John Kessenich55e7d112015-11-15 21:33:39 -07001744 InstructionDesc[OpCopyMemory].operands.push(OperandMemoryAccess, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001745
1746 InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Target'");
1747 InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Source'");
1748 InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Size'");
John Kessenich55e7d112015-11-15 21:33:39 -07001749 InstructionDesc[OpCopyMemorySized].operands.push(OperandMemoryAccess, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001750
John Kessenich5e4b1242015-08-06 22:53:06 -06001751 InstructionDesc[OpSampledImage].operands.push(OperandId, "'Image'");
1752 InstructionDesc[OpSampledImage].operands.push(OperandId, "'Sampler'");
John Kessenich140f3df2015-06-26 16:58:36 -06001753
John Kessenich55e7d112015-11-15 21:33:39 -07001754 InstructionDesc[OpImage].operands.push(OperandId, "'Sampled Image'");
1755
John Kessenich5e4b1242015-08-06 22:53:06 -06001756 InstructionDesc[OpImageRead].operands.push(OperandId, "'Image'");
1757 InstructionDesc[OpImageRead].operands.push(OperandId, "'Coordinate'");
John Kessenich55e7d112015-11-15 21:33:39 -07001758 InstructionDesc[OpImageRead].operands.push(OperandImageOperands, "", true);
1759 InstructionDesc[OpImageRead].operands.push(OperandVariableIds, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001760
John Kessenich5e4b1242015-08-06 22:53:06 -06001761 InstructionDesc[OpImageWrite].operands.push(OperandId, "'Image'");
1762 InstructionDesc[OpImageWrite].operands.push(OperandId, "'Coordinate'");
1763 InstructionDesc[OpImageWrite].operands.push(OperandId, "'Texel'");
John Kessenich55e7d112015-11-15 21:33:39 -07001764 InstructionDesc[OpImageWrite].operands.push(OperandImageOperands, "", true);
1765 InstructionDesc[OpImageWrite].operands.push(OperandVariableIds, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001766
John Kessenich5e4b1242015-08-06 22:53:06 -06001767 InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Sampled Image'");
1768 InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Coordinate'");
John Kessenich55e7d112015-11-15 21:33:39 -07001769 InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandImageOperands, "", true);
1770 InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandVariableIds, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001771
John Kessenich5e4b1242015-08-06 22:53:06 -06001772 InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Sampled Image'");
1773 InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Coordinate'");
John Kessenich55e7d112015-11-15 21:33:39 -07001774 InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandImageOperands, "", true);
1775 InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandVariableIds, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001776
John Kessenich5e4b1242015-08-06 22:53:06 -06001777 InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'");
1778 InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'");
1779 InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'");
John Kessenich55e7d112015-11-15 21:33:39 -07001780 InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true);
1781 InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001782
John Kessenich5e4b1242015-08-06 22:53:06 -06001783 InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'");
1784 InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'");
1785 InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'");
John Kessenich55e7d112015-11-15 21:33:39 -07001786 InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true);
1787 InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001788
John Kessenich5e4b1242015-08-06 22:53:06 -06001789 InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'");
1790 InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'");
John Kessenich55e7d112015-11-15 21:33:39 -07001791 InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandImageOperands, "", true);
1792 InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandVariableIds, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001793
John Kessenich5e4b1242015-08-06 22:53:06 -06001794 InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'");
1795 InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'");
John Kessenich55e7d112015-11-15 21:33:39 -07001796 InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandImageOperands, "", true);
1797 InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandVariableIds, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001798
John Kessenich5e4b1242015-08-06 22:53:06 -06001799 InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'");
1800 InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'");
1801 InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'");
John Kessenich55e7d112015-11-15 21:33:39 -07001802 InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true);
1803 InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001804
John Kessenich5e4b1242015-08-06 22:53:06 -06001805 InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'");
1806 InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'");
1807 InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'");
John Kessenich55e7d112015-11-15 21:33:39 -07001808 InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true);
1809 InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001810
John Kessenich55e7d112015-11-15 21:33:39 -07001811 InstructionDesc[OpImageFetch].operands.push(OperandId, "'Image'");
John Kessenich5e4b1242015-08-06 22:53:06 -06001812 InstructionDesc[OpImageFetch].operands.push(OperandId, "'Coordinate'");
John Kessenich55e7d112015-11-15 21:33:39 -07001813 InstructionDesc[OpImageFetch].operands.push(OperandImageOperands, "", true);
1814 InstructionDesc[OpImageFetch].operands.push(OperandVariableIds, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001815
John Kessenich5e4b1242015-08-06 22:53:06 -06001816 InstructionDesc[OpImageGather].operands.push(OperandId, "'Sampled Image'");
1817 InstructionDesc[OpImageGather].operands.push(OperandId, "'Coordinate'");
1818 InstructionDesc[OpImageGather].operands.push(OperandId, "'Component'");
John Kessenich55e7d112015-11-15 21:33:39 -07001819 InstructionDesc[OpImageGather].operands.push(OperandImageOperands, "", true);
1820 InstructionDesc[OpImageGather].operands.push(OperandVariableIds, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001821
John Kessenich5e4b1242015-08-06 22:53:06 -06001822 InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Sampled Image'");
1823 InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Coordinate'");
1824 InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'D~ref~'");
John Kessenich55e7d112015-11-15 21:33:39 -07001825 InstructionDesc[OpImageDrefGather].operands.push(OperandImageOperands, "", true);
1826 InstructionDesc[OpImageDrefGather].operands.push(OperandVariableIds, "", true);
John Kessenich140f3df2015-06-26 16:58:36 -06001827
John Kessenich55e7d112015-11-15 21:33:39 -07001828 InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Sampled Image'");
1829 InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Coordinate'");
1830 InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandImageOperands, "", true);
1831 InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandVariableIds, "", true);
John Kessenich55e7d112015-11-15 21:33:39 -07001832
1833 InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Sampled Image'");
1834 InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Coordinate'");
1835 InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandImageOperands, "", true);
1836 InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandVariableIds, "", true);
John Kessenich55e7d112015-11-15 21:33:39 -07001837
1838 InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'");
1839 InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'");
1840 InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'");
1841 InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true);
1842 InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true);
John Kessenich55e7d112015-11-15 21:33:39 -07001843
1844 InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'");
1845 InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'");
1846 InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'");
1847 InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true);
1848 InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true);
John Kessenich55e7d112015-11-15 21:33:39 -07001849
1850 InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'");
1851 InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'");
1852 InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandImageOperands, "", true);
1853 InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandVariableIds, "", true);
John Kessenich55e7d112015-11-15 21:33:39 -07001854
1855 InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'");
1856 InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'");
1857 InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandImageOperands, "", true);
1858 InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandVariableIds, "", true);
John Kessenich55e7d112015-11-15 21:33:39 -07001859
1860 InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'");
1861 InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'");
1862 InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'");
1863 InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true);
1864 InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true);
John Kessenich55e7d112015-11-15 21:33:39 -07001865
1866 InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'");
1867 InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'");
1868 InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'");
1869 InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true);
1870 InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true);
John Kessenich55e7d112015-11-15 21:33:39 -07001871
1872 InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Image'");
1873 InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Coordinate'");
1874 InstructionDesc[OpImageSparseFetch].operands.push(OperandImageOperands, "", true);
1875 InstructionDesc[OpImageSparseFetch].operands.push(OperandVariableIds, "", true);
John Kessenich55e7d112015-11-15 21:33:39 -07001876
1877 InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Sampled Image'");
1878 InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Coordinate'");
1879 InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Component'");
1880 InstructionDesc[OpImageSparseGather].operands.push(OperandImageOperands, "", true);
1881 InstructionDesc[OpImageSparseGather].operands.push(OperandVariableIds, "", true);
John Kessenich55e7d112015-11-15 21:33:39 -07001882
1883 InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Sampled Image'");
1884 InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Coordinate'");
1885 InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'D~ref~'");
1886 InstructionDesc[OpImageSparseDrefGather].operands.push(OperandImageOperands, "", true);
1887 InstructionDesc[OpImageSparseDrefGather].operands.push(OperandVariableIds, "", true);
John Kessenich55e7d112015-11-15 21:33:39 -07001888
John Kessenich6c292d32016-02-15 20:58:50 -07001889 InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Image'");
1890 InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Coordinate'");
1891 InstructionDesc[OpImageSparseRead].operands.push(OperandImageOperands, "", true);
1892 InstructionDesc[OpImageSparseRead].operands.push(OperandVariableIds, "", true);
John Kessenich6c292d32016-02-15 20:58:50 -07001893
John Kessenich55e7d112015-11-15 21:33:39 -07001894 InstructionDesc[OpImageSparseTexelsResident].operands.push(OperandId, "'Resident Code'");
John Kessenich55e7d112015-11-15 21:33:39 -07001895
John Kessenich5e4b1242015-08-06 22:53:06 -06001896 InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Image'");
1897 InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Level of Detail'");
John Kessenich140f3df2015-06-26 16:58:36 -06001898
John Kessenich5e4b1242015-08-06 22:53:06 -06001899 InstructionDesc[OpImageQuerySize].operands.push(OperandId, "'Image'");
John Kessenich140f3df2015-06-26 16:58:36 -06001900
John Kessenich5e4b1242015-08-06 22:53:06 -06001901 InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Image'");
1902 InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Coordinate'");
John Kessenich140f3df2015-06-26 16:58:36 -06001903
John Kessenich5e4b1242015-08-06 22:53:06 -06001904 InstructionDesc[OpImageQueryLevels].operands.push(OperandId, "'Image'");
John Kessenich140f3df2015-06-26 16:58:36 -06001905
John Kessenich5e4b1242015-08-06 22:53:06 -06001906 InstructionDesc[OpImageQuerySamples].operands.push(OperandId, "'Image'");
John Kessenich140f3df2015-06-26 16:58:36 -06001907
John Kessenich5e4b1242015-08-06 22:53:06 -06001908 InstructionDesc[OpImageQueryFormat].operands.push(OperandId, "'Image'");
John Kessenich140f3df2015-06-26 16:58:36 -06001909
John Kessenich5e4b1242015-08-06 22:53:06 -06001910 InstructionDesc[OpImageQueryOrder].operands.push(OperandId, "'Image'");
John Kessenich140f3df2015-06-26 16:58:36 -06001911
1912 InstructionDesc[OpAccessChain].operands.push(OperandId, "'Base'");
1913 InstructionDesc[OpAccessChain].operands.push(OperandVariableIds, "'Indexes'");
1914
1915 InstructionDesc[OpInBoundsAccessChain].operands.push(OperandId, "'Base'");
1916 InstructionDesc[OpInBoundsAccessChain].operands.push(OperandVariableIds, "'Indexes'");
1917
John Kessenich5e4b1242015-08-06 22:53:06 -06001918 InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Base'");
1919 InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Element'");
1920 InstructionDesc[OpPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'");
John Kessenich5e4b1242015-08-06 22:53:06 -06001921
John Kessenich55e7d112015-11-15 21:33:39 -07001922 InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Base'");
1923 InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Element'");
1924 InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'");
John Kessenich55e7d112015-11-15 21:33:39 -07001925
John Kessenich140f3df2015-06-26 16:58:36 -06001926 InstructionDesc[OpSNegate].operands.push(OperandId, "'Operand'");
1927
1928 InstructionDesc[OpFNegate].operands.push(OperandId, "'Operand'");
1929
1930 InstructionDesc[OpNot].operands.push(OperandId, "'Operand'");
1931
1932 InstructionDesc[OpAny].operands.push(OperandId, "'Vector'");
1933
1934 InstructionDesc[OpAll].operands.push(OperandId, "'Vector'");
1935
1936 InstructionDesc[OpConvertFToU].operands.push(OperandId, "'Float Value'");
1937
1938 InstructionDesc[OpConvertFToS].operands.push(OperandId, "'Float Value'");
1939
1940 InstructionDesc[OpConvertSToF].operands.push(OperandId, "'Signed Value'");
1941
John Kessenich5e4b1242015-08-06 22:53:06 -06001942 InstructionDesc[OpConvertUToF].operands.push(OperandId, "'Unsigned Value'");
John Kessenich140f3df2015-06-26 16:58:36 -06001943
John Kessenich5e4b1242015-08-06 22:53:06 -06001944 InstructionDesc[OpUConvert].operands.push(OperandId, "'Unsigned Value'");
John Kessenich140f3df2015-06-26 16:58:36 -06001945
1946 InstructionDesc[OpSConvert].operands.push(OperandId, "'Signed Value'");
1947
1948 InstructionDesc[OpFConvert].operands.push(OperandId, "'Float Value'");
1949
1950 InstructionDesc[OpSatConvertSToU].operands.push(OperandId, "'Signed Value'");
John Kessenich140f3df2015-06-26 16:58:36 -06001951
1952 InstructionDesc[OpSatConvertUToS].operands.push(OperandId, "'Unsigned Value'");
John Kessenich140f3df2015-06-26 16:58:36 -06001953
1954 InstructionDesc[OpConvertPtrToU].operands.push(OperandId, "'Pointer'");
John Kessenich140f3df2015-06-26 16:58:36 -06001955
John Kessenich5e4b1242015-08-06 22:53:06 -06001956 InstructionDesc[OpConvertUToPtr].operands.push(OperandId, "'Integer Value'");
John Kessenich140f3df2015-06-26 16:58:36 -06001957
John Kessenich5e4b1242015-08-06 22:53:06 -06001958 InstructionDesc[OpPtrCastToGeneric].operands.push(OperandId, "'Pointer'");
John Kessenich140f3df2015-06-26 16:58:36 -06001959
John Kessenich5e4b1242015-08-06 22:53:06 -06001960 InstructionDesc[OpGenericCastToPtr].operands.push(OperandId, "'Pointer'");
John Kessenich140f3df2015-06-26 16:58:36 -06001961
John Kessenich5e4b1242015-08-06 22:53:06 -06001962 InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandId, "'Pointer'");
1963 InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandStorage, "'Storage'");
John Kessenich140f3df2015-06-26 16:58:36 -06001964
John Kessenich5e4b1242015-08-06 22:53:06 -06001965 InstructionDesc[OpGenericPtrMemSemantics].operands.push(OperandId, "'Pointer'");
John Kessenich140f3df2015-06-26 16:58:36 -06001966
1967 InstructionDesc[OpBitcast].operands.push(OperandId, "'Operand'");
1968
John Kessenich5e4b1242015-08-06 22:53:06 -06001969 InstructionDesc[OpQuantizeToF16].operands.push(OperandId, "'Value'");
1970
John Kessenich140f3df2015-06-26 16:58:36 -06001971 InstructionDesc[OpTranspose].operands.push(OperandId, "'Matrix'");
1972
John Kessenichfbb6bdf2019-01-15 21:48:27 +07001973 InstructionDesc[OpCopyLogical].operands.push(OperandId, "'Operand'");
1974
John Kessenich140f3df2015-06-26 16:58:36 -06001975 InstructionDesc[OpIsNan].operands.push(OperandId, "'x'");
1976
1977 InstructionDesc[OpIsInf].operands.push(OperandId, "'x'");
1978
John Kessenich140f3df2015-06-26 16:58:36 -06001979 InstructionDesc[OpIsFinite].operands.push(OperandId, "'x'");
1980
John Kessenich140f3df2015-06-26 16:58:36 -06001981 InstructionDesc[OpIsNormal].operands.push(OperandId, "'x'");
1982
John Kessenich140f3df2015-06-26 16:58:36 -06001983 InstructionDesc[OpSignBitSet].operands.push(OperandId, "'x'");
1984
John Kessenich140f3df2015-06-26 16:58:36 -06001985 InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'x'");
1986 InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'y'");
1987
John Kessenich140f3df2015-06-26 16:58:36 -06001988 InstructionDesc[OpOrdered].operands.push(OperandId, "'x'");
1989 InstructionDesc[OpOrdered].operands.push(OperandId, "'y'");
1990
John Kessenich140f3df2015-06-26 16:58:36 -06001991 InstructionDesc[OpUnordered].operands.push(OperandId, "'x'");
1992 InstructionDesc[OpUnordered].operands.push(OperandId, "'y'");
1993
1994 InstructionDesc[OpArrayLength].operands.push(OperandId, "'Structure'");
1995 InstructionDesc[OpArrayLength].operands.push(OperandLiteralNumber, "'Array member'");
John Kessenich140f3df2015-06-26 16:58:36 -06001996
1997 InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 1'");
1998 InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 2'");
1999
2000 InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 1'");
2001 InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 2'");
2002
2003 InstructionDesc[OpISub].operands.push(OperandId, "'Operand 1'");
2004 InstructionDesc[OpISub].operands.push(OperandId, "'Operand 2'");
2005
2006 InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 1'");
2007 InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 2'");
2008
2009 InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 1'");
2010 InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 2'");
2011
2012 InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 1'");
2013 InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 2'");
2014
2015 InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 1'");
2016 InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 2'");
2017
2018 InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 1'");
2019 InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 2'");
2020
2021 InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 1'");
2022 InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 2'");
2023
2024 InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 1'");
2025 InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 2'");
2026
2027 InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 1'");
2028 InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 2'");
2029
2030 InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 1'");
2031 InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 2'");
2032
2033 InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 1'");
2034 InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 2'");
2035
2036 InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 1'");
2037 InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 2'");
2038
2039 InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Vector'");
2040 InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Scalar'");
2041
John Kessenich140f3df2015-06-26 16:58:36 -06002042 InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Matrix'");
2043 InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Scalar'");
2044
John Kessenich140f3df2015-06-26 16:58:36 -06002045 InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Vector'");
2046 InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Matrix'");
2047
John Kessenich140f3df2015-06-26 16:58:36 -06002048 InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Matrix'");
2049 InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Vector'");
2050
John Kessenich140f3df2015-06-26 16:58:36 -06002051 InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'LeftMatrix'");
2052 InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'RightMatrix'");
2053
John Kessenich140f3df2015-06-26 16:58:36 -06002054 InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 1'");
2055 InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 2'");
2056
2057 InstructionDesc[OpDot].operands.push(OperandId, "'Vector 1'");
2058 InstructionDesc[OpDot].operands.push(OperandId, "'Vector 2'");
2059
John Kessenich55e7d112015-11-15 21:33:39 -07002060 InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 1'");
2061 InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 2'");
2062
2063 InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 1'");
2064 InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 2'");
2065
2066 InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 1'");
2067 InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 2'");
2068
2069 InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 1'");
2070 InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 2'");
2071
John Kessenich5e4b1242015-08-06 22:53:06 -06002072 InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Base'");
2073 InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Shift'");
John Kessenich140f3df2015-06-26 16:58:36 -06002074
John Kessenich5e4b1242015-08-06 22:53:06 -06002075 InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Base'");
2076 InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Shift'");
John Kessenich140f3df2015-06-26 16:58:36 -06002077
John Kessenich5e4b1242015-08-06 22:53:06 -06002078 InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Base'");
2079 InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Shift'");
John Kessenich140f3df2015-06-26 16:58:36 -06002080
2081 InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 1'");
2082 InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 2'");
2083
John Kessenich140f3df2015-06-26 16:58:36 -06002084 InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 1'");
2085 InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 2'");
2086
John Kessenich5e4b1242015-08-06 22:53:06 -06002087 InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 1'");
2088 InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 2'");
2089
2090 InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 1'");
2091 InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 2'");
2092
2093 InstructionDesc[OpLogicalNot].operands.push(OperandId, "'Operand'");
2094
John Kessenich140f3df2015-06-26 16:58:36 -06002095 InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 1'");
2096 InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 2'");
2097
2098 InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 1'");
2099 InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 2'");
2100
2101 InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 1'");
2102 InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 2'");
2103
John Kessenich5e4b1242015-08-06 22:53:06 -06002104 InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Base'");
2105 InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Insert'");
2106 InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Offset'");
2107 InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Count'");
John Kessenich10971552018-03-30 00:11:39 -06002108
John Kessenich5e4b1242015-08-06 22:53:06 -06002109 InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Base'");
2110 InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Offset'");
2111 InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Count'");
2112
John Kessenich5e4b1242015-08-06 22:53:06 -06002113 InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Base'");
2114 InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Offset'");
2115 InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Count'");
2116
John Kessenich5e4b1242015-08-06 22:53:06 -06002117 InstructionDesc[OpBitReverse].operands.push(OperandId, "'Base'");
2118
2119 InstructionDesc[OpBitCount].operands.push(OperandId, "'Base'");
2120
John Kessenich140f3df2015-06-26 16:58:36 -06002121 InstructionDesc[OpSelect].operands.push(OperandId, "'Condition'");
2122 InstructionDesc[OpSelect].operands.push(OperandId, "'Object 1'");
2123 InstructionDesc[OpSelect].operands.push(OperandId, "'Object 2'");
2124
2125 InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 1'");
2126 InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 2'");
2127
2128 InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 1'");
2129 InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 2'");
2130
2131 InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 1'");
2132 InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 2'");
2133
2134 InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 1'");
2135 InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 2'");
2136
2137 InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 1'");
2138 InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 2'");
2139
2140 InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 1'");
2141 InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 2'");
2142
2143 InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 1'");
2144 InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 2'");
2145
2146 InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 1'");
2147 InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 2'");
2148
2149 InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 1'");
2150 InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 2'");
2151
2152 InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 1'");
2153 InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 2'");
2154
2155 InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 1'");
2156 InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 2'");
2157
2158 InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 1'");
2159 InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 2'");
2160
2161 InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 1'");
2162 InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 2'");
2163
2164 InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 1'");
2165 InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 2'");
2166
2167 InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 1'");
2168 InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 2'");
2169
2170 InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 1'");
2171 InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 2'");
2172
2173 InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 1'");
2174 InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 2'");
2175
2176 InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 1'");
2177 InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 2'");
2178
2179 InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
2180 InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
2181
2182 InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
2183 InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
2184
2185 InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
2186 InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
2187
2188 InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 1'");
2189 InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 2'");
2190
John Kessenich140f3df2015-06-26 16:58:36 -06002191 InstructionDesc[OpDPdx].operands.push(OperandId, "'P'");
2192
John Kessenich140f3df2015-06-26 16:58:36 -06002193 InstructionDesc[OpDPdy].operands.push(OperandId, "'P'");
2194
John Kessenich140f3df2015-06-26 16:58:36 -06002195 InstructionDesc[OpFwidth].operands.push(OperandId, "'P'");
2196
John Kessenich140f3df2015-06-26 16:58:36 -06002197 InstructionDesc[OpDPdxFine].operands.push(OperandId, "'P'");
2198
John Kessenich140f3df2015-06-26 16:58:36 -06002199 InstructionDesc[OpDPdyFine].operands.push(OperandId, "'P'");
2200
John Kessenich140f3df2015-06-26 16:58:36 -06002201 InstructionDesc[OpFwidthFine].operands.push(OperandId, "'P'");
2202
John Kessenich140f3df2015-06-26 16:58:36 -06002203 InstructionDesc[OpDPdxCoarse].operands.push(OperandId, "'P'");
2204
John Kessenich140f3df2015-06-26 16:58:36 -06002205 InstructionDesc[OpDPdyCoarse].operands.push(OperandId, "'P'");
2206
John Kessenich140f3df2015-06-26 16:58:36 -06002207 InstructionDesc[OpFwidthCoarse].operands.push(OperandId, "'P'");
2208
John Kessenich140f3df2015-06-26 16:58:36 -06002209 InstructionDesc[OpEmitStreamVertex].operands.push(OperandId, "'Stream'");
John Kessenich140f3df2015-06-26 16:58:36 -06002210
2211 InstructionDesc[OpEndStreamPrimitive].operands.push(OperandId, "'Stream'");
John Kessenich140f3df2015-06-26 16:58:36 -06002212
John Kessenich5e4b1242015-08-06 22:53:06 -06002213 InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Execution'");
2214 InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Memory'");
2215 InstructionDesc[OpControlBarrier].operands.push(OperandMemorySemantics, "'Semantics'");
John Kessenich140f3df2015-06-26 16:58:36 -06002216
John Kessenich5e4b1242015-08-06 22:53:06 -06002217 InstructionDesc[OpMemoryBarrier].operands.push(OperandScope, "'Memory'");
John Kessenich140f3df2015-06-26 16:58:36 -06002218 InstructionDesc[OpMemoryBarrier].operands.push(OperandMemorySemantics, "'Semantics'");
2219
John Kessenich5e4b1242015-08-06 22:53:06 -06002220 InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Image'");
2221 InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Coordinate'");
2222 InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Sample'");
John Kessenich140f3df2015-06-26 16:58:36 -06002223
2224 InstructionDesc[OpAtomicLoad].operands.push(OperandId, "'Pointer'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002225 InstructionDesc[OpAtomicLoad].operands.push(OperandScope, "'Scope'");
John Kessenich140f3df2015-06-26 16:58:36 -06002226 InstructionDesc[OpAtomicLoad].operands.push(OperandMemorySemantics, "'Semantics'");
2227
2228 InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Pointer'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002229 InstructionDesc[OpAtomicStore].operands.push(OperandScope, "'Scope'");
John Kessenich140f3df2015-06-26 16:58:36 -06002230 InstructionDesc[OpAtomicStore].operands.push(OperandMemorySemantics, "'Semantics'");
2231 InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Value'");
2232
2233 InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Pointer'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002234 InstructionDesc[OpAtomicExchange].operands.push(OperandScope, "'Scope'");
John Kessenich140f3df2015-06-26 16:58:36 -06002235 InstructionDesc[OpAtomicExchange].operands.push(OperandMemorySemantics, "'Semantics'");
2236 InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Value'");
2237
2238 InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Pointer'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002239 InstructionDesc[OpAtomicCompareExchange].operands.push(OperandScope, "'Scope'");
2240 InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Equal'");
2241 InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Unequal'");
John Kessenich140f3df2015-06-26 16:58:36 -06002242 InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Value'");
2243 InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Comparator'");
2244
2245 InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Pointer'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002246 InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandScope, "'Scope'");
2247 InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Equal'");
2248 InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Unequal'");
John Kessenich140f3df2015-06-26 16:58:36 -06002249 InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Value'");
2250 InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Comparator'");
2251
2252 InstructionDesc[OpAtomicIIncrement].operands.push(OperandId, "'Pointer'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002253 InstructionDesc[OpAtomicIIncrement].operands.push(OperandScope, "'Scope'");
John Kessenich140f3df2015-06-26 16:58:36 -06002254 InstructionDesc[OpAtomicIIncrement].operands.push(OperandMemorySemantics, "'Semantics'");
2255
2256 InstructionDesc[OpAtomicIDecrement].operands.push(OperandId, "'Pointer'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002257 InstructionDesc[OpAtomicIDecrement].operands.push(OperandScope, "'Scope'");
John Kessenich140f3df2015-06-26 16:58:36 -06002258 InstructionDesc[OpAtomicIDecrement].operands.push(OperandMemorySemantics, "'Semantics'");
2259
2260 InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Pointer'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002261 InstructionDesc[OpAtomicIAdd].operands.push(OperandScope, "'Scope'");
John Kessenich140f3df2015-06-26 16:58:36 -06002262 InstructionDesc[OpAtomicIAdd].operands.push(OperandMemorySemantics, "'Semantics'");
2263 InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Value'");
2264
2265 InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Pointer'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002266 InstructionDesc[OpAtomicISub].operands.push(OperandScope, "'Scope'");
John Kessenich140f3df2015-06-26 16:58:36 -06002267 InstructionDesc[OpAtomicISub].operands.push(OperandMemorySemantics, "'Semantics'");
2268 InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Value'");
2269
2270 InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Pointer'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002271 InstructionDesc[OpAtomicUMin].operands.push(OperandScope, "'Scope'");
John Kessenich140f3df2015-06-26 16:58:36 -06002272 InstructionDesc[OpAtomicUMin].operands.push(OperandMemorySemantics, "'Semantics'");
2273 InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Value'");
2274
2275 InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Pointer'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002276 InstructionDesc[OpAtomicUMax].operands.push(OperandScope, "'Scope'");
John Kessenich140f3df2015-06-26 16:58:36 -06002277 InstructionDesc[OpAtomicUMax].operands.push(OperandMemorySemantics, "'Semantics'");
2278 InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Value'");
2279
John Kessenich5e4b1242015-08-06 22:53:06 -06002280 InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Pointer'");
2281 InstructionDesc[OpAtomicSMin].operands.push(OperandScope, "'Scope'");
2282 InstructionDesc[OpAtomicSMin].operands.push(OperandMemorySemantics, "'Semantics'");
2283 InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Value'");
John Kessenich140f3df2015-06-26 16:58:36 -06002284
John Kessenich5e4b1242015-08-06 22:53:06 -06002285 InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Pointer'");
2286 InstructionDesc[OpAtomicSMax].operands.push(OperandScope, "'Scope'");
2287 InstructionDesc[OpAtomicSMax].operands.push(OperandMemorySemantics, "'Semantics'");
2288 InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Value'");
John Kessenich140f3df2015-06-26 16:58:36 -06002289
2290 InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Pointer'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002291 InstructionDesc[OpAtomicAnd].operands.push(OperandScope, "'Scope'");
John Kessenich140f3df2015-06-26 16:58:36 -06002292 InstructionDesc[OpAtomicAnd].operands.push(OperandMemorySemantics, "'Semantics'");
2293 InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Value'");
2294
2295 InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Pointer'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002296 InstructionDesc[OpAtomicOr].operands.push(OperandScope, "'Scope'");
John Kessenich140f3df2015-06-26 16:58:36 -06002297 InstructionDesc[OpAtomicOr].operands.push(OperandMemorySemantics, "'Semantics'");
2298 InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Value'");
2299
2300 InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Pointer'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002301 InstructionDesc[OpAtomicXor].operands.push(OperandScope, "'Scope'");
John Kessenich140f3df2015-06-26 16:58:36 -06002302 InstructionDesc[OpAtomicXor].operands.push(OperandMemorySemantics, "'Semantics'");
2303 InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Value'");
2304
John Kessenich55e7d112015-11-15 21:33:39 -07002305 InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandId, "'Pointer'");
2306 InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandScope, "'Scope'");
2307 InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandMemorySemantics, "'Semantics'");
John Kessenich55e7d112015-11-15 21:33:39 -07002308
2309 InstructionDesc[OpAtomicFlagClear].operands.push(OperandId, "'Pointer'");
2310 InstructionDesc[OpAtomicFlagClear].operands.push(OperandScope, "'Scope'");
2311 InstructionDesc[OpAtomicFlagClear].operands.push(OperandMemorySemantics, "'Semantics'");
John Kessenich55e7d112015-11-15 21:33:39 -07002312
John Kessenich5e4b1242015-08-06 22:53:06 -06002313 InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Merge Block'");
John Kessenich55e7d112015-11-15 21:33:39 -07002314 InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Continue Target'");
John Kessenich140f3df2015-06-26 16:58:36 -06002315 InstructionDesc[OpLoopMerge].operands.push(OperandLoop, "");
John Kessenicha2858d92018-01-31 08:11:18 -07002316 InstructionDesc[OpLoopMerge].operands.push(OperandOptionalLiteral, "");
John Kessenich140f3df2015-06-26 16:58:36 -06002317
John Kessenich5e4b1242015-08-06 22:53:06 -06002318 InstructionDesc[OpSelectionMerge].operands.push(OperandId, "'Merge Block'");
John Kessenich140f3df2015-06-26 16:58:36 -06002319 InstructionDesc[OpSelectionMerge].operands.push(OperandSelect, "");
2320
2321 InstructionDesc[OpBranch].operands.push(OperandId, "'Target Label'");
2322
2323 InstructionDesc[OpBranchConditional].operands.push(OperandId, "'Condition'");
2324 InstructionDesc[OpBranchConditional].operands.push(OperandId, "'True Label'");
2325 InstructionDesc[OpBranchConditional].operands.push(OperandId, "'False Label'");
2326 InstructionDesc[OpBranchConditional].operands.push(OperandVariableLiterals, "'Branch weights'");
2327
2328 InstructionDesc[OpSwitch].operands.push(OperandId, "'Selector'");
2329 InstructionDesc[OpSwitch].operands.push(OperandId, "'Default'");
2330 InstructionDesc[OpSwitch].operands.push(OperandVariableLiteralId, "'Target'");
2331
John Kessenich140f3df2015-06-26 16:58:36 -06002332
2333 InstructionDesc[OpReturnValue].operands.push(OperandId, "'Value'");
2334
John Kessenich5e4b1242015-08-06 22:53:06 -06002335 InstructionDesc[OpLifetimeStart].operands.push(OperandId, "'Pointer'");
2336 InstructionDesc[OpLifetimeStart].operands.push(OperandLiteralNumber, "'Size'");
John Kessenich140f3df2015-06-26 16:58:36 -06002337
John Kessenich5e4b1242015-08-06 22:53:06 -06002338 InstructionDesc[OpLifetimeStop].operands.push(OperandId, "'Pointer'");
2339 InstructionDesc[OpLifetimeStop].operands.push(OperandLiteralNumber, "'Size'");
John Kessenich140f3df2015-06-26 16:58:36 -06002340
John Kessenich55e7d112015-11-15 21:33:39 -07002341 InstructionDesc[OpGroupAsyncCopy].operands.push(OperandScope, "'Execution'");
2342 InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Destination'");
2343 InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Source'");
2344 InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Num Elements'");
2345 InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Stride'");
2346 InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Event'");
John Kessenich140f3df2015-06-26 16:58:36 -06002347
John Kessenich55e7d112015-11-15 21:33:39 -07002348 InstructionDesc[OpGroupWaitEvents].operands.push(OperandScope, "'Execution'");
2349 InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Num Events'");
2350 InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Events List'");
John Kessenich140f3df2015-06-26 16:58:36 -06002351
John Kessenich5e4b1242015-08-06 22:53:06 -06002352 InstructionDesc[OpGroupAll].operands.push(OperandScope, "'Execution'");
John Kessenich140f3df2015-06-26 16:58:36 -06002353 InstructionDesc[OpGroupAll].operands.push(OperandId, "'Predicate'");
2354
John Kessenich5e4b1242015-08-06 22:53:06 -06002355 InstructionDesc[OpGroupAny].operands.push(OperandScope, "'Execution'");
John Kessenich140f3df2015-06-26 16:58:36 -06002356 InstructionDesc[OpGroupAny].operands.push(OperandId, "'Predicate'");
2357
John Kessenich5e4b1242015-08-06 22:53:06 -06002358 InstructionDesc[OpGroupBroadcast].operands.push(OperandScope, "'Execution'");
John Kessenich140f3df2015-06-26 16:58:36 -06002359 InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'Value'");
2360 InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'LocalId'");
2361
John Kessenich5e4b1242015-08-06 22:53:06 -06002362 InstructionDesc[OpGroupIAdd].operands.push(OperandScope, "'Execution'");
John Kessenich140f3df2015-06-26 16:58:36 -06002363 InstructionDesc[OpGroupIAdd].operands.push(OperandGroupOperation, "'Operation'");
2364 InstructionDesc[OpGroupIAdd].operands.push(OperandId, "'X'");
2365
John Kessenich5e4b1242015-08-06 22:53:06 -06002366 InstructionDesc[OpGroupFAdd].operands.push(OperandScope, "'Execution'");
John Kessenich140f3df2015-06-26 16:58:36 -06002367 InstructionDesc[OpGroupFAdd].operands.push(OperandGroupOperation, "'Operation'");
2368 InstructionDesc[OpGroupFAdd].operands.push(OperandId, "'X'");
2369
John Kessenich5e4b1242015-08-06 22:53:06 -06002370 InstructionDesc[OpGroupUMin].operands.push(OperandScope, "'Execution'");
John Kessenich140f3df2015-06-26 16:58:36 -06002371 InstructionDesc[OpGroupUMin].operands.push(OperandGroupOperation, "'Operation'");
2372 InstructionDesc[OpGroupUMin].operands.push(OperandId, "'X'");
2373
John Kessenich5e4b1242015-08-06 22:53:06 -06002374 InstructionDesc[OpGroupSMin].operands.push(OperandScope, "'Execution'");
John Kessenich140f3df2015-06-26 16:58:36 -06002375 InstructionDesc[OpGroupSMin].operands.push(OperandGroupOperation, "'Operation'");
2376 InstructionDesc[OpGroupSMin].operands.push(OperandId, "X");
2377
John Kessenich5e4b1242015-08-06 22:53:06 -06002378 InstructionDesc[OpGroupFMin].operands.push(OperandScope, "'Execution'");
John Kessenich140f3df2015-06-26 16:58:36 -06002379 InstructionDesc[OpGroupFMin].operands.push(OperandGroupOperation, "'Operation'");
2380 InstructionDesc[OpGroupFMin].operands.push(OperandId, "X");
2381
John Kessenich5e4b1242015-08-06 22:53:06 -06002382 InstructionDesc[OpGroupUMax].operands.push(OperandScope, "'Execution'");
John Kessenich140f3df2015-06-26 16:58:36 -06002383 InstructionDesc[OpGroupUMax].operands.push(OperandGroupOperation, "'Operation'");
2384 InstructionDesc[OpGroupUMax].operands.push(OperandId, "X");
2385
John Kessenich5e4b1242015-08-06 22:53:06 -06002386 InstructionDesc[OpGroupSMax].operands.push(OperandScope, "'Execution'");
John Kessenich140f3df2015-06-26 16:58:36 -06002387 InstructionDesc[OpGroupSMax].operands.push(OperandGroupOperation, "'Operation'");
2388 InstructionDesc[OpGroupSMax].operands.push(OperandId, "X");
2389
John Kessenich5e4b1242015-08-06 22:53:06 -06002390 InstructionDesc[OpGroupFMax].operands.push(OperandScope, "'Execution'");
John Kessenich140f3df2015-06-26 16:58:36 -06002391 InstructionDesc[OpGroupFMax].operands.push(OperandGroupOperation, "'Operation'");
2392 InstructionDesc[OpGroupFMax].operands.push(OperandId, "X");
2393
John Kessenich5e4b1242015-08-06 22:53:06 -06002394 InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pipe'");
2395 InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pointer'");
John Kessenich55e7d112015-11-15 21:33:39 -07002396 InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Size'");
2397 InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Alignment'");
John Kessenich140f3df2015-06-26 16:58:36 -06002398
John Kessenich5e4b1242015-08-06 22:53:06 -06002399 InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pipe'");
2400 InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pointer'");
John Kessenich55e7d112015-11-15 21:33:39 -07002401 InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Size'");
2402 InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Alignment'");
John Kessenich140f3df2015-06-26 16:58:36 -06002403
John Kessenich5e4b1242015-08-06 22:53:06 -06002404 InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pipe'");
2405 InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Reserve Id'");
2406 InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Index'");
2407 InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pointer'");
John Kessenich55e7d112015-11-15 21:33:39 -07002408 InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Size'");
2409 InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Alignment'");
John Kessenich140f3df2015-06-26 16:58:36 -06002410
John Kessenich5e4b1242015-08-06 22:53:06 -06002411 InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pipe'");
2412 InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Reserve Id'");
2413 InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Index'");
2414 InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pointer'");
John Kessenich55e7d112015-11-15 21:33:39 -07002415 InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Size'");
2416 InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Alignment'");
John Kessenich140f3df2015-06-26 16:58:36 -06002417
John Kessenich5e4b1242015-08-06 22:53:06 -06002418 InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Pipe'");
2419 InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Num Packets'");
John Kessenich55e7d112015-11-15 21:33:39 -07002420 InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Size'");
2421 InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'");
John Kessenich140f3df2015-06-26 16:58:36 -06002422
John Kessenich5e4b1242015-08-06 22:53:06 -06002423 InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Pipe'");
2424 InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Num Packets'");
John Kessenich55e7d112015-11-15 21:33:39 -07002425 InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Size'");
2426 InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'");
John Kessenich140f3df2015-06-26 16:58:36 -06002427
John Kessenich5e4b1242015-08-06 22:53:06 -06002428 InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Pipe'");
2429 InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Reserve Id'");
John Kessenich55e7d112015-11-15 21:33:39 -07002430 InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Size'");
2431 InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Alignment'");
John Kessenich140f3df2015-06-26 16:58:36 -06002432
John Kessenich5e4b1242015-08-06 22:53:06 -06002433 InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Pipe'");
2434 InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Reserve Id'");
John Kessenich55e7d112015-11-15 21:33:39 -07002435 InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Size'");
2436 InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Alignment'");
John Kessenich140f3df2015-06-26 16:58:36 -06002437
John Kessenich5e4b1242015-08-06 22:53:06 -06002438 InstructionDesc[OpIsValidReserveId].operands.push(OperandId, "'Reserve Id'");
John Kessenich140f3df2015-06-26 16:58:36 -06002439
John Kessenich5e4b1242015-08-06 22:53:06 -06002440 InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Pipe'");
John Kessenich55e7d112015-11-15 21:33:39 -07002441 InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Size'");
2442 InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Alignment'");
John Kessenich140f3df2015-06-26 16:58:36 -06002443
John Kessenich5e4b1242015-08-06 22:53:06 -06002444 InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Pipe'");
John Kessenich55e7d112015-11-15 21:33:39 -07002445 InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Size'");
2446 InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Alignment'");
John Kessenich140f3df2015-06-26 16:58:36 -06002447
John Kessenich5e4b1242015-08-06 22:53:06 -06002448 InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandScope, "'Execution'");
2449 InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Pipe'");
2450 InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Num Packets'");
John Kessenich55e7d112015-11-15 21:33:39 -07002451 InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Size'");
2452 InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'");
John Kessenich140f3df2015-06-26 16:58:36 -06002453
John Kessenich5e4b1242015-08-06 22:53:06 -06002454 InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandScope, "'Execution'");
2455 InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Pipe'");
2456 InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Num Packets'");
John Kessenich55e7d112015-11-15 21:33:39 -07002457 InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Size'");
2458 InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'");
John Kessenich140f3df2015-06-26 16:58:36 -06002459
John Kessenich5e4b1242015-08-06 22:53:06 -06002460 InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandScope, "'Execution'");
2461 InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Pipe'");
2462 InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Reserve Id'");
John Kessenich55e7d112015-11-15 21:33:39 -07002463 InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Size'");
2464 InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Alignment'");
John Kessenich140f3df2015-06-26 16:58:36 -06002465
John Kessenich5e4b1242015-08-06 22:53:06 -06002466 InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandScope, "'Execution'");
2467 InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Pipe'");
2468 InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Reserve Id'");
John Kessenich55e7d112015-11-15 21:33:39 -07002469 InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Size'");
2470 InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Alignment'");
John Kessenich140f3df2015-06-26 16:58:36 -06002471
John Kessenich140f3df2015-06-26 16:58:36 -06002472 InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkSize'");
2473 InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'LocalWorkSize'");
2474 InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkOffset'");
2475
John Kessenich5e4b1242015-08-06 22:53:06 -06002476 InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Event'");
2477 InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Profiling Info'");
2478 InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Value'");
John Kessenich140f3df2015-06-26 16:58:36 -06002479
John Kessenich5e4b1242015-08-06 22:53:06 -06002480 InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Event'");
2481 InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Status'");
John Kessenich140f3df2015-06-26 16:58:36 -06002482
John Kessenich5e4b1242015-08-06 22:53:06 -06002483 InstructionDesc[OpIsValidEvent].operands.push(OperandId, "'Event'");
John Kessenich140f3df2015-06-26 16:58:36 -06002484
John Kessenich5e4b1242015-08-06 22:53:06 -06002485 InstructionDesc[OpRetainEvent].operands.push(OperandId, "'Event'");
John Kessenich140f3df2015-06-26 16:58:36 -06002486
John Kessenich5e4b1242015-08-06 22:53:06 -06002487 InstructionDesc[OpReleaseEvent].operands.push(OperandId, "'Event'");
John Kessenich140f3df2015-06-26 16:58:36 -06002488
John Kessenich140f3df2015-06-26 16:58:36 -06002489 InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Invoke'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002490 InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param'");
2491 InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Size'");
2492 InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Align'");
John Kessenich140f3df2015-06-26 16:58:36 -06002493
John Kessenich140f3df2015-06-26 16:58:36 -06002494 InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Invoke'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002495 InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param'");
2496 InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Size'");
2497 InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Align'");
John Kessenich140f3df2015-06-26 16:58:36 -06002498
John Kessenich140f3df2015-06-26 16:58:36 -06002499 InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'ND Range'");
2500 InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Invoke'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002501 InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param'");
2502 InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Size'");
2503 InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Align'");
John Kessenich140f3df2015-06-26 16:58:36 -06002504
John Kessenich140f3df2015-06-26 16:58:36 -06002505 InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'ND Range'");
2506 InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Invoke'");
John Kessenich5e4b1242015-08-06 22:53:06 -06002507 InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param'");
2508 InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Size'");
2509 InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Align'");
John Kessenich140f3df2015-06-26 16:58:36 -06002510
John Kessenich5e4b1242015-08-06 22:53:06 -06002511 InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Queue'");
2512 InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Flags'");
John Kessenich140f3df2015-06-26 16:58:36 -06002513 InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'ND Range'");
2514 InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Num Events'");
2515 InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Wait Events'");
2516 InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Ret Event'");
2517 InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Invoke'");
2518 InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param'");
2519 InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Size'");
2520 InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Align'");
2521 InstructionDesc[OpEnqueueKernel].operands.push(OperandVariableIds, "'Local Size'");
2522
John Kessenich5e4b1242015-08-06 22:53:06 -06002523 InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Queue'");
John Kessenich140f3df2015-06-26 16:58:36 -06002524 InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Num Events'");
2525 InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Wait Events'");
2526 InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Ret Event'");
Rex Xu9d93a232016-05-05 12:30:44 +08002527
John Kessenich66011cb2018-03-06 16:12:04 -07002528 InstructionDesc[OpGroupNonUniformElect].operands.push(OperandScope, "'Execution'");
2529
John Kessenich66011cb2018-03-06 16:12:04 -07002530 InstructionDesc[OpGroupNonUniformAll].operands.push(OperandScope, "'Execution'");
2531 InstructionDesc[OpGroupNonUniformAll].operands.push(OperandId, "X");
2532
John Kessenich66011cb2018-03-06 16:12:04 -07002533 InstructionDesc[OpGroupNonUniformAny].operands.push(OperandScope, "'Execution'");
2534 InstructionDesc[OpGroupNonUniformAny].operands.push(OperandId, "X");
2535
John Kessenich66011cb2018-03-06 16:12:04 -07002536 InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandScope, "'Execution'");
2537 InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandId, "X");
2538
John Kessenich66011cb2018-03-06 16:12:04 -07002539 InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandScope, "'Execution'");
2540 InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "X");
2541 InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "ID");
2542
John Kessenich66011cb2018-03-06 16:12:04 -07002543 InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandScope, "'Execution'");
2544 InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandId, "X");
2545
John Kessenich66011cb2018-03-06 16:12:04 -07002546 InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandScope, "'Execution'");
2547 InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandId, "X");
2548
John Kessenich66011cb2018-03-06 16:12:04 -07002549 InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandScope, "'Execution'");
2550 InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandId, "X");
2551
John Kessenich66011cb2018-03-06 16:12:04 -07002552 InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandScope, "'Execution'");
2553 InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "X");
2554 InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "Bit");
2555
John Kessenich66011cb2018-03-06 16:12:04 -07002556 InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandScope, "'Execution'");
2557 InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandGroupOperation, "'Operation'");
2558 InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandId, "X");
2559
John Kessenich66011cb2018-03-06 16:12:04 -07002560 InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandScope, "'Execution'");
2561 InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandId, "X");
2562
John Kessenich66011cb2018-03-06 16:12:04 -07002563 InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandScope, "'Execution'");
2564 InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandId, "X");
2565
John Kessenich66011cb2018-03-06 16:12:04 -07002566 InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandScope, "'Execution'");
2567 InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "X");
2568 InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "'Id'");
2569
John Kessenich66011cb2018-03-06 16:12:04 -07002570 InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandScope, "'Execution'");
2571 InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "X");
2572 InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "Mask");
2573
John Kessenich66011cb2018-03-06 16:12:04 -07002574 InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandScope, "'Execution'");
2575 InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "X");
2576 InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "Offset");
2577
John Kessenich66011cb2018-03-06 16:12:04 -07002578 InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandScope, "'Execution'");
2579 InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "X");
2580 InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "Offset");
2581
John Kessenich66011cb2018-03-06 16:12:04 -07002582 InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandScope, "'Execution'");
2583 InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandGroupOperation, "'Operation'");
2584 InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "X");
2585 InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "'ClusterSize'", true);
2586
John Kessenich66011cb2018-03-06 16:12:04 -07002587 InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandScope, "'Execution'");
2588 InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandGroupOperation, "'Operation'");
2589 InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "X");
2590 InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "'ClusterSize'", true);
2591
John Kessenich66011cb2018-03-06 16:12:04 -07002592 InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandScope, "'Execution'");
2593 InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandGroupOperation, "'Operation'");
2594 InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "X");
2595 InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "'ClusterSize'", true);
2596
John Kessenich66011cb2018-03-06 16:12:04 -07002597 InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandScope, "'Execution'");
2598 InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandGroupOperation, "'Operation'");
2599 InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "X");
2600 InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "'ClusterSize'", true);
2601
John Kessenich66011cb2018-03-06 16:12:04 -07002602 InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandScope, "'Execution'");
2603 InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandGroupOperation, "'Operation'");
2604 InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "X");
2605 InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "'ClusterSize'", true);
2606
John Kessenich66011cb2018-03-06 16:12:04 -07002607 InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandScope, "'Execution'");
2608 InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandGroupOperation, "'Operation'");
2609 InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "X");
2610 InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "'ClusterSize'", true);
2611
John Kessenich66011cb2018-03-06 16:12:04 -07002612 InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandScope, "'Execution'");
2613 InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandGroupOperation, "'Operation'");
2614 InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "X");
2615 InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "'ClusterSize'", true);
2616
John Kessenich66011cb2018-03-06 16:12:04 -07002617 InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandScope, "'Execution'");
2618 InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandGroupOperation, "'Operation'");
2619 InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "X");
2620 InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "'ClusterSize'", true);
2621
John Kessenich66011cb2018-03-06 16:12:04 -07002622 InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandScope, "'Execution'");
2623 InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandGroupOperation, "'Operation'");
2624 InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "X");
2625 InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "'ClusterSize'", true);
2626
John Kessenich66011cb2018-03-06 16:12:04 -07002627 InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandScope, "'Execution'");
2628 InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandGroupOperation, "'Operation'");
2629 InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "X");
2630 InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "'ClusterSize'", true);
2631
John Kessenich66011cb2018-03-06 16:12:04 -07002632 InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandScope, "'Execution'");
2633 InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandGroupOperation, "'Operation'");
2634 InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "X");
2635 InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "'ClusterSize'", true);
2636
John Kessenich66011cb2018-03-06 16:12:04 -07002637 InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandScope, "'Execution'");
2638 InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandGroupOperation, "'Operation'");
2639 InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "X");
2640 InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "'ClusterSize'", true);
2641
John Kessenich66011cb2018-03-06 16:12:04 -07002642 InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandScope, "'Execution'");
2643 InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandGroupOperation, "'Operation'");
2644 InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "X");
2645 InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "'ClusterSize'", true);
2646
John Kessenich66011cb2018-03-06 16:12:04 -07002647 InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandScope, "'Execution'");
2648 InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandGroupOperation, "'Operation'");
2649 InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "X");
2650 InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "'ClusterSize'", true);
2651
John Kessenich66011cb2018-03-06 16:12:04 -07002652 InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandScope, "'Execution'");
2653 InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandGroupOperation, "'Operation'");
2654 InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "X");
2655 InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "'ClusterSize'", true);
2656
John Kessenich66011cb2018-03-06 16:12:04 -07002657 InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandScope, "'Execution'");
2658 InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandGroupOperation, "'Operation'");
2659 InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "X");
2660 InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "'ClusterSize'", true);
2661
John Kessenich66011cb2018-03-06 16:12:04 -07002662 InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandScope, "'Execution'");
2663 InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "X");
2664 InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "'Id'");
2665
John Kessenich66011cb2018-03-06 16:12:04 -07002666 InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandScope, "'Execution'");
2667 InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "X");
2668 InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandLiteralNumber, "'Direction'");
2669
Rex Xu51596642016-09-21 18:56:12 +08002670 InstructionDesc[OpSubgroupBallotKHR].operands.push(OperandId, "'Predicate'");
2671
2672 InstructionDesc[OpSubgroupFirstInvocationKHR].operands.push(OperandId, "'Value'");
2673
Ashwin Kolhec720f3e2017-01-18 14:16:49 -08002674 InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandScope, "'Execution'");
2675 InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandId, "'Predicate'");
2676
Ashwin Kolhec720f3e2017-01-18 14:16:49 -08002677 InstructionDesc[OpSubgroupAllKHR].operands.push(OperandScope, "'Execution'");
2678 InstructionDesc[OpSubgroupAllKHR].operands.push(OperandId, "'Predicate'");
2679
Ashwin Kolhec720f3e2017-01-18 14:16:49 -08002680 InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandScope, "'Execution'");
2681 InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandId, "'Predicate'");
2682
chaocf200da82016-12-20 12:44:35 -08002683 InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Value'");
2684 InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Index'");
2685
John Kessenich57f6a012018-02-22 19:36:18 -07002686 InstructionDesc[OpModuleProcessed].operands.push(OperandLiteralString, "'process'");
2687
Rex Xu9d93a232016-05-05 12:30:44 +08002688#ifdef AMD_EXTENSIONS
Rex Xu9d93a232016-05-05 12:30:44 +08002689 InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandScope, "'Execution'");
2690 InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
2691 InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandId, "'X'");
2692
Rex Xu9d93a232016-05-05 12:30:44 +08002693 InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandScope, "'Execution'");
2694 InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
2695 InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandId, "'X'");
2696
Rex Xu9d93a232016-05-05 12:30:44 +08002697 InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandScope, "'Execution'");
2698 InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
2699 InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandId, "'X'");
2700
Rex Xu9d93a232016-05-05 12:30:44 +08002701 InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandScope, "'Execution'");
2702 InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
2703 InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandId, "X");
2704
Rex Xu9d93a232016-05-05 12:30:44 +08002705 InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandScope, "'Execution'");
2706 InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
2707 InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandId, "X");
2708
Rex Xu9d93a232016-05-05 12:30:44 +08002709 InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandScope, "'Execution'");
2710 InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
2711 InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandId, "X");
2712
Rex Xu9d93a232016-05-05 12:30:44 +08002713 InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandScope, "'Execution'");
2714 InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
2715 InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandId, "X");
2716
Rex Xu9d93a232016-05-05 12:30:44 +08002717 InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandScope, "'Execution'");
2718 InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'");
2719 InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandId, "X");
amhagan05506bb2017-06-13 16:53:02 -04002720
amhagan05506bb2017-06-13 16:53:02 -04002721 InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Image'");
2722 InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Coordinate'");
2723
amhagan05506bb2017-06-13 16:53:02 -04002724 InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Image'");
2725 InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Coordinate'");
2726 InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Fragment Index'");
Rex Xu9d93a232016-05-05 12:30:44 +08002727#endif
Jeff Bolz2abe9a42018-03-29 22:52:17 -05002728
2729#ifdef NV_EXTENSIONS
Jeff Bolz2abe9a42018-03-29 22:52:17 -05002730 InstructionDesc[OpGroupNonUniformPartitionNV].operands.push(OperandId, "X");
Chao Chenb50c02e2018-09-19 11:42:24 -07002731
Ashwin Leleff1783d2018-10-22 16:41:44 -07002732 InstructionDesc[OpTypeAccelerationStructureNV].setResultAndType(true, false);
Chao Chenb50c02e2018-09-19 11:42:24 -07002733
Ashwin Leleff1783d2018-10-22 16:41:44 -07002734 InstructionDesc[OpTraceNV].operands.push(OperandId, "'NV Acceleration Structure'");
2735 InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Flags'");
2736 InstructionDesc[OpTraceNV].operands.push(OperandId, "'Cull Mask'");
2737 InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Offset'");
2738 InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Stride'");
2739 InstructionDesc[OpTraceNV].operands.push(OperandId, "'Miss Index'");
2740 InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Origin'");
2741 InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMin'");
2742 InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Direction'");
2743 InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMax'");
2744 InstructionDesc[OpTraceNV].operands.push(OperandId, "'Payload'");
2745 InstructionDesc[OpTraceNV].setResultAndType(false, false);
Chao Chenb50c02e2018-09-19 11:42:24 -07002746
Ashwin Leleff1783d2018-10-22 16:41:44 -07002747 InstructionDesc[OpReportIntersectionNV].operands.push(OperandId, "'Hit Parameter'");
2748 InstructionDesc[OpReportIntersectionNV].operands.push(OperandId, "'Hit Kind'");
Chao Chenb50c02e2018-09-19 11:42:24 -07002749
Ashwin Leleff1783d2018-10-22 16:41:44 -07002750 InstructionDesc[OpIgnoreIntersectionNV].setResultAndType(false, false);
Chao Chenb50c02e2018-09-19 11:42:24 -07002751
Ashwin Leleff1783d2018-10-22 16:41:44 -07002752 InstructionDesc[OpTerminateRayNV].setResultAndType(false, false);
Chao Chen3c366992018-09-19 11:41:59 -07002753
Ashwin Leleff1783d2018-10-22 16:41:44 -07002754 InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "SBT Record Index");
2755 InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "CallableData ID");
2756 InstructionDesc[OpExecuteCallableNV].setResultAndType(false, false);
2757
Chao Chen3a137962018-09-19 11:41:27 -07002758 InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'");
2759 InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'");
2760 InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'");
2761 InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coarse'");
2762 InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandImageOperands, "", true);
2763 InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandVariableIds, "", true);
Chao Chen3c366992018-09-19 11:41:59 -07002764
2765 InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Index Offset'");
2766 InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Packed Indices'");
Jeff Bolz2abe9a42018-03-29 22:52:17 -05002767#endif
Jeff Bolz4605e2e2019-02-19 13:10:32 -06002768
2769 InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Component Type'");
2770 InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Scope'");
2771 InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Rows'");
2772 InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Columns'");
2773
2774 InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Pointer'");
2775 InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Stride'");
2776 InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Column Major'");
2777 InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandMemoryAccess, "'Memory Access'");
2778 InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandLiteralNumber, "", true);
2779 InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "", true);
2780
2781 InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Pointer'");
2782 InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Object'");
2783 InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Stride'");
2784 InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Column Major'");
2785 InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandMemoryAccess, "'Memory Access'");
2786 InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandLiteralNumber, "", true);
2787 InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "", true);
2788
2789 InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'A'");
2790 InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'B'");
2791 InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'C'");
2792
2793 InstructionDesc[OpCooperativeMatrixLengthNV].operands.push(OperandId, "'Type'");
Jeff Bolzba6170b2019-07-01 09:23:23 -05002794
2795 InstructionDesc[OpDemoteToHelperInvocationEXT].setResultAndType(false, false);
amhagan91fb0092019-07-10 21:14:38 -04002796
2797 InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'");
John Kessenich140f3df2015-06-26 16:58:36 -06002798}
2799
2800}; // end spv namespace