John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1 | // |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2 | //Copyright (C) 2014-2015 LunarG, Inc. |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 3 | // |
| 4 | //All rights reserved. |
| 5 | // |
| 6 | //Redistribution and use in source and binary forms, with or without |
| 7 | //modification, are permitted provided that the following conditions |
| 8 | //are met: |
| 9 | // |
| 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 | // |
| 22 | //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. |
| 34 | |
| 35 | // |
John Kessenich | 66ec80e | 2016-08-05 14:04:23 -0600 | [diff] [blame] | 36 | // 1) Programmatically fill in instruction/operand information. |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 37 | // 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 Kessenich | 66ec80e | 2016-08-05 14:04:23 -0600 | [diff] [blame] | 44 | #include <cstdio> |
| 45 | #include <cstring> |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 46 | #include <algorithm> |
| 47 | |
Rex Xu | 9d93a23 | 2016-05-05 12:30:44 +0800 | [diff] [blame] | 48 | namespace spv { |
| 49 | extern "C" { |
| 50 | // Include C-based headers that don't have a namespace |
Rex Xu | 5159664 | 2016-09-21 18:56:12 +0800 | [diff] [blame] | 51 | #ifdef AMD_EXTENSIONS |
Rex Xu | 9d93a23 | 2016-05-05 12:30:44 +0800 | [diff] [blame] | 52 | #include "GLSL.ext.AMD.h" |
Rex Xu | 5159664 | 2016-09-21 18:56:12 +0800 | [diff] [blame] | 53 | #endif |
chaoc | 0ad6a4e | 2016-12-19 16:29:34 -0800 | [diff] [blame] | 54 | #ifdef NV_EXTENSIONS |
| 55 | #include "GLSL.ext.NV.h" |
| 56 | #endif |
Rex Xu | 9d93a23 | 2016-05-05 12:30:44 +0800 | [diff] [blame] | 57 | } |
| 58 | } |
Rex Xu | 9d93a23 | 2016-05-05 12:30:44 +0800 | [diff] [blame] | 59 | |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 60 | namespace spv { |
| 61 | |
| 62 | // |
| 63 | // Whole set of functions that translate enumerants to their text strings for |
| 64 | // the specification (or their sanitized versions for auto-generating the |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 65 | // spirv headers. |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 66 | // |
| 67 | // Also, the ceilings are declared next to these, to help keep them in sync. |
| 68 | // Ceilings should be |
| 69 | // - one more than the maximum value an enumerant takes on, for non-mask enumerants |
| 70 | // (for non-sparse enums, this is the number of enumurants) |
| 71 | // - the number of bits consumed by the set of masks |
| 72 | // (for non-sparse mask enums, this is the number of enumurants) |
| 73 | // |
| 74 | |
John Kessenich | 66e2faf | 2016-03-12 18:34:36 -0700 | [diff] [blame] | 75 | const int SourceLanguageCeiling = 6; // HLSL todo: need official enumerant |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 76 | |
| 77 | const char* SourceString(int source) |
| 78 | { |
| 79 | switch (source) { |
| 80 | case 0: return "Unknown"; |
| 81 | case 1: return "ESSL"; |
| 82 | case 2: return "GLSL"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 83 | case 3: return "OpenCL_C"; |
| 84 | case 4: return "OpenCL_CPP"; |
John Kessenich | 66e2faf | 2016-03-12 18:34:36 -0700 | [diff] [blame] | 85 | case 5: return "HLSL"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 86 | |
| 87 | case SourceLanguageCeiling: |
| 88 | default: return "Bad"; |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | const int ExecutionModelCeiling = 7; |
| 93 | |
| 94 | const char* ExecutionModelString(int model) |
| 95 | { |
| 96 | switch (model) { |
| 97 | case 0: return "Vertex"; |
| 98 | case 1: return "TessellationControl"; |
| 99 | case 2: return "TessellationEvaluation"; |
| 100 | case 3: return "Geometry"; |
| 101 | case 4: return "Fragment"; |
| 102 | case 5: return "GLCompute"; |
| 103 | case 6: return "Kernel"; |
| 104 | |
| 105 | case ExecutionModelCeiling: |
| 106 | default: return "Bad"; |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | const int AddressingModelCeiling = 3; |
| 111 | |
| 112 | const char* AddressingString(int addr) |
| 113 | { |
| 114 | switch (addr) { |
| 115 | case 0: return "Logical"; |
| 116 | case 1: return "Physical32"; |
| 117 | case 2: return "Physical64"; |
| 118 | |
| 119 | case AddressingModelCeiling: |
| 120 | default: return "Bad"; |
| 121 | } |
| 122 | } |
| 123 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 124 | const int MemoryModelCeiling = 3; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 125 | |
| 126 | const char* MemoryString(int mem) |
| 127 | { |
| 128 | switch (mem) { |
| 129 | case 0: return "Simple"; |
| 130 | case 1: return "GLSL450"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 131 | case 2: return "OpenCL"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 132 | |
| 133 | case MemoryModelCeiling: |
| 134 | default: return "Bad"; |
| 135 | } |
| 136 | } |
| 137 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 138 | const int ExecutionModeCeiling = 33; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 139 | |
| 140 | const char* ExecutionModeString(int mode) |
| 141 | { |
| 142 | switch (mode) { |
| 143 | case 0: return "Invocations"; |
| 144 | case 1: return "SpacingEqual"; |
| 145 | case 2: return "SpacingFractionalEven"; |
| 146 | case 3: return "SpacingFractionalOdd"; |
| 147 | case 4: return "VertexOrderCw"; |
| 148 | case 5: return "VertexOrderCcw"; |
| 149 | case 6: return "PixelCenterInteger"; |
| 150 | case 7: return "OriginUpperLeft"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 151 | case 8: return "OriginLowerLeft"; |
| 152 | case 9: return "EarlyFragmentTests"; |
| 153 | case 10: return "PointMode"; |
| 154 | case 11: return "Xfb"; |
| 155 | case 12: return "DepthReplacing"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 156 | case 13: return "Bad"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 157 | case 14: return "DepthGreater"; |
| 158 | case 15: return "DepthLess"; |
| 159 | case 16: return "DepthUnchanged"; |
| 160 | case 17: return "LocalSize"; |
| 161 | case 18: return "LocalSizeHint"; |
| 162 | case 19: return "InputPoints"; |
| 163 | case 20: return "InputLines"; |
| 164 | case 21: return "InputLinesAdjacency"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 165 | case 22: return "Triangles"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 166 | case 23: return "InputTrianglesAdjacency"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 167 | case 24: return "Quads"; |
| 168 | case 25: return "Isolines"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 169 | case 26: return "OutputVertices"; |
| 170 | case 27: return "OutputPoints"; |
| 171 | case 28: return "OutputLineStrip"; |
| 172 | case 29: return "OutputTriangleStrip"; |
| 173 | case 30: return "VecTypeHint"; |
| 174 | case 31: return "ContractionOff"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 175 | case 32: return "Bad"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 176 | |
| 177 | case ExecutionModeCeiling: |
| 178 | default: return "Bad"; |
| 179 | } |
| 180 | } |
| 181 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 182 | const int StorageClassCeiling = 12; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 183 | |
| 184 | const char* StorageClassString(int StorageClass) |
| 185 | { |
| 186 | switch (StorageClass) { |
| 187 | case 0: return "UniformConstant"; |
| 188 | case 1: return "Input"; |
| 189 | case 2: return "Uniform"; |
| 190 | case 3: return "Output"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 191 | case 4: return "Workgroup"; |
| 192 | case 5: return "CrossWorkgroup"; |
| 193 | case 6: return "Private"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 194 | case 7: return "Function"; |
| 195 | case 8: return "Generic"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 196 | case 9: return "PushConstant"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 197 | case 10: return "AtomicCounter"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 198 | case 11: return "Image"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 199 | |
| 200 | case StorageClassCeiling: |
| 201 | default: return "Bad"; |
| 202 | } |
| 203 | } |
| 204 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 205 | const int DecorationCeiling = 45; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 206 | |
| 207 | const char* DecorationString(int decoration) |
| 208 | { |
| 209 | switch (decoration) { |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 210 | case 0: return "RelaxedPrecision"; |
| 211 | case 1: return "SpecId"; |
| 212 | case 2: return "Block"; |
| 213 | case 3: return "BufferBlock"; |
| 214 | case 4: return "RowMajor"; |
| 215 | case 5: return "ColMajor"; |
| 216 | case 6: return "ArrayStride"; |
| 217 | case 7: return "MatrixStride"; |
| 218 | case 8: return "GLSLShared"; |
| 219 | case 9: return "GLSLPacked"; |
| 220 | case 10: return "CPacked"; |
| 221 | case 11: return "BuiltIn"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 222 | case 12: return "Bad"; |
| 223 | case 13: return "NoPerspective"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 224 | case 14: return "Flat"; |
| 225 | case 15: return "Patch"; |
| 226 | case 16: return "Centroid"; |
| 227 | case 17: return "Sample"; |
| 228 | case 18: return "Invariant"; |
| 229 | case 19: return "Restrict"; |
| 230 | case 20: return "Aliased"; |
| 231 | case 21: return "Volatile"; |
| 232 | case 22: return "Constant"; |
| 233 | case 23: return "Coherent"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 234 | case 24: return "NonWritable"; |
| 235 | case 25: return "NonReadable"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 236 | case 26: return "Uniform"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 237 | case 27: return "Bad"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 238 | case 28: return "SaturatedConversion"; |
| 239 | case 29: return "Stream"; |
| 240 | case 30: return "Location"; |
| 241 | case 31: return "Component"; |
| 242 | case 32: return "Index"; |
| 243 | case 33: return "Binding"; |
| 244 | case 34: return "DescriptorSet"; |
| 245 | case 35: return "Offset"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 246 | case 36: return "XfbBuffer"; |
| 247 | case 37: return "XfbStride"; |
| 248 | case 38: return "FuncParamAttr"; |
| 249 | case 39: return "FP Rounding Mode"; |
| 250 | case 40: return "FP Fast Math Mode"; |
| 251 | case 41: return "Linkage Attributes"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 252 | case 42: return "NoContraction"; |
| 253 | case 43: return "InputAttachmentIndex"; |
| 254 | case 44: return "Alignment"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 255 | |
| 256 | case DecorationCeiling: |
| 257 | default: return "Bad"; |
Rex Xu | 9d93a23 | 2016-05-05 12:30:44 +0800 | [diff] [blame] | 258 | |
| 259 | #ifdef AMD_EXTENSIONS |
| 260 | case 4999: return "ExplicitInterpAMD"; |
| 261 | #endif |
chaoc | 0ad6a4e | 2016-12-19 16:29:34 -0800 | [diff] [blame] | 262 | #ifdef NV_EXTENSIONS |
| 263 | case 5248: return "OverrideCoverageNV"; |
| 264 | #endif |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 265 | } |
| 266 | } |
| 267 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 268 | const int BuiltInCeiling = 44; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 269 | |
| 270 | const char* BuiltInString(int builtIn) |
| 271 | { |
| 272 | switch (builtIn) { |
| 273 | case 0: return "Position"; |
| 274 | case 1: return "PointSize"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 275 | case 2: return "Bad"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 276 | case 3: return "ClipDistance"; |
| 277 | case 4: return "CullDistance"; |
| 278 | case 5: return "VertexId"; |
| 279 | case 6: return "InstanceId"; |
| 280 | case 7: return "PrimitiveId"; |
| 281 | case 8: return "InvocationId"; |
| 282 | case 9: return "Layer"; |
| 283 | case 10: return "ViewportIndex"; |
| 284 | case 11: return "TessLevelOuter"; |
| 285 | case 12: return "TessLevelInner"; |
| 286 | case 13: return "TessCoord"; |
| 287 | case 14: return "PatchVertices"; |
| 288 | case 15: return "FragCoord"; |
| 289 | case 16: return "PointCoord"; |
| 290 | case 17: return "FrontFacing"; |
| 291 | case 18: return "SampleId"; |
| 292 | case 19: return "SamplePosition"; |
| 293 | case 20: return "SampleMask"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 294 | case 21: return "Bad"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 295 | case 22: return "FragDepth"; |
| 296 | case 23: return "HelperInvocation"; |
| 297 | case 24: return "NumWorkgroups"; |
| 298 | case 25: return "WorkgroupSize"; |
| 299 | case 26: return "WorkgroupId"; |
| 300 | case 27: return "LocalInvocationId"; |
| 301 | case 28: return "GlobalInvocationId"; |
| 302 | case 29: return "LocalInvocationIndex"; |
| 303 | case 30: return "WorkDim"; |
| 304 | case 31: return "GlobalSize"; |
| 305 | case 32: return "EnqueuedWorkgroupSize"; |
| 306 | case 33: return "GlobalOffset"; |
| 307 | case 34: return "GlobalLinearId"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 308 | case 35: return "Bad"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 309 | case 36: return "SubgroupSize"; |
| 310 | case 37: return "SubgroupMaxSize"; |
| 311 | case 38: return "NumSubgroups"; |
| 312 | case 39: return "NumEnqueuedSubgroups"; |
| 313 | case 40: return "SubgroupId"; |
| 314 | case 41: return "SubgroupLocalInvocationId"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 315 | case 42: return "VertexIndex"; // TBD: put next to VertexId? |
| 316 | case 43: return "InstanceIndex"; // TBD: put next to InstanceId? |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 317 | |
| 318 | case BuiltInCeiling: |
| 319 | default: return "Bad"; |
Rex Xu | 9d93a23 | 2016-05-05 12:30:44 +0800 | [diff] [blame] | 320 | |
Rex Xu | 5159664 | 2016-09-21 18:56:12 +0800 | [diff] [blame] | 321 | case 4416: return "SubgroupEqMaskKHR"; |
| 322 | case 4417: return "SubgroupGeMaskKHR"; |
| 323 | case 4418: return "SubgroupGtMaskKHR"; |
| 324 | case 4419: return "SubgroupLeMaskKHR"; |
| 325 | case 4420: return "SubgroupLtMaskKHR"; |
| 326 | |
Rex Xu | f3b2747 | 2016-07-22 18:15:31 +0800 | [diff] [blame] | 327 | case 4424: return "BaseVertex"; |
| 328 | case 4425: return "BaseInstance"; |
| 329 | case 4426: return "DrawIndex"; |
| 330 | |
Rex Xu | 9d93a23 | 2016-05-05 12:30:44 +0800 | [diff] [blame] | 331 | #ifdef AMD_EXTENSIONS |
| 332 | case 4992: return "BaryCoordNoPerspAMD"; |
| 333 | case 4993: return "BaryCoordNoPerspCentroidAMD"; |
| 334 | case 4994: return "BaryCoordNoPerspSampleAMD"; |
| 335 | case 4995: return "BaryCoordSmoothAMD"; |
| 336 | case 4996: return "BaryCoordSmoothCentroidAMD"; |
| 337 | case 4997: return "BaryCoordSmoothSampleAMD"; |
| 338 | case 4998: return "BaryCoordPullModelAMD"; |
| 339 | #endif |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 340 | } |
| 341 | } |
| 342 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 343 | const int DimensionCeiling = 7; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 344 | |
| 345 | const char* DimensionString(int dim) |
| 346 | { |
| 347 | switch (dim) { |
| 348 | case 0: return "1D"; |
| 349 | case 1: return "2D"; |
| 350 | case 2: return "3D"; |
| 351 | case 3: return "Cube"; |
| 352 | case 4: return "Rect"; |
| 353 | case 5: return "Buffer"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 354 | case 6: return "SubpassData"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 355 | |
| 356 | case DimensionCeiling: |
| 357 | default: return "Bad"; |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | const int SamplerAddressingModeCeiling = 5; |
| 362 | |
| 363 | const char* SamplerAddressingModeString(int mode) |
| 364 | { |
| 365 | switch (mode) { |
| 366 | case 0: return "None"; |
| 367 | case 1: return "ClampToEdge"; |
| 368 | case 2: return "Clamp"; |
| 369 | case 3: return "Repeat"; |
| 370 | case 4: return "RepeatMirrored"; |
| 371 | |
| 372 | case SamplerAddressingModeCeiling: |
| 373 | default: return "Bad"; |
| 374 | } |
| 375 | } |
| 376 | |
| 377 | const int SamplerFilterModeCeiling = 2; |
| 378 | |
| 379 | const char* SamplerFilterModeString(int mode) |
| 380 | { |
| 381 | switch (mode) { |
| 382 | case 0: return "Nearest"; |
| 383 | case 1: return "Linear"; |
| 384 | |
| 385 | case SamplerFilterModeCeiling: |
| 386 | default: return "Bad"; |
| 387 | } |
| 388 | } |
| 389 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 390 | const int ImageFormatCeiling = 40; |
| 391 | |
| 392 | const char* ImageFormatString(int format) |
| 393 | { |
| 394 | switch (format) { |
| 395 | case 0: return "Unknown"; |
| 396 | |
| 397 | // ES/Desktop float |
| 398 | case 1: return "Rgba32f"; |
| 399 | case 2: return "Rgba16f"; |
| 400 | case 3: return "R32f"; |
| 401 | case 4: return "Rgba8"; |
| 402 | case 5: return "Rgba8Snorm"; |
| 403 | |
| 404 | // Desktop float |
| 405 | case 6: return "Rg32f"; |
| 406 | case 7: return "Rg16f"; |
| 407 | case 8: return "R11fG11fB10f"; |
| 408 | case 9: return "R16f"; |
| 409 | case 10: return "Rgba16"; |
| 410 | case 11: return "Rgb10A2"; |
| 411 | case 12: return "Rg16"; |
| 412 | case 13: return "Rg8"; |
| 413 | case 14: return "R16"; |
| 414 | case 15: return "R8"; |
| 415 | case 16: return "Rgba16Snorm"; |
| 416 | case 17: return "Rg16Snorm"; |
| 417 | case 18: return "Rg8Snorm"; |
| 418 | case 19: return "R16Snorm"; |
| 419 | case 20: return "R8Snorm"; |
| 420 | |
| 421 | // ES/Desktop int |
| 422 | case 21: return "Rgba32i"; |
| 423 | case 22: return "Rgba16i"; |
| 424 | case 23: return "Rgba8i"; |
| 425 | case 24: return "R32i"; |
| 426 | |
| 427 | // Desktop int |
| 428 | case 25: return "Rg32i"; |
| 429 | case 26: return "Rg16i"; |
| 430 | case 27: return "Rg8i"; |
| 431 | case 28: return "R16i"; |
| 432 | case 29: return "R8i"; |
| 433 | |
| 434 | // ES/Desktop uint |
| 435 | case 30: return "Rgba32ui"; |
| 436 | case 31: return "Rgba16ui"; |
| 437 | case 32: return "Rgba8ui"; |
| 438 | case 33: return "R32ui"; |
| 439 | |
| 440 | // Desktop uint |
| 441 | case 34: return "Rgb10a2ui"; |
| 442 | case 35: return "Rg32ui"; |
| 443 | case 36: return "Rg16ui"; |
| 444 | case 37: return "Rg8ui"; |
| 445 | case 38: return "R16ui"; |
| 446 | case 39: return "R8ui"; |
| 447 | |
| 448 | case ImageFormatCeiling: |
| 449 | default: |
| 450 | return "Bad"; |
| 451 | } |
| 452 | } |
| 453 | |
| 454 | const int ImageChannelOrderCeiling = 19; |
| 455 | |
| 456 | const char* ImageChannelOrderString(int format) |
| 457 | { |
| 458 | switch (format) { |
| 459 | case 0: return "R"; |
| 460 | case 1: return "A"; |
| 461 | case 2: return "RG"; |
| 462 | case 3: return "RA"; |
| 463 | case 4: return "RGB"; |
| 464 | case 5: return "RGBA"; |
| 465 | case 6: return "BGRA"; |
| 466 | case 7: return "ARGB"; |
| 467 | case 8: return "Intensity"; |
| 468 | case 9: return "Luminance"; |
| 469 | case 10: return "Rx"; |
| 470 | case 11: return "RGx"; |
| 471 | case 12: return "RGBx"; |
| 472 | case 13: return "Depth"; |
| 473 | case 14: return "DepthStencil"; |
| 474 | case 15: return "sRGB"; |
| 475 | case 16: return "sRGBx"; |
| 476 | case 17: return "sRGBA"; |
| 477 | case 18: return "sBGRA"; |
| 478 | |
| 479 | case ImageChannelOrderCeiling: |
| 480 | default: |
| 481 | return "Bad"; |
| 482 | } |
| 483 | } |
| 484 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 485 | const int ImageChannelDataTypeCeiling = 17; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 486 | |
| 487 | const char* ImageChannelDataTypeString(int type) |
| 488 | { |
| 489 | switch (type) |
| 490 | { |
| 491 | case 0: return "SnormInt8"; |
| 492 | case 1: return "SnormInt16"; |
| 493 | case 2: return "UnormInt8"; |
| 494 | case 3: return "UnormInt16"; |
| 495 | case 4: return "UnormShort565"; |
| 496 | case 5: return "UnormShort555"; |
| 497 | case 6: return "UnormInt101010"; |
| 498 | case 7: return "SignedInt8"; |
| 499 | case 8: return "SignedInt16"; |
| 500 | case 9: return "SignedInt32"; |
| 501 | case 10: return "UnsignedInt8"; |
| 502 | case 11: return "UnsignedInt16"; |
| 503 | case 12: return "UnsignedInt32"; |
| 504 | case 13: return "HalfFloat"; |
| 505 | case 14: return "Float"; |
| 506 | case 15: return "UnormInt24"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 507 | case 16: return "UnormInt101010_2"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 508 | |
| 509 | case ImageChannelDataTypeCeiling: |
| 510 | default: |
| 511 | return "Bad"; |
| 512 | } |
| 513 | } |
| 514 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 515 | const int ImageOperandsCeiling = 8; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 516 | |
| 517 | const char* ImageOperandsString(int format) |
| 518 | { |
| 519 | switch (format) { |
| 520 | case 0: return "Bias"; |
| 521 | case 1: return "Lod"; |
| 522 | case 2: return "Grad"; |
| 523 | case 3: return "ConstOffset"; |
| 524 | case 4: return "Offset"; |
| 525 | case 5: return "ConstOffsets"; |
| 526 | case 6: return "Sample"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 527 | case 7: return "MinLod"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 528 | |
| 529 | case ImageOperandsCeiling: |
| 530 | default: |
| 531 | return "Bad"; |
| 532 | } |
| 533 | } |
| 534 | |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 535 | const int FPFastMathCeiling = 5; |
| 536 | |
| 537 | const char* FPFastMathString(int mode) |
| 538 | { |
| 539 | switch (mode) { |
| 540 | case 0: return "NotNaN"; |
| 541 | case 1: return "NotInf"; |
| 542 | case 2: return "NSZ"; |
| 543 | case 3: return "AllowRecip"; |
| 544 | case 4: return "Fast"; |
| 545 | |
| 546 | case FPFastMathCeiling: |
| 547 | default: return "Bad"; |
| 548 | } |
| 549 | } |
| 550 | |
| 551 | const int FPRoundingModeCeiling = 4; |
| 552 | |
| 553 | const char* FPRoundingModeString(int mode) |
| 554 | { |
| 555 | switch (mode) { |
| 556 | case 0: return "RTE"; |
| 557 | case 1: return "RTZ"; |
| 558 | case 2: return "RTP"; |
| 559 | case 3: return "RTN"; |
| 560 | |
| 561 | case FPRoundingModeCeiling: |
| 562 | default: return "Bad"; |
| 563 | } |
| 564 | } |
| 565 | |
| 566 | const int LinkageTypeCeiling = 2; |
| 567 | |
| 568 | const char* LinkageTypeString(int type) |
| 569 | { |
| 570 | switch (type) { |
| 571 | case 0: return "Export"; |
| 572 | case 1: return "Import"; |
| 573 | |
| 574 | case LinkageTypeCeiling: |
| 575 | default: return "Bad"; |
| 576 | } |
| 577 | } |
| 578 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 579 | const int FuncParamAttrCeiling = 8; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 580 | |
| 581 | const char* FuncParamAttrString(int attr) |
| 582 | { |
| 583 | switch (attr) { |
| 584 | case 0: return "Zext"; |
| 585 | case 1: return "Sext"; |
| 586 | case 2: return "ByVal"; |
| 587 | case 3: return "Sret"; |
| 588 | case 4: return "NoAlias"; |
| 589 | case 5: return "NoCapture"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 590 | case 6: return "NoWrite"; |
| 591 | case 7: return "NoReadWrite"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 592 | |
| 593 | case FuncParamAttrCeiling: |
| 594 | default: return "Bad"; |
| 595 | } |
| 596 | } |
| 597 | |
| 598 | const int AccessQualifierCeiling = 3; |
| 599 | |
| 600 | const char* AccessQualifierString(int attr) |
| 601 | { |
| 602 | switch (attr) { |
| 603 | case 0: return "ReadOnly"; |
| 604 | case 1: return "WriteOnly"; |
| 605 | case 2: return "ReadWrite"; |
| 606 | |
| 607 | case AccessQualifierCeiling: |
| 608 | default: return "Bad"; |
| 609 | } |
| 610 | } |
| 611 | |
| 612 | const int SelectControlCeiling = 2; |
| 613 | |
| 614 | const char* SelectControlString(int cont) |
| 615 | { |
| 616 | switch (cont) { |
| 617 | case 0: return "Flatten"; |
| 618 | case 1: return "DontFlatten"; |
| 619 | |
| 620 | case SelectControlCeiling: |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 621 | default: return "Bad"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 622 | } |
| 623 | } |
| 624 | |
| 625 | const int LoopControlCeiling = 2; |
| 626 | |
| 627 | const char* LoopControlString(int cont) |
| 628 | { |
| 629 | switch (cont) { |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 630 | case 0: return "Unroll"; |
| 631 | case 1: return "DontUnroll"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 632 | |
| 633 | case LoopControlCeiling: |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 634 | default: return "Bad"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 635 | } |
| 636 | } |
| 637 | |
| 638 | const int FunctionControlCeiling = 4; |
| 639 | |
| 640 | const char* FunctionControlString(int cont) |
| 641 | { |
| 642 | switch (cont) { |
| 643 | case 0: return "Inline"; |
| 644 | case 1: return "DontInline"; |
| 645 | case 2: return "Pure"; |
| 646 | case 3: return "Const"; |
| 647 | |
| 648 | case FunctionControlCeiling: |
| 649 | default: return "Bad"; |
| 650 | } |
| 651 | } |
| 652 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 653 | const int MemorySemanticsCeiling = 12; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 654 | |
| 655 | const char* MemorySemanticsString(int mem) |
| 656 | { |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 657 | // Note: No bits set (None) means "Relaxed" |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 658 | switch (mem) { |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 659 | case 0: return "Bad"; // Note: this is a placeholder for 'Consume' |
| 660 | case 1: return "Acquire"; |
| 661 | case 2: return "Release"; |
| 662 | case 3: return "AcquireRelease"; |
| 663 | case 4: return "SequentiallyConsistent"; |
| 664 | case 5: return "Bad"; // Note: reserved for future expansion |
| 665 | case 6: return "UniformMemory"; |
| 666 | case 7: return "SubgroupMemory"; |
| 667 | case 8: return "WorkgroupMemory"; |
| 668 | case 9: return "CrossWorkgroupMemory"; |
| 669 | case 10: return "AtomicCounterMemory"; |
| 670 | case 11: return "ImageMemory"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 671 | |
| 672 | case MemorySemanticsCeiling: |
| 673 | default: return "Bad"; |
| 674 | } |
| 675 | } |
| 676 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 677 | const int MemoryAccessCeiling = 3; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 678 | |
| 679 | const char* MemoryAccessString(int mem) |
| 680 | { |
| 681 | switch (mem) { |
| 682 | case 0: return "Volatile"; |
| 683 | case 1: return "Aligned"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 684 | case 2: return "Nontemporal"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 685 | |
| 686 | case MemoryAccessCeiling: |
| 687 | default: return "Bad"; |
| 688 | } |
| 689 | } |
| 690 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 691 | const int ScopeCeiling = 5; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 692 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 693 | const char* ScopeString(int mem) |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 694 | { |
| 695 | switch (mem) { |
| 696 | case 0: return "CrossDevice"; |
| 697 | case 1: return "Device"; |
| 698 | case 2: return "Workgroup"; |
| 699 | case 3: return "Subgroup"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 700 | case 4: return "Invocation"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 701 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 702 | case ScopeCeiling: |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 703 | default: return "Bad"; |
| 704 | } |
| 705 | } |
| 706 | |
| 707 | const int GroupOperationCeiling = 3; |
| 708 | |
| 709 | const char* GroupOperationString(int gop) |
| 710 | { |
| 711 | |
| 712 | switch (gop) |
| 713 | { |
| 714 | case 0: return "Reduce"; |
| 715 | case 1: return "InclusiveScan"; |
| 716 | case 2: return "ExclusiveScan"; |
| 717 | |
| 718 | case GroupOperationCeiling: |
| 719 | default: return "Bad"; |
| 720 | } |
| 721 | } |
| 722 | |
| 723 | const int KernelEnqueueFlagsCeiling = 3; |
| 724 | |
| 725 | const char* KernelEnqueueFlagsString(int flag) |
| 726 | { |
| 727 | switch (flag) |
| 728 | { |
| 729 | case 0: return "NoWait"; |
| 730 | case 1: return "WaitKernel"; |
| 731 | case 2: return "WaitWorkGroup"; |
| 732 | |
| 733 | case KernelEnqueueFlagsCeiling: |
| 734 | default: return "Bad"; |
| 735 | } |
| 736 | } |
| 737 | |
| 738 | const int KernelProfilingInfoCeiling = 1; |
| 739 | |
| 740 | const char* KernelProfilingInfoString(int info) |
| 741 | { |
| 742 | switch (info) |
| 743 | { |
| 744 | case 0: return "CmdExecTime"; |
| 745 | |
| 746 | case KernelProfilingInfoCeiling: |
| 747 | default: return "Bad"; |
| 748 | } |
| 749 | } |
| 750 | |
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 751 | const int CapabilityCeiling = 58; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 752 | |
| 753 | const char* CapabilityString(int info) |
| 754 | { |
| 755 | switch (info) |
| 756 | { |
| 757 | case 0: return "Matrix"; |
| 758 | case 1: return "Shader"; |
| 759 | case 2: return "Geometry"; |
| 760 | case 3: return "Tessellation"; |
| 761 | case 4: return "Addresses"; |
| 762 | case 5: return "Linkage"; |
| 763 | case 6: return "Kernel"; |
| 764 | case 7: return "Vector16"; |
| 765 | case 8: return "Float16Buffer"; |
| 766 | case 9: return "Float16"; |
| 767 | case 10: return "Float64"; |
| 768 | case 11: return "Int64"; |
| 769 | case 12: return "Int64Atomics"; |
| 770 | case 13: return "ImageBasic"; |
| 771 | case 14: return "ImageReadWrite"; |
| 772 | case 15: return "ImageMipmap"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 773 | case 16: return "Bad"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 774 | case 17: return "Pipes"; |
| 775 | case 18: return "Groups"; |
| 776 | case 19: return "DeviceEnqueue"; |
| 777 | case 20: return "LiteralSampler"; |
| 778 | case 21: return "AtomicStorage"; |
| 779 | case 22: return "Int16"; |
| 780 | case 23: return "TessellationPointSize"; |
| 781 | case 24: return "GeometryPointSize"; |
| 782 | case 25: return "ImageGatherExtended"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 783 | case 26: return "Bad"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 784 | case 27: return "StorageImageMultisample"; |
| 785 | case 28: return "UniformBufferArrayDynamicIndexing"; |
| 786 | case 29: return "SampledImageArrayDynamicIndexing"; |
| 787 | case 30: return "StorageBufferArrayDynamicIndexing"; |
| 788 | case 31: return "StorageImageArrayDynamicIndexing"; |
| 789 | case 32: return "ClipDistance"; |
| 790 | case 33: return "CullDistance"; |
| 791 | case 34: return "ImageCubeArray"; |
| 792 | case 35: return "SampleRateShading"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 793 | case 36: return "ImageRect"; |
| 794 | case 37: return "SampledRect"; |
| 795 | case 38: return "GenericPointer"; |
| 796 | case 39: return "Int8"; |
| 797 | case 40: return "InputAttachment"; |
| 798 | case 41: return "SparseResidency"; |
| 799 | case 42: return "MinLod"; |
| 800 | case 43: return "Sampled1D"; |
| 801 | case 44: return "Image1D"; |
| 802 | case 45: return "SampledCubeArray"; |
| 803 | case 46: return "SampledBuffer"; |
| 804 | case 47: return "ImageBuffer"; |
| 805 | case 48: return "ImageMSArray"; |
| 806 | case 49: return "StorageImageExtendedFormats"; |
| 807 | case 50: return "ImageQuery"; |
| 808 | case 51: return "DerivativeControl"; |
| 809 | case 52: return "InterpolationFunction"; |
| 810 | case 53: return "TransformFeedback"; |
| 811 | case 54: return "GeometryStreams"; |
| 812 | case 55: return "StorageImageReadWithoutFormat"; |
| 813 | case 56: return "StorageImageWriteWithoutFormat"; |
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 814 | case 57: return "MultiViewport"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 815 | |
| 816 | case CapabilityCeiling: |
| 817 | default: return "Bad"; |
Rex Xu | 5159664 | 2016-09-21 18:56:12 +0800 | [diff] [blame] | 818 | |
| 819 | case 4423: return "SubgroupBallotKHR"; |
Rex Xu | f3b2747 | 2016-07-22 18:15:31 +0800 | [diff] [blame] | 820 | case 4427: return "DrawParameters"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 821 | } |
| 822 | } |
| 823 | |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 824 | const char* OpcodeString(int op) |
| 825 | { |
| 826 | switch (op) { |
| 827 | case 0: return "OpNop"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 828 | case 1: return "OpUndef"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 829 | case 2: return "OpSourceContinued"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 830 | case 3: return "OpSource"; |
| 831 | case 4: return "OpSourceExtension"; |
| 832 | case 5: return "OpName"; |
| 833 | case 6: return "OpMemberName"; |
| 834 | case 7: return "OpString"; |
| 835 | case 8: return "OpLine"; |
| 836 | case 9: return "Bad"; |
| 837 | case 10: return "OpExtension"; |
| 838 | case 11: return "OpExtInstImport"; |
| 839 | case 12: return "OpExtInst"; |
| 840 | case 13: return "Bad"; |
| 841 | case 14: return "OpMemoryModel"; |
| 842 | case 15: return "OpEntryPoint"; |
| 843 | case 16: return "OpExecutionMode"; |
| 844 | case 17: return "OpCapability"; |
| 845 | case 18: return "Bad"; |
| 846 | case 19: return "OpTypeVoid"; |
| 847 | case 20: return "OpTypeBool"; |
| 848 | case 21: return "OpTypeInt"; |
| 849 | case 22: return "OpTypeFloat"; |
| 850 | case 23: return "OpTypeVector"; |
| 851 | case 24: return "OpTypeMatrix"; |
| 852 | case 25: return "OpTypeImage"; |
| 853 | case 26: return "OpTypeSampler"; |
| 854 | case 27: return "OpTypeSampledImage"; |
| 855 | case 28: return "OpTypeArray"; |
| 856 | case 29: return "OpTypeRuntimeArray"; |
| 857 | case 30: return "OpTypeStruct"; |
| 858 | case 31: return "OpTypeOpaque"; |
| 859 | case 32: return "OpTypePointer"; |
| 860 | case 33: return "OpTypeFunction"; |
| 861 | case 34: return "OpTypeEvent"; |
| 862 | case 35: return "OpTypeDeviceEvent"; |
| 863 | case 36: return "OpTypeReserveId"; |
| 864 | case 37: return "OpTypeQueue"; |
| 865 | case 38: return "OpTypePipe"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 866 | case 39: return "OpTypeForwardPointer"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 867 | case 40: return "Bad"; |
| 868 | case 41: return "OpConstantTrue"; |
| 869 | case 42: return "OpConstantFalse"; |
| 870 | case 43: return "OpConstant"; |
| 871 | case 44: return "OpConstantComposite"; |
| 872 | case 45: return "OpConstantSampler"; |
| 873 | case 46: return "OpConstantNull"; |
| 874 | case 47: return "Bad"; |
| 875 | case 48: return "OpSpecConstantTrue"; |
| 876 | case 49: return "OpSpecConstantFalse"; |
| 877 | case 50: return "OpSpecConstant"; |
| 878 | case 51: return "OpSpecConstantComposite"; |
| 879 | case 52: return "OpSpecConstantOp"; |
| 880 | case 53: return "Bad"; |
| 881 | case 54: return "OpFunction"; |
| 882 | case 55: return "OpFunctionParameter"; |
| 883 | case 56: return "OpFunctionEnd"; |
| 884 | case 57: return "OpFunctionCall"; |
| 885 | case 58: return "Bad"; |
| 886 | case 59: return "OpVariable"; |
| 887 | case 60: return "OpImageTexelPointer"; |
| 888 | case 61: return "OpLoad"; |
| 889 | case 62: return "OpStore"; |
| 890 | case 63: return "OpCopyMemory"; |
| 891 | case 64: return "OpCopyMemorySized"; |
| 892 | case 65: return "OpAccessChain"; |
| 893 | case 66: return "OpInBoundsAccessChain"; |
| 894 | case 67: return "OpPtrAccessChain"; |
| 895 | case 68: return "OpArrayLength"; |
| 896 | case 69: return "OpGenericPtrMemSemantics"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 897 | case 70: return "OpInBoundsPtrAccessChain"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 898 | case 71: return "OpDecorate"; |
| 899 | case 72: return "OpMemberDecorate"; |
| 900 | case 73: return "OpDecorationGroup"; |
| 901 | case 74: return "OpGroupDecorate"; |
| 902 | case 75: return "OpGroupMemberDecorate"; |
| 903 | case 76: return "Bad"; |
| 904 | case 77: return "OpVectorExtractDynamic"; |
| 905 | case 78: return "OpVectorInsertDynamic"; |
| 906 | case 79: return "OpVectorShuffle"; |
| 907 | case 80: return "OpCompositeConstruct"; |
| 908 | case 81: return "OpCompositeExtract"; |
| 909 | case 82: return "OpCompositeInsert"; |
| 910 | case 83: return "OpCopyObject"; |
| 911 | case 84: return "OpTranspose"; |
| 912 | case 85: return "Bad"; |
| 913 | case 86: return "OpSampledImage"; |
| 914 | case 87: return "OpImageSampleImplicitLod"; |
| 915 | case 88: return "OpImageSampleExplicitLod"; |
| 916 | case 89: return "OpImageSampleDrefImplicitLod"; |
| 917 | case 90: return "OpImageSampleDrefExplicitLod"; |
| 918 | case 91: return "OpImageSampleProjImplicitLod"; |
| 919 | case 92: return "OpImageSampleProjExplicitLod"; |
| 920 | case 93: return "OpImageSampleProjDrefImplicitLod"; |
| 921 | case 94: return "OpImageSampleProjDrefExplicitLod"; |
| 922 | case 95: return "OpImageFetch"; |
| 923 | case 96: return "OpImageGather"; |
| 924 | case 97: return "OpImageDrefGather"; |
| 925 | case 98: return "OpImageRead"; |
| 926 | case 99: return "OpImageWrite"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 927 | case 100: return "OpImage"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 928 | case 101: return "OpImageQueryFormat"; |
| 929 | case 102: return "OpImageQueryOrder"; |
| 930 | case 103: return "OpImageQuerySizeLod"; |
| 931 | case 104: return "OpImageQuerySize"; |
| 932 | case 105: return "OpImageQueryLod"; |
| 933 | case 106: return "OpImageQueryLevels"; |
| 934 | case 107: return "OpImageQuerySamples"; |
| 935 | case 108: return "Bad"; |
| 936 | case 109: return "OpConvertFToU"; |
| 937 | case 110: return "OpConvertFToS"; |
| 938 | case 111: return "OpConvertSToF"; |
| 939 | case 112: return "OpConvertUToF"; |
| 940 | case 113: return "OpUConvert"; |
| 941 | case 114: return "OpSConvert"; |
| 942 | case 115: return "OpFConvert"; |
| 943 | case 116: return "OpQuantizeToF16"; |
| 944 | case 117: return "OpConvertPtrToU"; |
| 945 | case 118: return "OpSatConvertSToU"; |
| 946 | case 119: return "OpSatConvertUToS"; |
| 947 | case 120: return "OpConvertUToPtr"; |
| 948 | case 121: return "OpPtrCastToGeneric"; |
| 949 | case 122: return "OpGenericCastToPtr"; |
| 950 | case 123: return "OpGenericCastToPtrExplicit"; |
| 951 | case 124: return "OpBitcast"; |
| 952 | case 125: return "Bad"; |
| 953 | case 126: return "OpSNegate"; |
| 954 | case 127: return "OpFNegate"; |
| 955 | case 128: return "OpIAdd"; |
| 956 | case 129: return "OpFAdd"; |
| 957 | case 130: return "OpISub"; |
| 958 | case 131: return "OpFSub"; |
| 959 | case 132: return "OpIMul"; |
| 960 | case 133: return "OpFMul"; |
| 961 | case 134: return "OpUDiv"; |
| 962 | case 135: return "OpSDiv"; |
| 963 | case 136: return "OpFDiv"; |
| 964 | case 137: return "OpUMod"; |
| 965 | case 138: return "OpSRem"; |
| 966 | case 139: return "OpSMod"; |
| 967 | case 140: return "OpFRem"; |
| 968 | case 141: return "OpFMod"; |
| 969 | case 142: return "OpVectorTimesScalar"; |
| 970 | case 143: return "OpMatrixTimesScalar"; |
| 971 | case 144: return "OpVectorTimesMatrix"; |
| 972 | case 145: return "OpMatrixTimesVector"; |
| 973 | case 146: return "OpMatrixTimesMatrix"; |
| 974 | case 147: return "OpOuterProduct"; |
| 975 | case 148: return "OpDot"; |
| 976 | case 149: return "OpIAddCarry"; |
| 977 | case 150: return "OpISubBorrow"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 978 | case 151: return "OpUMulExtended"; |
| 979 | case 152: return "OpSMulExtended"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 980 | case 153: return "Bad"; |
| 981 | case 154: return "OpAny"; |
| 982 | case 155: return "OpAll"; |
| 983 | case 156: return "OpIsNan"; |
| 984 | case 157: return "OpIsInf"; |
| 985 | case 158: return "OpIsFinite"; |
| 986 | case 159: return "OpIsNormal"; |
| 987 | case 160: return "OpSignBitSet"; |
| 988 | case 161: return "OpLessOrGreater"; |
| 989 | case 162: return "OpOrdered"; |
| 990 | case 163: return "OpUnordered"; |
| 991 | case 164: return "OpLogicalEqual"; |
| 992 | case 165: return "OpLogicalNotEqual"; |
| 993 | case 166: return "OpLogicalOr"; |
| 994 | case 167: return "OpLogicalAnd"; |
| 995 | case 168: return "OpLogicalNot"; |
| 996 | case 169: return "OpSelect"; |
| 997 | case 170: return "OpIEqual"; |
| 998 | case 171: return "OpINotEqual"; |
| 999 | case 172: return "OpUGreaterThan"; |
| 1000 | case 173: return "OpSGreaterThan"; |
| 1001 | case 174: return "OpUGreaterThanEqual"; |
| 1002 | case 175: return "OpSGreaterThanEqual"; |
| 1003 | case 176: return "OpULessThan"; |
| 1004 | case 177: return "OpSLessThan"; |
| 1005 | case 178: return "OpULessThanEqual"; |
| 1006 | case 179: return "OpSLessThanEqual"; |
| 1007 | case 180: return "OpFOrdEqual"; |
| 1008 | case 181: return "OpFUnordEqual"; |
| 1009 | case 182: return "OpFOrdNotEqual"; |
| 1010 | case 183: return "OpFUnordNotEqual"; |
| 1011 | case 184: return "OpFOrdLessThan"; |
| 1012 | case 185: return "OpFUnordLessThan"; |
| 1013 | case 186: return "OpFOrdGreaterThan"; |
| 1014 | case 187: return "OpFUnordGreaterThan"; |
| 1015 | case 188: return "OpFOrdLessThanEqual"; |
| 1016 | case 189: return "OpFUnordLessThanEqual"; |
| 1017 | case 190: return "OpFOrdGreaterThanEqual"; |
| 1018 | case 191: return "OpFUnordGreaterThanEqual"; |
| 1019 | case 192: return "Bad"; |
| 1020 | case 193: return "Bad"; |
| 1021 | case 194: return "OpShiftRightLogical"; |
| 1022 | case 195: return "OpShiftRightArithmetic"; |
| 1023 | case 196: return "OpShiftLeftLogical"; |
| 1024 | case 197: return "OpBitwiseOr"; |
| 1025 | case 198: return "OpBitwiseXor"; |
| 1026 | case 199: return "OpBitwiseAnd"; |
| 1027 | case 200: return "OpNot"; |
| 1028 | case 201: return "OpBitFieldInsert"; |
| 1029 | case 202: return "OpBitFieldSExtract"; |
| 1030 | case 203: return "OpBitFieldUExtract"; |
| 1031 | case 204: return "OpBitReverse"; |
| 1032 | case 205: return "OpBitCount"; |
| 1033 | case 206: return "Bad"; |
| 1034 | case 207: return "OpDPdx"; |
| 1035 | case 208: return "OpDPdy"; |
| 1036 | case 209: return "OpFwidth"; |
| 1037 | case 210: return "OpDPdxFine"; |
| 1038 | case 211: return "OpDPdyFine"; |
| 1039 | case 212: return "OpFwidthFine"; |
| 1040 | case 213: return "OpDPdxCoarse"; |
| 1041 | case 214: return "OpDPdyCoarse"; |
| 1042 | case 215: return "OpFwidthCoarse"; |
| 1043 | case 216: return "Bad"; |
| 1044 | case 217: return "Bad"; |
| 1045 | case 218: return "OpEmitVertex"; |
| 1046 | case 219: return "OpEndPrimitive"; |
| 1047 | case 220: return "OpEmitStreamVertex"; |
| 1048 | case 221: return "OpEndStreamPrimitive"; |
| 1049 | case 222: return "Bad"; |
| 1050 | case 223: return "Bad"; |
| 1051 | case 224: return "OpControlBarrier"; |
| 1052 | case 225: return "OpMemoryBarrier"; |
| 1053 | case 226: return "Bad"; |
| 1054 | case 227: return "OpAtomicLoad"; |
| 1055 | case 228: return "OpAtomicStore"; |
| 1056 | case 229: return "OpAtomicExchange"; |
| 1057 | case 230: return "OpAtomicCompareExchange"; |
| 1058 | case 231: return "OpAtomicCompareExchangeWeak"; |
| 1059 | case 232: return "OpAtomicIIncrement"; |
| 1060 | case 233: return "OpAtomicIDecrement"; |
| 1061 | case 234: return "OpAtomicIAdd"; |
| 1062 | case 235: return "OpAtomicISub"; |
| 1063 | case 236: return "OpAtomicSMin"; |
| 1064 | case 237: return "OpAtomicUMin"; |
| 1065 | case 238: return "OpAtomicSMax"; |
| 1066 | case 239: return "OpAtomicUMax"; |
| 1067 | case 240: return "OpAtomicAnd"; |
| 1068 | case 241: return "OpAtomicOr"; |
| 1069 | case 242: return "OpAtomicXor"; |
| 1070 | case 243: return "Bad"; |
| 1071 | case 244: return "Bad"; |
| 1072 | case 245: return "OpPhi"; |
| 1073 | case 246: return "OpLoopMerge"; |
| 1074 | case 247: return "OpSelectionMerge"; |
| 1075 | case 248: return "OpLabel"; |
| 1076 | case 249: return "OpBranch"; |
| 1077 | case 250: return "OpBranchConditional"; |
| 1078 | case 251: return "OpSwitch"; |
| 1079 | case 252: return "OpKill"; |
| 1080 | case 253: return "OpReturn"; |
| 1081 | case 254: return "OpReturnValue"; |
| 1082 | case 255: return "OpUnreachable"; |
| 1083 | case 256: return "OpLifetimeStart"; |
| 1084 | case 257: return "OpLifetimeStop"; |
| 1085 | case 258: return "Bad"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1086 | case 259: return "OpGroupAsyncCopy"; |
| 1087 | case 260: return "OpGroupWaitEvents"; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1088 | case 261: return "OpGroupAll"; |
| 1089 | case 262: return "OpGroupAny"; |
| 1090 | case 263: return "OpGroupBroadcast"; |
| 1091 | case 264: return "OpGroupIAdd"; |
| 1092 | case 265: return "OpGroupFAdd"; |
| 1093 | case 266: return "OpGroupFMin"; |
| 1094 | case 267: return "OpGroupUMin"; |
| 1095 | case 268: return "OpGroupSMin"; |
| 1096 | case 269: return "OpGroupFMax"; |
| 1097 | case 270: return "OpGroupUMax"; |
| 1098 | case 271: return "OpGroupSMax"; |
| 1099 | case 272: return "Bad"; |
| 1100 | case 273: return "Bad"; |
| 1101 | case 274: return "OpReadPipe"; |
| 1102 | case 275: return "OpWritePipe"; |
| 1103 | case 276: return "OpReservedReadPipe"; |
| 1104 | case 277: return "OpReservedWritePipe"; |
| 1105 | case 278: return "OpReserveReadPipePackets"; |
| 1106 | case 279: return "OpReserveWritePipePackets"; |
| 1107 | case 280: return "OpCommitReadPipe"; |
| 1108 | case 281: return "OpCommitWritePipe"; |
| 1109 | case 282: return "OpIsValidReserveId"; |
| 1110 | case 283: return "OpGetNumPipePackets"; |
| 1111 | case 284: return "OpGetMaxPipePackets"; |
| 1112 | case 285: return "OpGroupReserveReadPipePackets"; |
| 1113 | case 286: return "OpGroupReserveWritePipePackets"; |
| 1114 | case 287: return "OpGroupCommitReadPipe"; |
| 1115 | case 288: return "OpGroupCommitWritePipe"; |
| 1116 | case 289: return "Bad"; |
| 1117 | case 290: return "Bad"; |
| 1118 | case 291: return "OpEnqueueMarker"; |
| 1119 | case 292: return "OpEnqueueKernel"; |
| 1120 | case 293: return "OpGetKernelNDrangeSubGroupCount"; |
| 1121 | case 294: return "OpGetKernelNDrangeMaxSubGroupSize"; |
| 1122 | case 295: return "OpGetKernelWorkGroupSize"; |
| 1123 | case 296: return "OpGetKernelPreferredWorkGroupSizeMultiple"; |
| 1124 | case 297: return "OpRetainEvent"; |
| 1125 | case 298: return "OpReleaseEvent"; |
| 1126 | case 299: return "OpCreateUserEvent"; |
| 1127 | case 300: return "OpIsValidEvent"; |
| 1128 | case 301: return "OpSetUserEventStatus"; |
| 1129 | case 302: return "OpCaptureEventProfilingInfo"; |
| 1130 | case 303: return "OpGetDefaultQueue"; |
| 1131 | case 304: return "OpBuildNDRange"; |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1132 | case 305: return "OpImageSparseSampleImplicitLod"; |
| 1133 | case 306: return "OpImageSparseSampleExplicitLod"; |
| 1134 | case 307: return "OpImageSparseSampleDrefImplicitLod"; |
| 1135 | case 308: return "OpImageSparseSampleDrefExplicitLod"; |
| 1136 | case 309: return "OpImageSparseSampleProjImplicitLod"; |
| 1137 | case 310: return "OpImageSparseSampleProjExplicitLod"; |
| 1138 | case 311: return "OpImageSparseSampleProjDrefImplicitLod"; |
| 1139 | case 312: return "OpImageSparseSampleProjDrefExplicitLod"; |
| 1140 | case 313: return "OpImageSparseFetch"; |
| 1141 | case 314: return "OpImageSparseGather"; |
| 1142 | case 315: return "OpImageSparseDrefGather"; |
| 1143 | case 316: return "OpImageSparseTexelsResident"; |
| 1144 | case 317: return "OpNoLine"; |
| 1145 | case 318: return "OpAtomicFlagTestAndSet"; |
| 1146 | case 319: return "OpAtomicFlagClear"; |
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 1147 | case 320: return "OpImageSparseRead"; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1148 | |
| 1149 | case OpcodeCeiling: |
| 1150 | default: |
| 1151 | return "Bad"; |
Rex Xu | 9d93a23 | 2016-05-05 12:30:44 +0800 | [diff] [blame] | 1152 | |
Rex Xu | 5159664 | 2016-09-21 18:56:12 +0800 | [diff] [blame] | 1153 | case 4421: return "OpSubgroupBallotKHR"; |
| 1154 | case 4422: return "OpSubgroupFirstInvocationKHR"; |
chaoc | f200da8 | 2016-12-20 12:44:35 -0800 | [diff] [blame^] | 1155 | case 4432: return "OpSubgroupReadInvocationKHR"; |
Rex Xu | 5159664 | 2016-09-21 18:56:12 +0800 | [diff] [blame] | 1156 | |
Rex Xu | 9d93a23 | 2016-05-05 12:30:44 +0800 | [diff] [blame] | 1157 | #ifdef AMD_EXTENSIONS |
| 1158 | case 5000: return "OpGroupIAddNonUniformAMD"; |
| 1159 | case 5001: return "OpGroupFAddNonUniformAMD"; |
| 1160 | case 5002: return "OpGroupFMinNonUniformAMD"; |
| 1161 | case 5003: return "OpGroupUMinNonUniformAMD"; |
| 1162 | case 5004: return "OpGroupSMinNonUniformAMD"; |
| 1163 | case 5005: return "OpGroupFMaxNonUniformAMD"; |
| 1164 | case 5006: return "OpGroupUMaxNonUniformAMD"; |
| 1165 | case 5007: return "OpGroupSMaxNonUniformAMD"; |
| 1166 | #endif |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1167 | } |
| 1168 | } |
| 1169 | |
| 1170 | // The set of objects that hold all the instruction/operand |
| 1171 | // parameterization information. |
Rex Xu | 9d93a23 | 2016-05-05 12:30:44 +0800 | [diff] [blame] | 1172 | InstructionParameters InstructionDesc[OpCodeMask + 1]; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1173 | OperandParameters ExecutionModeOperands[ExecutionModeCeiling]; |
| 1174 | OperandParameters DecorationOperands[DecorationCeiling]; |
| 1175 | |
| 1176 | EnumDefinition OperandClassParams[OperandCount]; |
| 1177 | EnumParameters ExecutionModelParams[ExecutionModelCeiling]; |
| 1178 | EnumParameters AddressingParams[AddressingModelCeiling]; |
| 1179 | EnumParameters MemoryParams[MemoryModelCeiling]; |
| 1180 | EnumParameters ExecutionModeParams[ExecutionModeCeiling]; |
| 1181 | EnumParameters StorageParams[StorageClassCeiling]; |
| 1182 | EnumParameters SamplerAddressingModeParams[SamplerAddressingModeCeiling]; |
| 1183 | EnumParameters SamplerFilterModeParams[SamplerFilterModeCeiling]; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1184 | EnumParameters ImageFormatParams[ImageFormatCeiling]; |
| 1185 | EnumParameters ImageChannelOrderParams[ImageChannelOrderCeiling]; |
| 1186 | EnumParameters ImageChannelDataTypeParams[ImageChannelDataTypeCeiling]; |
| 1187 | EnumParameters ImageOperandsParams[ImageOperandsCeiling]; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1188 | EnumParameters FPFastMathParams[FPFastMathCeiling]; |
| 1189 | EnumParameters FPRoundingModeParams[FPRoundingModeCeiling]; |
| 1190 | EnumParameters LinkageTypeParams[LinkageTypeCeiling]; |
| 1191 | EnumParameters DecorationParams[DecorationCeiling]; |
| 1192 | EnumParameters BuiltInParams[BuiltInCeiling]; |
| 1193 | EnumParameters DimensionalityParams[DimensionCeiling]; |
| 1194 | EnumParameters FuncParamAttrParams[FuncParamAttrCeiling]; |
| 1195 | EnumParameters AccessQualifierParams[AccessQualifierCeiling]; |
| 1196 | EnumParameters GroupOperationParams[GroupOperationCeiling]; |
| 1197 | EnumParameters LoopControlParams[FunctionControlCeiling]; |
| 1198 | EnumParameters SelectionControlParams[SelectControlCeiling]; |
| 1199 | EnumParameters FunctionControlParams[FunctionControlCeiling]; |
| 1200 | EnumParameters MemorySemanticsParams[MemorySemanticsCeiling]; |
| 1201 | EnumParameters MemoryAccessParams[MemoryAccessCeiling]; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1202 | EnumParameters ScopeParams[ScopeCeiling]; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1203 | EnumParameters KernelEnqueueFlagsParams[KernelEnqueueFlagsCeiling]; |
| 1204 | EnumParameters KernelProfilingInfoParams[KernelProfilingInfoCeiling]; |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1205 | EnumParameters CapabilityParams[CapabilityCeiling]; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1206 | |
| 1207 | // Set up all the parameterizing descriptions of the opcodes, operands, etc. |
| 1208 | void Parameterize() |
| 1209 | { |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1210 | // only do this once. |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1211 | static bool initialized = false; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1212 | if (initialized) |
| 1213 | return; |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1214 | initialized = true; |
| 1215 | |
| 1216 | // Exceptions to having a result <id> and a resulting type <id>. |
| 1217 | // (Everything is initialized to have both). |
| 1218 | |
| 1219 | InstructionDesc[OpNop].setResultAndType(false, false); |
| 1220 | InstructionDesc[OpSource].setResultAndType(false, false); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1221 | InstructionDesc[OpSourceContinued].setResultAndType(false, false); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1222 | InstructionDesc[OpSourceExtension].setResultAndType(false, false); |
| 1223 | InstructionDesc[OpExtension].setResultAndType(false, false); |
| 1224 | InstructionDesc[OpExtInstImport].setResultAndType(true, false); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1225 | InstructionDesc[OpCapability].setResultAndType(false, false); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1226 | InstructionDesc[OpMemoryModel].setResultAndType(false, false); |
| 1227 | InstructionDesc[OpEntryPoint].setResultAndType(false, false); |
| 1228 | InstructionDesc[OpExecutionMode].setResultAndType(false, false); |
| 1229 | InstructionDesc[OpTypeVoid].setResultAndType(true, false); |
| 1230 | InstructionDesc[OpTypeBool].setResultAndType(true, false); |
| 1231 | InstructionDesc[OpTypeInt].setResultAndType(true, false); |
| 1232 | InstructionDesc[OpTypeFloat].setResultAndType(true, false); |
| 1233 | InstructionDesc[OpTypeVector].setResultAndType(true, false); |
| 1234 | InstructionDesc[OpTypeMatrix].setResultAndType(true, false); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1235 | InstructionDesc[OpTypeImage].setResultAndType(true, false); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1236 | InstructionDesc[OpTypeSampler].setResultAndType(true, false); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1237 | InstructionDesc[OpTypeSampledImage].setResultAndType(true, false); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1238 | InstructionDesc[OpTypeArray].setResultAndType(true, false); |
| 1239 | InstructionDesc[OpTypeRuntimeArray].setResultAndType(true, false); |
| 1240 | InstructionDesc[OpTypeStruct].setResultAndType(true, false); |
| 1241 | InstructionDesc[OpTypeOpaque].setResultAndType(true, false); |
| 1242 | InstructionDesc[OpTypePointer].setResultAndType(true, false); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1243 | InstructionDesc[OpTypeForwardPointer].setResultAndType(false, false); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1244 | InstructionDesc[OpTypeFunction].setResultAndType(true, false); |
| 1245 | InstructionDesc[OpTypeEvent].setResultAndType(true, false); |
| 1246 | InstructionDesc[OpTypeDeviceEvent].setResultAndType(true, false); |
| 1247 | InstructionDesc[OpTypeReserveId].setResultAndType(true, false); |
| 1248 | InstructionDesc[OpTypeQueue].setResultAndType(true, false); |
| 1249 | InstructionDesc[OpTypePipe].setResultAndType(true, false); |
| 1250 | InstructionDesc[OpFunctionEnd].setResultAndType(false, false); |
| 1251 | InstructionDesc[OpStore].setResultAndType(false, false); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1252 | InstructionDesc[OpImageWrite].setResultAndType(false, false); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1253 | InstructionDesc[OpDecorationGroup].setResultAndType(true, false); |
| 1254 | InstructionDesc[OpDecorate].setResultAndType(false, false); |
| 1255 | InstructionDesc[OpMemberDecorate].setResultAndType(false, false); |
| 1256 | InstructionDesc[OpGroupDecorate].setResultAndType(false, false); |
| 1257 | InstructionDesc[OpGroupMemberDecorate].setResultAndType(false, false); |
| 1258 | InstructionDesc[OpName].setResultAndType(false, false); |
| 1259 | InstructionDesc[OpMemberName].setResultAndType(false, false); |
| 1260 | InstructionDesc[OpString].setResultAndType(true, false); |
| 1261 | InstructionDesc[OpLine].setResultAndType(false, false); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1262 | InstructionDesc[OpNoLine].setResultAndType(false, false); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1263 | InstructionDesc[OpCopyMemory].setResultAndType(false, false); |
| 1264 | InstructionDesc[OpCopyMemorySized].setResultAndType(false, false); |
| 1265 | InstructionDesc[OpEmitVertex].setResultAndType(false, false); |
| 1266 | InstructionDesc[OpEndPrimitive].setResultAndType(false, false); |
| 1267 | InstructionDesc[OpEmitStreamVertex].setResultAndType(false, false); |
| 1268 | InstructionDesc[OpEndStreamPrimitive].setResultAndType(false, false); |
| 1269 | InstructionDesc[OpControlBarrier].setResultAndType(false, false); |
| 1270 | InstructionDesc[OpMemoryBarrier].setResultAndType(false, false); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1271 | InstructionDesc[OpAtomicStore].setResultAndType(false, false); |
| 1272 | InstructionDesc[OpLoopMerge].setResultAndType(false, false); |
| 1273 | InstructionDesc[OpSelectionMerge].setResultAndType(false, false); |
| 1274 | InstructionDesc[OpLabel].setResultAndType(true, false); |
| 1275 | InstructionDesc[OpBranch].setResultAndType(false, false); |
| 1276 | InstructionDesc[OpBranchConditional].setResultAndType(false, false); |
| 1277 | InstructionDesc[OpSwitch].setResultAndType(false, false); |
| 1278 | InstructionDesc[OpKill].setResultAndType(false, false); |
| 1279 | InstructionDesc[OpReturn].setResultAndType(false, false); |
| 1280 | InstructionDesc[OpReturnValue].setResultAndType(false, false); |
| 1281 | InstructionDesc[OpUnreachable].setResultAndType(false, false); |
| 1282 | InstructionDesc[OpLifetimeStart].setResultAndType(false, false); |
| 1283 | InstructionDesc[OpLifetimeStop].setResultAndType(false, false); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1284 | InstructionDesc[OpCommitReadPipe].setResultAndType(false, false); |
| 1285 | InstructionDesc[OpCommitWritePipe].setResultAndType(false, false); |
| 1286 | InstructionDesc[OpGroupCommitWritePipe].setResultAndType(false, false); |
| 1287 | InstructionDesc[OpGroupCommitReadPipe].setResultAndType(false, false); |
| 1288 | InstructionDesc[OpCaptureEventProfilingInfo].setResultAndType(false, false); |
| 1289 | InstructionDesc[OpSetUserEventStatus].setResultAndType(false, false); |
| 1290 | InstructionDesc[OpRetainEvent].setResultAndType(false, false); |
| 1291 | InstructionDesc[OpReleaseEvent].setResultAndType(false, false); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1292 | InstructionDesc[OpGroupWaitEvents].setResultAndType(false, false); |
| 1293 | InstructionDesc[OpAtomicFlagClear].setResultAndType(false, false); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1294 | |
| 1295 | // Specific additional context-dependent operands |
| 1296 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1297 | ExecutionModeOperands[ExecutionModeInvocations].push(OperandLiteralNumber, "'Number of <<Invocation,invocations>>'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1298 | |
| 1299 | ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'x size'"); |
| 1300 | ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'y size'"); |
| 1301 | ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'z size'"); |
| 1302 | |
| 1303 | ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'x size'"); |
| 1304 | ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'y size'"); |
| 1305 | ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'z size'"); |
| 1306 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1307 | ExecutionModeOperands[ExecutionModeOutputVertices].push(OperandLiteralNumber, "'Vertex count'"); |
| 1308 | ExecutionModeOperands[ExecutionModeVecTypeHint].push(OperandLiteralNumber, "'Vector type'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1309 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1310 | DecorationOperands[DecorationStream].push(OperandLiteralNumber, "'Stream Number'"); |
| 1311 | DecorationOperands[DecorationLocation].push(OperandLiteralNumber, "'Location'"); |
| 1312 | DecorationOperands[DecorationComponent].push(OperandLiteralNumber, "'Component'"); |
| 1313 | DecorationOperands[DecorationIndex].push(OperandLiteralNumber, "'Index'"); |
| 1314 | DecorationOperands[DecorationBinding].push(OperandLiteralNumber, "'Binding Point'"); |
| 1315 | DecorationOperands[DecorationDescriptorSet].push(OperandLiteralNumber, "'Descriptor Set'"); |
| 1316 | DecorationOperands[DecorationOffset].push(OperandLiteralNumber, "'Byte Offset'"); |
| 1317 | DecorationOperands[DecorationXfbBuffer].push(OperandLiteralNumber, "'XFB Buffer Number'"); |
| 1318 | DecorationOperands[DecorationXfbStride].push(OperandLiteralNumber, "'XFB Stride'"); |
| 1319 | DecorationOperands[DecorationArrayStride].push(OperandLiteralNumber, "'Array Stride'"); |
| 1320 | DecorationOperands[DecorationMatrixStride].push(OperandLiteralNumber, "'Matrix Stride'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1321 | DecorationOperands[DecorationBuiltIn].push(OperandLiteralNumber, "See <<BuiltIn,*BuiltIn*>>"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1322 | DecorationOperands[DecorationFPRoundingMode].push(OperandFPRoundingMode, "'Floating-Point Rounding Mode'"); |
| 1323 | DecorationOperands[DecorationFPFastMathMode].push(OperandFPFastMath, "'Fast-Math Mode'"); |
| 1324 | DecorationOperands[DecorationLinkageAttributes].push(OperandLiteralString, "'Name'"); |
| 1325 | DecorationOperands[DecorationLinkageAttributes].push(OperandLinkageType, "'Linkage Type'"); |
| 1326 | DecorationOperands[DecorationFuncParamAttr].push(OperandFuncParamAttr, "'Function Parameter Attribute'"); |
| 1327 | DecorationOperands[DecorationSpecId].push(OperandLiteralNumber, "'Specialization Constant ID'"); |
| 1328 | DecorationOperands[DecorationInputAttachmentIndex].push(OperandLiteralNumber, "'Attachment Index'"); |
| 1329 | DecorationOperands[DecorationAlignment].push(OperandLiteralNumber, "'Alignment'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1330 | |
| 1331 | OperandClassParams[OperandSource].set(SourceLanguageCeiling, SourceString, 0); |
| 1332 | OperandClassParams[OperandExecutionModel].set(ExecutionModelCeiling, ExecutionModelString, ExecutionModelParams); |
| 1333 | OperandClassParams[OperandAddressing].set(AddressingModelCeiling, AddressingString, AddressingParams); |
| 1334 | OperandClassParams[OperandMemory].set(MemoryModelCeiling, MemoryString, MemoryParams); |
| 1335 | OperandClassParams[OperandExecutionMode].set(ExecutionModeCeiling, ExecutionModeString, ExecutionModeParams); |
| 1336 | OperandClassParams[OperandExecutionMode].setOperands(ExecutionModeOperands); |
| 1337 | OperandClassParams[OperandStorage].set(StorageClassCeiling, StorageClassString, StorageParams); |
| 1338 | OperandClassParams[OperandDimensionality].set(DimensionCeiling, DimensionString, DimensionalityParams); |
| 1339 | OperandClassParams[OperandSamplerAddressingMode].set(SamplerAddressingModeCeiling, SamplerAddressingModeString, SamplerAddressingModeParams); |
| 1340 | OperandClassParams[OperandSamplerFilterMode].set(SamplerFilterModeCeiling, SamplerFilterModeString, SamplerFilterModeParams); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1341 | OperandClassParams[OperandSamplerImageFormat].set(ImageFormatCeiling, ImageFormatString, ImageFormatParams); |
| 1342 | OperandClassParams[OperandImageChannelOrder].set(ImageChannelOrderCeiling, ImageChannelOrderString, ImageChannelOrderParams); |
| 1343 | OperandClassParams[OperandImageChannelDataType].set(ImageChannelDataTypeCeiling, ImageChannelDataTypeString, ImageChannelDataTypeParams); |
| 1344 | OperandClassParams[OperandImageOperands].set(ImageOperandsCeiling, ImageOperandsString, ImageOperandsParams, true); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1345 | OperandClassParams[OperandFPFastMath].set(FPFastMathCeiling, FPFastMathString, FPFastMathParams, true); |
| 1346 | OperandClassParams[OperandFPRoundingMode].set(FPRoundingModeCeiling, FPRoundingModeString, FPRoundingModeParams); |
| 1347 | OperandClassParams[OperandLinkageType].set(LinkageTypeCeiling, LinkageTypeString, LinkageTypeParams); |
| 1348 | OperandClassParams[OperandFuncParamAttr].set(FuncParamAttrCeiling, FuncParamAttrString, FuncParamAttrParams); |
| 1349 | OperandClassParams[OperandAccessQualifier].set(AccessQualifierCeiling, AccessQualifierString, AccessQualifierParams); |
| 1350 | OperandClassParams[OperandDecoration].set(DecorationCeiling, DecorationString, DecorationParams); |
| 1351 | OperandClassParams[OperandDecoration].setOperands(DecorationOperands); |
| 1352 | OperandClassParams[OperandBuiltIn].set(BuiltInCeiling, BuiltInString, BuiltInParams); |
| 1353 | OperandClassParams[OperandSelect].set(SelectControlCeiling, SelectControlString, SelectionControlParams, true); |
| 1354 | OperandClassParams[OperandLoop].set(LoopControlCeiling, LoopControlString, LoopControlParams, true); |
| 1355 | OperandClassParams[OperandFunction].set(FunctionControlCeiling, FunctionControlString, FunctionControlParams, true); |
| 1356 | OperandClassParams[OperandMemorySemantics].set(MemorySemanticsCeiling, MemorySemanticsString, MemorySemanticsParams, true); |
| 1357 | OperandClassParams[OperandMemoryAccess].set(MemoryAccessCeiling, MemoryAccessString, MemoryAccessParams, true); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1358 | OperandClassParams[OperandScope].set(ScopeCeiling, ScopeString, ScopeParams); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1359 | OperandClassParams[OperandGroupOperation].set(GroupOperationCeiling, GroupOperationString, GroupOperationParams); |
| 1360 | OperandClassParams[OperandKernelEnqueueFlags].set(KernelEnqueueFlagsCeiling, KernelEnqueueFlagsString, KernelEnqueueFlagsParams); |
| 1361 | OperandClassParams[OperandKernelProfilingInfo].set(KernelProfilingInfoCeiling, KernelProfilingInfoString, KernelProfilingInfoParams, true); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1362 | OperandClassParams[OperandCapability].set(CapabilityCeiling, CapabilityString, CapabilityParams); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1363 | OperandClassParams[OperandOpcode].set(OpcodeCeiling, OpcodeString, 0); |
| 1364 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1365 | CapabilityParams[CapabilityShader].caps.push_back(CapabilityMatrix); |
| 1366 | CapabilityParams[CapabilityGeometry].caps.push_back(CapabilityShader); |
| 1367 | CapabilityParams[CapabilityTessellation].caps.push_back(CapabilityShader); |
| 1368 | CapabilityParams[CapabilityVector16].caps.push_back(CapabilityKernel); |
| 1369 | CapabilityParams[CapabilityFloat16Buffer].caps.push_back(CapabilityKernel); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1370 | CapabilityParams[CapabilityInt64Atomics].caps.push_back(CapabilityInt64); |
| 1371 | CapabilityParams[CapabilityImageBasic].caps.push_back(CapabilityKernel); |
| 1372 | CapabilityParams[CapabilityImageReadWrite].caps.push_back(CapabilityImageBasic); |
| 1373 | CapabilityParams[CapabilityImageMipmap].caps.push_back(CapabilityImageBasic); |
| 1374 | CapabilityParams[CapabilityPipes].caps.push_back(CapabilityKernel); |
| 1375 | CapabilityParams[CapabilityDeviceEnqueue].caps.push_back(CapabilityKernel); |
| 1376 | CapabilityParams[CapabilityLiteralSampler].caps.push_back(CapabilityKernel); |
| 1377 | CapabilityParams[CapabilityAtomicStorage].caps.push_back(CapabilityShader); |
| 1378 | CapabilityParams[CapabilitySampleRateShading].caps.push_back(CapabilityShader); |
| 1379 | CapabilityParams[CapabilityTessellationPointSize].caps.push_back(CapabilityTessellation); |
| 1380 | CapabilityParams[CapabilityGeometryPointSize].caps.push_back(CapabilityGeometry); |
| 1381 | CapabilityParams[CapabilityImageGatherExtended].caps.push_back(CapabilityShader); |
| 1382 | CapabilityParams[CapabilityStorageImageExtendedFormats].caps.push_back(CapabilityShader); |
| 1383 | CapabilityParams[CapabilityStorageImageMultisample].caps.push_back(CapabilityShader); |
| 1384 | CapabilityParams[CapabilityUniformBufferArrayDynamicIndexing].caps.push_back(CapabilityShader); |
| 1385 | CapabilityParams[CapabilitySampledImageArrayDynamicIndexing].caps.push_back(CapabilityShader); |
| 1386 | CapabilityParams[CapabilityStorageBufferArrayDynamicIndexing].caps.push_back(CapabilityShader); |
| 1387 | CapabilityParams[CapabilityStorageImageArrayDynamicIndexing].caps.push_back(CapabilityShader); |
| 1388 | CapabilityParams[CapabilityClipDistance].caps.push_back(CapabilityShader); |
| 1389 | CapabilityParams[CapabilityCullDistance].caps.push_back(CapabilityShader); |
| 1390 | CapabilityParams[CapabilityGenericPointer].caps.push_back(CapabilityAddresses); |
| 1391 | CapabilityParams[CapabilityInt8].caps.push_back(CapabilityKernel); |
| 1392 | CapabilityParams[CapabilityInputAttachment].caps.push_back(CapabilityShader); |
| 1393 | CapabilityParams[CapabilityMinLod].caps.push_back(CapabilityShader); |
| 1394 | CapabilityParams[CapabilitySparseResidency].caps.push_back(CapabilityShader); |
| 1395 | CapabilityParams[CapabilitySampled1D].caps.push_back(CapabilityShader); |
| 1396 | CapabilityParams[CapabilitySampledRect].caps.push_back(CapabilityShader); |
| 1397 | CapabilityParams[CapabilitySampledBuffer].caps.push_back(CapabilityShader); |
| 1398 | CapabilityParams[CapabilitySampledCubeArray].caps.push_back(CapabilityShader); |
| 1399 | CapabilityParams[CapabilityImageMSArray].caps.push_back(CapabilityShader); |
| 1400 | CapabilityParams[CapabilityImage1D].caps.push_back(CapabilitySampled1D); |
| 1401 | CapabilityParams[CapabilityImageRect].caps.push_back(CapabilitySampledRect); |
| 1402 | CapabilityParams[CapabilityImageBuffer].caps.push_back(CapabilitySampledBuffer); |
| 1403 | CapabilityParams[CapabilityImageCubeArray].caps.push_back(CapabilitySampledCubeArray); |
| 1404 | CapabilityParams[CapabilityImageQuery].caps.push_back(CapabilityShader); |
| 1405 | CapabilityParams[CapabilityDerivativeControl].caps.push_back(CapabilityShader); |
| 1406 | CapabilityParams[CapabilityInterpolationFunction].caps.push_back(CapabilityShader); |
| 1407 | CapabilityParams[CapabilityTransformFeedback].caps.push_back(CapabilityShader); |
| 1408 | CapabilityParams[CapabilityGeometryStreams].caps.push_back(CapabilityGeometry); |
| 1409 | CapabilityParams[CapabilityStorageImageReadWithoutFormat].caps.push_back(CapabilityShader); |
| 1410 | CapabilityParams[CapabilityStorageImageWriteWithoutFormat].caps.push_back(CapabilityShader); |
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 1411 | CapabilityParams[CapabilityMultiViewport].caps.push_back(CapabilityGeometry); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1412 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1413 | AddressingParams[AddressingModelPhysical32].caps.push_back(CapabilityAddresses); |
| 1414 | AddressingParams[AddressingModelPhysical64].caps.push_back(CapabilityAddresses); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1415 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1416 | MemoryParams[MemoryModelSimple].caps.push_back(CapabilityShader); |
| 1417 | MemoryParams[MemoryModelGLSL450].caps.push_back(CapabilityShader); |
| 1418 | MemoryParams[MemoryModelOpenCL].caps.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1419 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1420 | MemorySemanticsParams[MemorySemanticsUniformMemoryShift].caps.push_back(CapabilityShader); |
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 1421 | MemorySemanticsParams[MemorySemanticsAtomicCounterMemoryShift].caps.push_back(CapabilityAtomicStorage); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1422 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1423 | ExecutionModelParams[ExecutionModelVertex].caps.push_back(CapabilityShader); |
| 1424 | ExecutionModelParams[ExecutionModelTessellationControl].caps.push_back(CapabilityTessellation); |
| 1425 | ExecutionModelParams[ExecutionModelTessellationEvaluation].caps.push_back(CapabilityTessellation); |
| 1426 | ExecutionModelParams[ExecutionModelGeometry].caps.push_back(CapabilityGeometry); |
| 1427 | ExecutionModelParams[ExecutionModelFragment].caps.push_back(CapabilityShader); |
| 1428 | ExecutionModelParams[ExecutionModelGLCompute].caps.push_back(CapabilityShader); |
| 1429 | ExecutionModelParams[ExecutionModelKernel].caps.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1430 | |
| 1431 | // Storage capabilites |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1432 | StorageParams[StorageClassInput].caps.push_back(CapabilityShader); |
| 1433 | StorageParams[StorageClassUniform].caps.push_back(CapabilityShader); |
| 1434 | StorageParams[StorageClassOutput].caps.push_back(CapabilityShader); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1435 | StorageParams[StorageClassPrivate].caps.push_back(CapabilityShader); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1436 | StorageParams[StorageClassGeneric].caps.push_back(CapabilityKernel); |
| 1437 | StorageParams[StorageClassAtomicCounter].caps.push_back(CapabilityAtomicStorage); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1438 | StorageParams[StorageClassPushConstant].caps.push_back(CapabilityShader); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1439 | |
| 1440 | // Sampler Filter & Addressing mode capabilities |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1441 | SamplerAddressingModeParams[SamplerAddressingModeNone].caps.push_back(CapabilityKernel); |
| 1442 | SamplerAddressingModeParams[SamplerAddressingModeClampToEdge].caps.push_back(CapabilityKernel); |
| 1443 | SamplerAddressingModeParams[SamplerAddressingModeClamp].caps.push_back(CapabilityKernel); |
| 1444 | SamplerAddressingModeParams[SamplerAddressingModeRepeat].caps.push_back(CapabilityKernel); |
| 1445 | SamplerAddressingModeParams[SamplerAddressingModeRepeatMirrored].caps.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1446 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1447 | SamplerFilterModeParams[SamplerFilterModeNearest].caps.push_back(CapabilityKernel); |
| 1448 | SamplerFilterModeParams[SamplerFilterModeLinear].caps.push_back(CapabilityKernel); |
| 1449 | |
| 1450 | // image format capabilities |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1451 | |
| 1452 | // ES/Desktop float |
| 1453 | ImageFormatParams[ImageFormatRgba32f].caps.push_back(CapabilityShader); |
| 1454 | ImageFormatParams[ImageFormatRgba16f].caps.push_back(CapabilityShader); |
| 1455 | ImageFormatParams[ImageFormatR32f].caps.push_back(CapabilityShader); |
| 1456 | ImageFormatParams[ImageFormatRgba8].caps.push_back(CapabilityShader); |
| 1457 | ImageFormatParams[ImageFormatRgba8Snorm].caps.push_back(CapabilityShader); |
| 1458 | |
| 1459 | // Desktop float |
| 1460 | ImageFormatParams[ImageFormatRg32f].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1461 | ImageFormatParams[ImageFormatRg16f].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1462 | ImageFormatParams[ImageFormatR11fG11fB10f].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1463 | ImageFormatParams[ImageFormatR16f].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1464 | ImageFormatParams[ImageFormatRgba16].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1465 | ImageFormatParams[ImageFormatRgb10A2].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1466 | ImageFormatParams[ImageFormatRg16].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1467 | ImageFormatParams[ImageFormatRg8].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1468 | ImageFormatParams[ImageFormatR16].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1469 | ImageFormatParams[ImageFormatR8].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1470 | ImageFormatParams[ImageFormatRgba16Snorm].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1471 | ImageFormatParams[ImageFormatRg16Snorm].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1472 | ImageFormatParams[ImageFormatRg8Snorm].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1473 | ImageFormatParams[ImageFormatR16Snorm].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1474 | ImageFormatParams[ImageFormatR8Snorm].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1475 | |
| 1476 | // ES/Desktop int |
| 1477 | ImageFormatParams[ImageFormatRgba32i].caps.push_back(CapabilityShader); |
| 1478 | ImageFormatParams[ImageFormatRgba16i].caps.push_back(CapabilityShader); |
| 1479 | ImageFormatParams[ImageFormatRgba8i].caps.push_back(CapabilityShader); |
| 1480 | ImageFormatParams[ImageFormatR32i].caps.push_back(CapabilityShader); |
| 1481 | |
| 1482 | // Desktop int |
| 1483 | ImageFormatParams[ImageFormatRg32i].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1484 | ImageFormatParams[ImageFormatRg16i].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1485 | ImageFormatParams[ImageFormatRg8i].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1486 | ImageFormatParams[ImageFormatR16i].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1487 | ImageFormatParams[ImageFormatR8i].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1488 | |
| 1489 | // ES/Desktop uint |
| 1490 | ImageFormatParams[ImageFormatRgba32ui].caps.push_back(CapabilityShader); |
| 1491 | ImageFormatParams[ImageFormatRgba16ui].caps.push_back(CapabilityShader); |
| 1492 | ImageFormatParams[ImageFormatRgba8ui].caps.push_back(CapabilityShader); |
| 1493 | ImageFormatParams[ImageFormatR32ui].caps.push_back(CapabilityShader); |
| 1494 | |
| 1495 | // Desktop uint |
| 1496 | ImageFormatParams[ImageFormatRgb10a2ui].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1497 | ImageFormatParams[ImageFormatRg32ui].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1498 | ImageFormatParams[ImageFormatRg16ui].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1499 | ImageFormatParams[ImageFormatRg8ui].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1500 | ImageFormatParams[ImageFormatR16ui].caps.push_back(CapabilityStorageImageExtendedFormats); |
| 1501 | ImageFormatParams[ImageFormatR8ui].caps.push_back(CapabilityStorageImageExtendedFormats); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1502 | |
| 1503 | // image channel order capabilities |
| 1504 | for (int i = 0; i < ImageChannelOrderCeiling; ++i) { |
| 1505 | ImageChannelOrderParams[i].caps.push_back(CapabilityKernel); |
| 1506 | } |
| 1507 | |
| 1508 | // image channel type capabilities |
| 1509 | for (int i = 0; i < ImageChannelDataTypeCeiling; ++i) { |
| 1510 | ImageChannelDataTypeParams[i].caps.push_back(CapabilityKernel); |
| 1511 | } |
| 1512 | |
| 1513 | // image lookup operands |
| 1514 | ImageOperandsParams[ImageOperandsBiasShift].caps.push_back(CapabilityShader); |
| 1515 | ImageOperandsParams[ImageOperandsOffsetShift].caps.push_back(CapabilityImageGatherExtended); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1516 | ImageOperandsParams[ImageOperandsMinLodShift].caps.push_back(CapabilityMinLod); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1517 | |
| 1518 | // fast math flags capabilities |
| 1519 | for (int i = 0; i < FPFastMathCeiling; ++i) { |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1520 | FPFastMathParams[i].caps.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1521 | } |
| 1522 | |
| 1523 | // fp rounding mode capabilities |
| 1524 | for (int i = 0; i < FPRoundingModeCeiling; ++i) { |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1525 | FPRoundingModeParams[i].caps.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1526 | } |
| 1527 | |
| 1528 | // linkage types |
| 1529 | for (int i = 0; i < LinkageTypeCeiling; ++i) { |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1530 | LinkageTypeParams[i].caps.push_back(CapabilityLinkage); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1531 | } |
| 1532 | |
| 1533 | // function argument types |
| 1534 | for (int i = 0; i < FuncParamAttrCeiling; ++i) { |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1535 | FuncParamAttrParams[i].caps.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1536 | } |
| 1537 | |
| 1538 | // function argument types |
| 1539 | for (int i = 0; i < AccessQualifierCeiling; ++i) { |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1540 | AccessQualifierParams[i].caps.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1541 | } |
| 1542 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1543 | ExecutionModeParams[ExecutionModeInvocations].caps.push_back(CapabilityGeometry); |
| 1544 | ExecutionModeParams[ExecutionModeSpacingEqual].caps.push_back(CapabilityTessellation); |
| 1545 | ExecutionModeParams[ExecutionModeSpacingFractionalEven].caps.push_back(CapabilityTessellation); |
| 1546 | ExecutionModeParams[ExecutionModeSpacingFractionalOdd].caps.push_back(CapabilityTessellation); |
| 1547 | ExecutionModeParams[ExecutionModeVertexOrderCw].caps.push_back(CapabilityTessellation); |
| 1548 | ExecutionModeParams[ExecutionModeVertexOrderCcw].caps.push_back(CapabilityTessellation); |
| 1549 | ExecutionModeParams[ExecutionModePixelCenterInteger].caps.push_back(CapabilityShader); |
| 1550 | ExecutionModeParams[ExecutionModeOriginUpperLeft].caps.push_back(CapabilityShader); |
| 1551 | ExecutionModeParams[ExecutionModeOriginLowerLeft].caps.push_back(CapabilityShader); |
| 1552 | ExecutionModeParams[ExecutionModeEarlyFragmentTests].caps.push_back(CapabilityShader); |
| 1553 | ExecutionModeParams[ExecutionModePointMode].caps.push_back(CapabilityTessellation); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1554 | ExecutionModeParams[ExecutionModeXfb].caps.push_back(CapabilityTransformFeedback); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1555 | ExecutionModeParams[ExecutionModeDepthReplacing].caps.push_back(CapabilityShader); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1556 | ExecutionModeParams[ExecutionModeDepthGreater].caps.push_back(CapabilityShader); |
| 1557 | ExecutionModeParams[ExecutionModeDepthLess].caps.push_back(CapabilityShader); |
| 1558 | ExecutionModeParams[ExecutionModeDepthUnchanged].caps.push_back(CapabilityShader); |
| 1559 | ExecutionModeParams[ExecutionModeLocalSizeHint].caps.push_back(CapabilityKernel); |
| 1560 | ExecutionModeParams[ExecutionModeInputPoints].caps.push_back(CapabilityGeometry); |
| 1561 | ExecutionModeParams[ExecutionModeInputLines].caps.push_back(CapabilityGeometry); |
| 1562 | ExecutionModeParams[ExecutionModeInputLinesAdjacency].caps.push_back(CapabilityGeometry); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1563 | ExecutionModeParams[ExecutionModeTriangles].caps.push_back(CapabilityGeometry); |
| 1564 | ExecutionModeParams[ExecutionModeTriangles].caps.push_back(CapabilityTessellation); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1565 | ExecutionModeParams[ExecutionModeInputTrianglesAdjacency].caps.push_back(CapabilityGeometry); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1566 | ExecutionModeParams[ExecutionModeQuads].caps.push_back(CapabilityTessellation); |
| 1567 | ExecutionModeParams[ExecutionModeIsolines].caps.push_back(CapabilityTessellation); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1568 | ExecutionModeParams[ExecutionModeOutputVertices].caps.push_back(CapabilityGeometry); |
| 1569 | ExecutionModeParams[ExecutionModeOutputVertices].caps.push_back(CapabilityTessellation); |
| 1570 | ExecutionModeParams[ExecutionModeOutputPoints].caps.push_back(CapabilityGeometry); |
| 1571 | ExecutionModeParams[ExecutionModeOutputLineStrip].caps.push_back(CapabilityGeometry); |
| 1572 | ExecutionModeParams[ExecutionModeOutputTriangleStrip].caps.push_back(CapabilityGeometry); |
| 1573 | ExecutionModeParams[ExecutionModeVecTypeHint].caps.push_back(CapabilityKernel); |
| 1574 | ExecutionModeParams[ExecutionModeContractionOff].caps.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1575 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1576 | DecorationParams[DecorationRelaxedPrecision].caps.push_back(CapabilityShader); |
| 1577 | DecorationParams[DecorationBlock].caps.push_back(CapabilityShader); |
| 1578 | DecorationParams[DecorationBufferBlock].caps.push_back(CapabilityShader); |
| 1579 | DecorationParams[DecorationRowMajor].caps.push_back(CapabilityMatrix); |
| 1580 | DecorationParams[DecorationColMajor].caps.push_back(CapabilityMatrix); |
| 1581 | DecorationParams[DecorationGLSLShared].caps.push_back(CapabilityShader); |
| 1582 | DecorationParams[DecorationGLSLPacked].caps.push_back(CapabilityShader); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1583 | DecorationParams[DecorationNoPerspective].caps.push_back(CapabilityShader); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1584 | DecorationParams[DecorationFlat].caps.push_back(CapabilityShader); |
| 1585 | DecorationParams[DecorationPatch].caps.push_back(CapabilityTessellation); |
| 1586 | DecorationParams[DecorationCentroid].caps.push_back(CapabilityShader); |
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 1587 | DecorationParams[DecorationSample].caps.push_back(CapabilitySampleRateShading); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1588 | DecorationParams[DecorationInvariant].caps.push_back(CapabilityShader); |
| 1589 | DecorationParams[DecorationConstant].caps.push_back(CapabilityKernel); |
| 1590 | DecorationParams[DecorationUniform].caps.push_back(CapabilityShader); |
| 1591 | DecorationParams[DecorationCPacked].caps.push_back(CapabilityKernel); |
| 1592 | DecorationParams[DecorationSaturatedConversion].caps.push_back(CapabilityKernel); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1593 | DecorationParams[DecorationStream].caps.push_back(CapabilityGeometryStreams); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1594 | DecorationParams[DecorationLocation].caps.push_back(CapabilityShader); |
| 1595 | DecorationParams[DecorationComponent].caps.push_back(CapabilityShader); |
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 1596 | DecorationParams[DecorationOffset].caps.push_back(CapabilityShader); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1597 | DecorationParams[DecorationIndex].caps.push_back(CapabilityShader); |
| 1598 | DecorationParams[DecorationBinding].caps.push_back(CapabilityShader); |
| 1599 | DecorationParams[DecorationDescriptorSet].caps.push_back(CapabilityShader); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1600 | DecorationParams[DecorationXfbBuffer].caps.push_back(CapabilityTransformFeedback); |
| 1601 | DecorationParams[DecorationXfbStride].caps.push_back(CapabilityTransformFeedback); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1602 | DecorationParams[DecorationArrayStride].caps.push_back(CapabilityShader); |
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 1603 | DecorationParams[DecorationMatrixStride].caps.push_back(CapabilityMatrix); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1604 | DecorationParams[DecorationFuncParamAttr].caps.push_back(CapabilityKernel); |
| 1605 | DecorationParams[DecorationFPRoundingMode].caps.push_back(CapabilityKernel); |
| 1606 | DecorationParams[DecorationFPFastMathMode].caps.push_back(CapabilityKernel); |
| 1607 | DecorationParams[DecorationLinkageAttributes].caps.push_back(CapabilityLinkage); |
| 1608 | DecorationParams[DecorationSpecId].caps.push_back(CapabilityShader); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1609 | DecorationParams[DecorationNoContraction].caps.push_back(CapabilityShader); |
| 1610 | DecorationParams[DecorationInputAttachmentIndex].caps.push_back(CapabilityInputAttachment); |
| 1611 | DecorationParams[DecorationAlignment].caps.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1612 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1613 | BuiltInParams[BuiltInPosition].caps.push_back(CapabilityShader); |
| 1614 | BuiltInParams[BuiltInPointSize].caps.push_back(CapabilityShader); |
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 1615 | BuiltInParams[BuiltInClipDistance].caps.push_back(CapabilityClipDistance); |
| 1616 | BuiltInParams[BuiltInCullDistance].caps.push_back(CapabilityCullDistance); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1617 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1618 | BuiltInParams[BuiltInVertexId].caps.push_back(CapabilityShader); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1619 | BuiltInParams[BuiltInVertexId].desc = "Vertex ID, which takes on values 0, 1, 2, . . . ."; |
| 1620 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1621 | BuiltInParams[BuiltInInstanceId].caps.push_back(CapabilityShader); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1622 | BuiltInParams[BuiltInInstanceId].desc = "Instance ID, which takes on values 0, 1, 2, . . . ."; |
| 1623 | |
| 1624 | BuiltInParams[BuiltInVertexIndex].caps.push_back(CapabilityShader); |
| 1625 | BuiltInParams[BuiltInVertexIndex].desc = "Vertex index, which takes on values base, base+1, base+2, . . . ."; |
| 1626 | |
| 1627 | BuiltInParams[BuiltInInstanceIndex].caps.push_back(CapabilityShader); |
| 1628 | BuiltInParams[BuiltInInstanceIndex].desc = "Instance index, which takes on values base, base+1, base+2, . . . ."; |
| 1629 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1630 | BuiltInParams[BuiltInPrimitiveId].caps.push_back(CapabilityGeometry); |
| 1631 | BuiltInParams[BuiltInPrimitiveId].caps.push_back(CapabilityTessellation); |
| 1632 | BuiltInParams[BuiltInInvocationId].caps.push_back(CapabilityGeometry); |
| 1633 | BuiltInParams[BuiltInInvocationId].caps.push_back(CapabilityTessellation); |
| 1634 | BuiltInParams[BuiltInLayer].caps.push_back(CapabilityGeometry); |
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 1635 | BuiltInParams[BuiltInViewportIndex].caps.push_back(CapabilityMultiViewport); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1636 | BuiltInParams[BuiltInTessLevelOuter].caps.push_back(CapabilityTessellation); |
| 1637 | BuiltInParams[BuiltInTessLevelInner].caps.push_back(CapabilityTessellation); |
| 1638 | BuiltInParams[BuiltInTessCoord].caps.push_back(CapabilityTessellation); |
| 1639 | BuiltInParams[BuiltInPatchVertices].caps.push_back(CapabilityTessellation); |
| 1640 | BuiltInParams[BuiltInFragCoord].caps.push_back(CapabilityShader); |
| 1641 | BuiltInParams[BuiltInPointCoord].caps.push_back(CapabilityShader); |
| 1642 | BuiltInParams[BuiltInFrontFacing].caps.push_back(CapabilityShader); |
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 1643 | BuiltInParams[BuiltInSampleId].caps.push_back(CapabilitySampleRateShading); |
| 1644 | BuiltInParams[BuiltInSamplePosition].caps.push_back(CapabilitySampleRateShading); |
| 1645 | BuiltInParams[BuiltInSampleMask].caps.push_back(CapabilitySampleRateShading); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1646 | BuiltInParams[BuiltInFragDepth].caps.push_back(CapabilityShader); |
| 1647 | BuiltInParams[BuiltInHelperInvocation].caps.push_back(CapabilityShader); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1648 | BuiltInParams[BuiltInWorkDim].caps.push_back(CapabilityKernel); |
| 1649 | BuiltInParams[BuiltInGlobalSize].caps.push_back(CapabilityKernel); |
| 1650 | BuiltInParams[BuiltInEnqueuedWorkgroupSize].caps.push_back(CapabilityKernel); |
| 1651 | BuiltInParams[BuiltInGlobalOffset].caps.push_back(CapabilityKernel); |
| 1652 | BuiltInParams[BuiltInGlobalLinearId].caps.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1653 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1654 | BuiltInParams[BuiltInSubgroupSize].caps.push_back(CapabilityKernel); |
| 1655 | BuiltInParams[BuiltInSubgroupMaxSize].caps.push_back(CapabilityKernel); |
| 1656 | BuiltInParams[BuiltInNumSubgroups].caps.push_back(CapabilityKernel); |
| 1657 | BuiltInParams[BuiltInNumEnqueuedSubgroups].caps.push_back(CapabilityKernel); |
| 1658 | BuiltInParams[BuiltInSubgroupId].caps.push_back(CapabilityKernel); |
| 1659 | BuiltInParams[BuiltInSubgroupLocalInvocationId].caps.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1660 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1661 | DimensionalityParams[Dim1D].caps.push_back(CapabilitySampled1D); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1662 | DimensionalityParams[DimCube].caps.push_back(CapabilityShader); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1663 | DimensionalityParams[DimRect].caps.push_back(CapabilitySampledRect); |
| 1664 | DimensionalityParams[DimBuffer].caps.push_back(CapabilitySampledBuffer); |
| 1665 | DimensionalityParams[DimSubpassData].caps.push_back(CapabilityInputAttachment); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1666 | |
| 1667 | // Group Operations |
| 1668 | for (int i = 0; i < GroupOperationCeiling; ++i) { |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1669 | GroupOperationParams[i].caps.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1670 | } |
| 1671 | |
| 1672 | // Enqueue flags |
| 1673 | for (int i = 0; i < KernelEnqueueFlagsCeiling; ++i) { |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1674 | KernelEnqueueFlagsParams[i].caps.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1675 | } |
| 1676 | |
| 1677 | // Profiling info |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1678 | KernelProfilingInfoParams[0].caps.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1679 | |
| 1680 | // set name of operator, an initial set of <id> style operands, and the description |
| 1681 | |
| 1682 | InstructionDesc[OpSource].operands.push(OperandSource, ""); |
| 1683 | InstructionDesc[OpSource].operands.push(OperandLiteralNumber, "'Version'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1684 | InstructionDesc[OpSource].operands.push(OperandId, "'File'", true); |
| 1685 | InstructionDesc[OpSource].operands.push(OperandLiteralString, "'Source'", true); |
| 1686 | |
| 1687 | InstructionDesc[OpSourceContinued].operands.push(OperandLiteralString, "'Continued Source'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1688 | |
| 1689 | InstructionDesc[OpSourceExtension].operands.push(OperandLiteralString, "'Extension'"); |
| 1690 | |
| 1691 | InstructionDesc[OpName].operands.push(OperandId, "'Target'"); |
| 1692 | InstructionDesc[OpName].operands.push(OperandLiteralString, "'Name'"); |
| 1693 | |
| 1694 | InstructionDesc[OpMemberName].operands.push(OperandId, "'Type'"); |
| 1695 | InstructionDesc[OpMemberName].operands.push(OperandLiteralNumber, "'Member'"); |
| 1696 | InstructionDesc[OpMemberName].operands.push(OperandLiteralString, "'Name'"); |
| 1697 | |
| 1698 | InstructionDesc[OpString].operands.push(OperandLiteralString, "'String'"); |
| 1699 | |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1700 | InstructionDesc[OpLine].operands.push(OperandId, "'File'"); |
| 1701 | InstructionDesc[OpLine].operands.push(OperandLiteralNumber, "'Line'"); |
| 1702 | InstructionDesc[OpLine].operands.push(OperandLiteralNumber, "'Column'"); |
| 1703 | |
| 1704 | InstructionDesc[OpExtension].operands.push(OperandLiteralString, "'Name'"); |
| 1705 | |
| 1706 | InstructionDesc[OpExtInstImport].operands.push(OperandLiteralString, "'Name'"); |
| 1707 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1708 | InstructionDesc[OpCapability].operands.push(OperandCapability, "'Capability'"); |
| 1709 | |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1710 | InstructionDesc[OpMemoryModel].operands.push(OperandAddressing, ""); |
| 1711 | InstructionDesc[OpMemoryModel].operands.push(OperandMemory, ""); |
| 1712 | |
| 1713 | InstructionDesc[OpEntryPoint].operands.push(OperandExecutionModel, ""); |
| 1714 | InstructionDesc[OpEntryPoint].operands.push(OperandId, "'Entry Point'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1715 | InstructionDesc[OpEntryPoint].operands.push(OperandLiteralString, "'Name'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1716 | InstructionDesc[OpEntryPoint].operands.push(OperandVariableIds, "'Interface'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1717 | |
| 1718 | InstructionDesc[OpExecutionMode].operands.push(OperandId, "'Entry Point'"); |
| 1719 | InstructionDesc[OpExecutionMode].operands.push(OperandExecutionMode, "'Mode'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1720 | InstructionDesc[OpExecutionMode].operands.push(OperandOptionalLiteral, "See <<Execution_Mode,Execution Mode>>"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1721 | |
| 1722 | InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Width'"); |
| 1723 | InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Signedness'"); |
| 1724 | |
| 1725 | InstructionDesc[OpTypeFloat].operands.push(OperandLiteralNumber, "'Width'"); |
| 1726 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1727 | InstructionDesc[OpTypeVector].operands.push(OperandId, "'Component Type'"); |
| 1728 | InstructionDesc[OpTypeVector].operands.push(OperandLiteralNumber, "'Component Count'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1729 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1730 | InstructionDesc[OpTypeMatrix].capabilities.push_back(CapabilityMatrix); |
| 1731 | InstructionDesc[OpTypeMatrix].operands.push(OperandId, "'Column Type'"); |
| 1732 | InstructionDesc[OpTypeMatrix].operands.push(OperandLiteralNumber, "'Column Count'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1733 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1734 | InstructionDesc[OpTypeImage].operands.push(OperandId, "'Sampled Type'"); |
| 1735 | InstructionDesc[OpTypeImage].operands.push(OperandDimensionality, ""); |
| 1736 | InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Depth'"); |
| 1737 | InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Arrayed'"); |
| 1738 | InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'MS'"); |
| 1739 | InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Sampled'"); |
| 1740 | InstructionDesc[OpTypeImage].operands.push(OperandSamplerImageFormat, ""); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1741 | InstructionDesc[OpTypeImage].operands.push(OperandAccessQualifier, "", true); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1742 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1743 | InstructionDesc[OpTypeSampledImage].operands.push(OperandId, "'Image Type'"); |
| 1744 | |
| 1745 | InstructionDesc[OpTypeArray].operands.push(OperandId, "'Element Type'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1746 | InstructionDesc[OpTypeArray].operands.push(OperandId, "'Length'"); |
| 1747 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1748 | InstructionDesc[OpTypeRuntimeArray].capabilities.push_back(CapabilityShader); |
| 1749 | InstructionDesc[OpTypeRuntimeArray].operands.push(OperandId, "'Element Type'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1750 | |
| 1751 | InstructionDesc[OpTypeStruct].operands.push(OperandVariableIds, "'Member 0 type', +\n'member 1 type', +\n..."); |
| 1752 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1753 | InstructionDesc[OpTypeOpaque].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1754 | InstructionDesc[OpTypeOpaque].operands.push(OperandLiteralString, "The name of the opaque type."); |
| 1755 | |
| 1756 | InstructionDesc[OpTypePointer].operands.push(OperandStorage, ""); |
| 1757 | InstructionDesc[OpTypePointer].operands.push(OperandId, "'Type'"); |
| 1758 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1759 | InstructionDesc[OpTypeForwardPointer].capabilities.push_back(CapabilityAddresses); |
| 1760 | InstructionDesc[OpTypeForwardPointer].operands.push(OperandId, "'Pointer Type'"); |
| 1761 | InstructionDesc[OpTypeForwardPointer].operands.push(OperandStorage, ""); |
| 1762 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1763 | InstructionDesc[OpTypeEvent].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1764 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1765 | InstructionDesc[OpTypeDeviceEvent].capabilities.push_back(CapabilityDeviceEnqueue); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1766 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1767 | InstructionDesc[OpTypeReserveId].capabilities.push_back(CapabilityPipes); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1768 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1769 | InstructionDesc[OpTypeQueue].capabilities.push_back(CapabilityDeviceEnqueue); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1770 | |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1771 | InstructionDesc[OpTypePipe].operands.push(OperandAccessQualifier, "'Qualifier'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1772 | InstructionDesc[OpTypePipe].capabilities.push_back(CapabilityPipes); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1773 | |
| 1774 | InstructionDesc[OpTypeFunction].operands.push(OperandId, "'Return Type'"); |
| 1775 | InstructionDesc[OpTypeFunction].operands.push(OperandVariableIds, "'Parameter 0 Type', +\n'Parameter 1 Type', +\n..."); |
| 1776 | |
| 1777 | InstructionDesc[OpConstant].operands.push(OperandVariableLiterals, "'Value'"); |
| 1778 | |
| 1779 | InstructionDesc[OpConstantComposite].operands.push(OperandVariableIds, "'Constituents'"); |
| 1780 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1781 | InstructionDesc[OpConstantSampler].capabilities.push_back(CapabilityLiteralSampler); |
| 1782 | InstructionDesc[OpConstantSampler].operands.push(OperandSamplerAddressingMode, ""); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1783 | InstructionDesc[OpConstantSampler].operands.push(OperandLiteralNumber, "'Param'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1784 | InstructionDesc[OpConstantSampler].operands.push(OperandSamplerFilterMode, ""); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1785 | |
| 1786 | InstructionDesc[OpSpecConstant].operands.push(OperandVariableLiterals, "'Value'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1787 | |
| 1788 | InstructionDesc[OpSpecConstantComposite].operands.push(OperandVariableIds, "'Constituents'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1789 | |
| 1790 | InstructionDesc[OpSpecConstantOp].operands.push(OperandLiteralNumber, "'Opcode'"); |
| 1791 | InstructionDesc[OpSpecConstantOp].operands.push(OperandVariableIds, "'Operands'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1792 | |
| 1793 | InstructionDesc[OpVariable].operands.push(OperandStorage, ""); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1794 | InstructionDesc[OpVariable].operands.push(OperandId, "'Initializer'", true); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1795 | |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1796 | InstructionDesc[OpFunction].operands.push(OperandFunction, ""); |
| 1797 | InstructionDesc[OpFunction].operands.push(OperandId, "'Function Type'"); |
| 1798 | |
| 1799 | InstructionDesc[OpFunctionCall].operands.push(OperandId, "'Function'"); |
| 1800 | InstructionDesc[OpFunctionCall].operands.push(OperandVariableIds, "'Argument 0', +\n'Argument 1', +\n..."); |
| 1801 | |
| 1802 | InstructionDesc[OpExtInst].operands.push(OperandId, "'Set'"); |
| 1803 | InstructionDesc[OpExtInst].operands.push(OperandLiteralNumber, "'Instruction'"); |
| 1804 | InstructionDesc[OpExtInst].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n..."); |
| 1805 | |
| 1806 | InstructionDesc[OpLoad].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1807 | InstructionDesc[OpLoad].operands.push(OperandMemoryAccess, "", true); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1808 | |
| 1809 | InstructionDesc[OpStore].operands.push(OperandId, "'Pointer'"); |
| 1810 | InstructionDesc[OpStore].operands.push(OperandId, "'Object'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1811 | InstructionDesc[OpStore].operands.push(OperandMemoryAccess, "", true); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1812 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1813 | InstructionDesc[OpPhi].operands.push(OperandVariableIds, "'Variable, Parent, ...'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1814 | |
| 1815 | InstructionDesc[OpDecorate].operands.push(OperandId, "'Target'"); |
| 1816 | InstructionDesc[OpDecorate].operands.push(OperandDecoration, ""); |
| 1817 | InstructionDesc[OpDecorate].operands.push(OperandVariableLiterals, "See <<Decoration,'Decoration'>>."); |
| 1818 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1819 | InstructionDesc[OpMemberDecorate].operands.push(OperandId, "'Structure Type'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1820 | InstructionDesc[OpMemberDecorate].operands.push(OperandLiteralNumber, "'Member'"); |
| 1821 | InstructionDesc[OpMemberDecorate].operands.push(OperandDecoration, ""); |
| 1822 | InstructionDesc[OpMemberDecorate].operands.push(OperandVariableLiterals, "See <<Decoration,'Decoration'>>."); |
| 1823 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1824 | InstructionDesc[OpGroupDecorate].operands.push(OperandId, "'Decoration Group'"); |
| 1825 | InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Targets'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1826 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1827 | InstructionDesc[OpGroupMemberDecorate].operands.push(OperandId, "'Decoration Group'"); |
| 1828 | InstructionDesc[OpGroupMemberDecorate].operands.push(OperandVariableIdLiteral, "'Targets'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1829 | |
| 1830 | InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Vector'"); |
| 1831 | InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Index'"); |
| 1832 | |
| 1833 | InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Vector'"); |
| 1834 | InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Component'"); |
| 1835 | InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Index'"); |
| 1836 | |
| 1837 | InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 1'"); |
| 1838 | InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 2'"); |
| 1839 | InstructionDesc[OpVectorShuffle].operands.push(OperandVariableLiterals, "'Components'"); |
| 1840 | |
| 1841 | InstructionDesc[OpCompositeConstruct].operands.push(OperandVariableIds, "'Constituents'"); |
| 1842 | |
| 1843 | InstructionDesc[OpCompositeExtract].operands.push(OperandId, "'Composite'"); |
| 1844 | InstructionDesc[OpCompositeExtract].operands.push(OperandVariableLiterals, "'Indexes'"); |
| 1845 | |
| 1846 | InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Object'"); |
| 1847 | InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Composite'"); |
| 1848 | InstructionDesc[OpCompositeInsert].operands.push(OperandVariableLiterals, "'Indexes'"); |
| 1849 | |
| 1850 | InstructionDesc[OpCopyObject].operands.push(OperandId, "'Operand'"); |
| 1851 | |
| 1852 | InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Target'"); |
| 1853 | InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Source'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1854 | InstructionDesc[OpCopyMemory].operands.push(OperandMemoryAccess, "", true); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1855 | |
| 1856 | InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Target'"); |
| 1857 | InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Source'"); |
| 1858 | InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Size'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1859 | InstructionDesc[OpCopyMemorySized].operands.push(OperandMemoryAccess, "", true); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1860 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1861 | InstructionDesc[OpCopyMemorySized].capabilities.push_back(CapabilityAddresses); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1862 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1863 | InstructionDesc[OpSampledImage].operands.push(OperandId, "'Image'"); |
| 1864 | InstructionDesc[OpSampledImage].operands.push(OperandId, "'Sampler'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1865 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1866 | InstructionDesc[OpImage].operands.push(OperandId, "'Sampled Image'"); |
| 1867 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1868 | InstructionDesc[OpImageRead].operands.push(OperandId, "'Image'"); |
| 1869 | InstructionDesc[OpImageRead].operands.push(OperandId, "'Coordinate'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1870 | InstructionDesc[OpImageRead].operands.push(OperandImageOperands, "", true); |
| 1871 | InstructionDesc[OpImageRead].operands.push(OperandVariableIds, "", true); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1872 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1873 | InstructionDesc[OpImageWrite].operands.push(OperandId, "'Image'"); |
| 1874 | InstructionDesc[OpImageWrite].operands.push(OperandId, "'Coordinate'"); |
| 1875 | InstructionDesc[OpImageWrite].operands.push(OperandId, "'Texel'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1876 | InstructionDesc[OpImageWrite].operands.push(OperandImageOperands, "", true); |
| 1877 | InstructionDesc[OpImageWrite].operands.push(OperandVariableIds, "", true); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1878 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1879 | InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Sampled Image'"); |
| 1880 | InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Coordinate'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1881 | InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandImageOperands, "", true); |
| 1882 | InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandVariableIds, "", true); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1883 | InstructionDesc[OpImageSampleImplicitLod].capabilities.push_back(CapabilityShader); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1884 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1885 | InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Sampled Image'"); |
| 1886 | InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Coordinate'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1887 | InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandImageOperands, "", true); |
| 1888 | InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandVariableIds, "", true); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1889 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1890 | InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); |
| 1891 | InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); |
| 1892 | InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1893 | InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true); |
| 1894 | InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1895 | InstructionDesc[OpImageSampleDrefImplicitLod].capabilities.push_back(CapabilityShader); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1896 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1897 | InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); |
| 1898 | InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); |
| 1899 | InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1900 | InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true); |
| 1901 | InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1902 | InstructionDesc[OpImageSampleDrefExplicitLod].capabilities.push_back(CapabilityShader); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1903 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1904 | InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'"); |
| 1905 | InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1906 | InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandImageOperands, "", true); |
| 1907 | InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandVariableIds, "", true); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1908 | InstructionDesc[OpImageSampleProjImplicitLod].capabilities.push_back(CapabilityShader); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1909 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1910 | InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'"); |
| 1911 | InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1912 | InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandImageOperands, "", true); |
| 1913 | InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandVariableIds, "", true); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1914 | InstructionDesc[OpImageSampleProjExplicitLod].capabilities.push_back(CapabilityShader); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1915 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1916 | InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); |
| 1917 | InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); |
| 1918 | InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1919 | InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true); |
| 1920 | InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1921 | InstructionDesc[OpImageSampleProjDrefImplicitLod].capabilities.push_back(CapabilityShader); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1922 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1923 | InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); |
| 1924 | InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); |
| 1925 | InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1926 | InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true); |
| 1927 | InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1928 | InstructionDesc[OpImageSampleProjDrefExplicitLod].capabilities.push_back(CapabilityShader); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1929 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1930 | InstructionDesc[OpImageFetch].operands.push(OperandId, "'Image'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1931 | InstructionDesc[OpImageFetch].operands.push(OperandId, "'Coordinate'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1932 | InstructionDesc[OpImageFetch].operands.push(OperandImageOperands, "", true); |
| 1933 | InstructionDesc[OpImageFetch].operands.push(OperandVariableIds, "", true); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1934 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1935 | InstructionDesc[OpImageGather].operands.push(OperandId, "'Sampled Image'"); |
| 1936 | InstructionDesc[OpImageGather].operands.push(OperandId, "'Coordinate'"); |
| 1937 | InstructionDesc[OpImageGather].operands.push(OperandId, "'Component'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1938 | InstructionDesc[OpImageGather].operands.push(OperandImageOperands, "", true); |
| 1939 | InstructionDesc[OpImageGather].operands.push(OperandVariableIds, "", true); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1940 | InstructionDesc[OpImageGather].capabilities.push_back(CapabilityShader); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1941 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1942 | InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Sampled Image'"); |
| 1943 | InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Coordinate'"); |
| 1944 | InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'D~ref~'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1945 | InstructionDesc[OpImageDrefGather].operands.push(OperandImageOperands, "", true); |
| 1946 | InstructionDesc[OpImageDrefGather].operands.push(OperandVariableIds, "", true); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 1947 | InstructionDesc[OpImageDrefGather].capabilities.push_back(CapabilityShader); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 1948 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 1949 | InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Sampled Image'"); |
| 1950 | InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Coordinate'"); |
| 1951 | InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandImageOperands, "", true); |
| 1952 | InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandVariableIds, "", true); |
| 1953 | InstructionDesc[OpImageSparseSampleImplicitLod].capabilities.push_back(CapabilitySparseResidency); |
| 1954 | |
| 1955 | InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Sampled Image'"); |
| 1956 | InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Coordinate'"); |
| 1957 | InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandImageOperands, "", true); |
| 1958 | InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandVariableIds, "", true); |
| 1959 | InstructionDesc[OpImageSparseSampleExplicitLod].capabilities.push_back(CapabilitySparseResidency); |
| 1960 | |
| 1961 | InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); |
| 1962 | InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); |
| 1963 | InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); |
| 1964 | InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true); |
| 1965 | InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true); |
| 1966 | InstructionDesc[OpImageSparseSampleDrefImplicitLod].capabilities.push_back(CapabilitySparseResidency); |
| 1967 | |
| 1968 | InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); |
| 1969 | InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); |
| 1970 | InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); |
| 1971 | InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true); |
| 1972 | InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true); |
| 1973 | InstructionDesc[OpImageSparseSampleDrefExplicitLod].capabilities.push_back(CapabilitySparseResidency); |
| 1974 | |
| 1975 | InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'"); |
| 1976 | InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'"); |
| 1977 | InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandImageOperands, "", true); |
| 1978 | InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandVariableIds, "", true); |
| 1979 | InstructionDesc[OpImageSparseSampleProjImplicitLod].capabilities.push_back(CapabilitySparseResidency); |
| 1980 | |
| 1981 | InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'"); |
| 1982 | InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'"); |
| 1983 | InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandImageOperands, "", true); |
| 1984 | InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandVariableIds, "", true); |
| 1985 | InstructionDesc[OpImageSparseSampleProjExplicitLod].capabilities.push_back(CapabilitySparseResidency); |
| 1986 | |
| 1987 | InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); |
| 1988 | InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); |
| 1989 | InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); |
| 1990 | InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true); |
| 1991 | InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true); |
| 1992 | InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].capabilities.push_back(CapabilitySparseResidency); |
| 1993 | |
| 1994 | InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); |
| 1995 | InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); |
| 1996 | InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); |
| 1997 | InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true); |
| 1998 | InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true); |
| 1999 | InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].capabilities.push_back(CapabilitySparseResidency); |
| 2000 | |
| 2001 | InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Image'"); |
| 2002 | InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Coordinate'"); |
| 2003 | InstructionDesc[OpImageSparseFetch].operands.push(OperandImageOperands, "", true); |
| 2004 | InstructionDesc[OpImageSparseFetch].operands.push(OperandVariableIds, "", true); |
| 2005 | InstructionDesc[OpImageSparseFetch].capabilities.push_back(CapabilitySparseResidency); |
| 2006 | |
| 2007 | InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Sampled Image'"); |
| 2008 | InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Coordinate'"); |
| 2009 | InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Component'"); |
| 2010 | InstructionDesc[OpImageSparseGather].operands.push(OperandImageOperands, "", true); |
| 2011 | InstructionDesc[OpImageSparseGather].operands.push(OperandVariableIds, "", true); |
| 2012 | InstructionDesc[OpImageSparseGather].capabilities.push_back(CapabilitySparseResidency); |
| 2013 | |
| 2014 | InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Sampled Image'"); |
| 2015 | InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Coordinate'"); |
| 2016 | InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'D~ref~'"); |
| 2017 | InstructionDesc[OpImageSparseDrefGather].operands.push(OperandImageOperands, "", true); |
| 2018 | InstructionDesc[OpImageSparseDrefGather].operands.push(OperandVariableIds, "", true); |
| 2019 | InstructionDesc[OpImageSparseDrefGather].capabilities.push_back(CapabilitySparseResidency); |
| 2020 | |
John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 2021 | InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Image'"); |
| 2022 | InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Coordinate'"); |
| 2023 | InstructionDesc[OpImageSparseRead].operands.push(OperandImageOperands, "", true); |
| 2024 | InstructionDesc[OpImageSparseRead].operands.push(OperandVariableIds, "", true); |
| 2025 | InstructionDesc[OpImageSparseRead].capabilities.push_back(CapabilitySparseResidency); |
| 2026 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2027 | InstructionDesc[OpImageSparseTexelsResident].operands.push(OperandId, "'Resident Code'"); |
| 2028 | InstructionDesc[OpImageSparseTexelsResident].capabilities.push_back(CapabilitySparseResidency); |
| 2029 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2030 | InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Image'"); |
| 2031 | InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Level of Detail'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2032 | InstructionDesc[OpImageQuerySizeLod].capabilities.push_back(CapabilityKernel); |
| 2033 | InstructionDesc[OpImageQuerySizeLod].capabilities.push_back(CapabilityImageQuery); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2034 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2035 | InstructionDesc[OpImageQuerySize].operands.push(OperandId, "'Image'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2036 | InstructionDesc[OpImageQuerySize].capabilities.push_back(CapabilityKernel); |
| 2037 | InstructionDesc[OpImageQuerySize].capabilities.push_back(CapabilityImageQuery); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2038 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2039 | InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Image'"); |
| 2040 | InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Coordinate'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2041 | InstructionDesc[OpImageQueryLod].capabilities.push_back(CapabilityImageQuery); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2042 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2043 | InstructionDesc[OpImageQueryLevels].operands.push(OperandId, "'Image'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2044 | InstructionDesc[OpImageQueryLevels].capabilities.push_back(CapabilityKernel); |
| 2045 | InstructionDesc[OpImageQueryLevels].capabilities.push_back(CapabilityImageQuery); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2046 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2047 | InstructionDesc[OpImageQuerySamples].operands.push(OperandId, "'Image'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2048 | InstructionDesc[OpImageQuerySamples].capabilities.push_back(CapabilityKernel); |
| 2049 | InstructionDesc[OpImageQuerySamples].capabilities.push_back(CapabilityImageQuery); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2050 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2051 | InstructionDesc[OpImageQueryFormat].operands.push(OperandId, "'Image'"); |
| 2052 | InstructionDesc[OpImageQueryFormat].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2053 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2054 | InstructionDesc[OpImageQueryOrder].operands.push(OperandId, "'Image'"); |
| 2055 | InstructionDesc[OpImageQueryOrder].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2056 | |
| 2057 | InstructionDesc[OpAccessChain].operands.push(OperandId, "'Base'"); |
| 2058 | InstructionDesc[OpAccessChain].operands.push(OperandVariableIds, "'Indexes'"); |
| 2059 | |
| 2060 | InstructionDesc[OpInBoundsAccessChain].operands.push(OperandId, "'Base'"); |
| 2061 | InstructionDesc[OpInBoundsAccessChain].operands.push(OperandVariableIds, "'Indexes'"); |
| 2062 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2063 | InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Base'"); |
| 2064 | InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Element'"); |
| 2065 | InstructionDesc[OpPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'"); |
| 2066 | InstructionDesc[OpPtrAccessChain].capabilities.push_back(CapabilityAddresses); |
| 2067 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2068 | InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Base'"); |
| 2069 | InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Element'"); |
| 2070 | InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'"); |
| 2071 | InstructionDesc[OpInBoundsPtrAccessChain].capabilities.push_back(CapabilityAddresses); |
| 2072 | |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2073 | InstructionDesc[OpSNegate].operands.push(OperandId, "'Operand'"); |
| 2074 | |
| 2075 | InstructionDesc[OpFNegate].operands.push(OperandId, "'Operand'"); |
| 2076 | |
| 2077 | InstructionDesc[OpNot].operands.push(OperandId, "'Operand'"); |
| 2078 | |
| 2079 | InstructionDesc[OpAny].operands.push(OperandId, "'Vector'"); |
| 2080 | |
| 2081 | InstructionDesc[OpAll].operands.push(OperandId, "'Vector'"); |
| 2082 | |
| 2083 | InstructionDesc[OpConvertFToU].operands.push(OperandId, "'Float Value'"); |
| 2084 | |
| 2085 | InstructionDesc[OpConvertFToS].operands.push(OperandId, "'Float Value'"); |
| 2086 | |
| 2087 | InstructionDesc[OpConvertSToF].operands.push(OperandId, "'Signed Value'"); |
| 2088 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2089 | InstructionDesc[OpConvertUToF].operands.push(OperandId, "'Unsigned Value'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2090 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2091 | InstructionDesc[OpUConvert].operands.push(OperandId, "'Unsigned Value'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2092 | |
| 2093 | InstructionDesc[OpSConvert].operands.push(OperandId, "'Signed Value'"); |
| 2094 | |
| 2095 | InstructionDesc[OpFConvert].operands.push(OperandId, "'Float Value'"); |
| 2096 | |
| 2097 | InstructionDesc[OpSatConvertSToU].operands.push(OperandId, "'Signed Value'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2098 | InstructionDesc[OpSatConvertSToU].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2099 | |
| 2100 | InstructionDesc[OpSatConvertUToS].operands.push(OperandId, "'Unsigned Value'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2101 | InstructionDesc[OpSatConvertUToS].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2102 | |
| 2103 | InstructionDesc[OpConvertPtrToU].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2104 | InstructionDesc[OpConvertPtrToU].capabilities.push_back(CapabilityAddresses); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2105 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2106 | InstructionDesc[OpConvertUToPtr].operands.push(OperandId, "'Integer Value'"); |
| 2107 | InstructionDesc[OpConvertUToPtr].capabilities.push_back(CapabilityAddresses); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2108 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2109 | InstructionDesc[OpPtrCastToGeneric].operands.push(OperandId, "'Pointer'"); |
| 2110 | InstructionDesc[OpPtrCastToGeneric].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2111 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2112 | InstructionDesc[OpGenericCastToPtr].operands.push(OperandId, "'Pointer'"); |
| 2113 | InstructionDesc[OpGenericCastToPtr].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2114 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2115 | InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandId, "'Pointer'"); |
| 2116 | InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandStorage, "'Storage'"); |
| 2117 | InstructionDesc[OpGenericCastToPtrExplicit].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2118 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2119 | InstructionDesc[OpGenericPtrMemSemantics].operands.push(OperandId, "'Pointer'"); |
| 2120 | InstructionDesc[OpGenericPtrMemSemantics].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2121 | |
| 2122 | InstructionDesc[OpBitcast].operands.push(OperandId, "'Operand'"); |
| 2123 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2124 | InstructionDesc[OpQuantizeToF16].operands.push(OperandId, "'Value'"); |
| 2125 | |
| 2126 | InstructionDesc[OpTranspose].capabilities.push_back(CapabilityMatrix); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2127 | InstructionDesc[OpTranspose].operands.push(OperandId, "'Matrix'"); |
| 2128 | |
| 2129 | InstructionDesc[OpIsNan].operands.push(OperandId, "'x'"); |
| 2130 | |
| 2131 | InstructionDesc[OpIsInf].operands.push(OperandId, "'x'"); |
| 2132 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2133 | InstructionDesc[OpIsFinite].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2134 | InstructionDesc[OpIsFinite].operands.push(OperandId, "'x'"); |
| 2135 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2136 | InstructionDesc[OpIsNormal].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2137 | InstructionDesc[OpIsNormal].operands.push(OperandId, "'x'"); |
| 2138 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2139 | InstructionDesc[OpSignBitSet].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2140 | InstructionDesc[OpSignBitSet].operands.push(OperandId, "'x'"); |
| 2141 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2142 | InstructionDesc[OpLessOrGreater].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2143 | InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'x'"); |
| 2144 | InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'y'"); |
| 2145 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2146 | InstructionDesc[OpOrdered].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2147 | InstructionDesc[OpOrdered].operands.push(OperandId, "'x'"); |
| 2148 | InstructionDesc[OpOrdered].operands.push(OperandId, "'y'"); |
| 2149 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2150 | InstructionDesc[OpUnordered].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2151 | InstructionDesc[OpUnordered].operands.push(OperandId, "'x'"); |
| 2152 | InstructionDesc[OpUnordered].operands.push(OperandId, "'y'"); |
| 2153 | |
| 2154 | InstructionDesc[OpArrayLength].operands.push(OperandId, "'Structure'"); |
| 2155 | InstructionDesc[OpArrayLength].operands.push(OperandLiteralNumber, "'Array member'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2156 | InstructionDesc[OpArrayLength].capabilities.push_back(CapabilityShader); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2157 | |
| 2158 | InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 1'"); |
| 2159 | InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 2'"); |
| 2160 | |
| 2161 | InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 1'"); |
| 2162 | InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 2'"); |
| 2163 | |
| 2164 | InstructionDesc[OpISub].operands.push(OperandId, "'Operand 1'"); |
| 2165 | InstructionDesc[OpISub].operands.push(OperandId, "'Operand 2'"); |
| 2166 | |
| 2167 | InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 1'"); |
| 2168 | InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 2'"); |
| 2169 | |
| 2170 | InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 1'"); |
| 2171 | InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 2'"); |
| 2172 | |
| 2173 | InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 1'"); |
| 2174 | InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 2'"); |
| 2175 | |
| 2176 | InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 1'"); |
| 2177 | InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 2'"); |
| 2178 | |
| 2179 | InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 1'"); |
| 2180 | InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 2'"); |
| 2181 | |
| 2182 | InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 1'"); |
| 2183 | InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 2'"); |
| 2184 | |
| 2185 | InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 1'"); |
| 2186 | InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 2'"); |
| 2187 | |
| 2188 | InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 1'"); |
| 2189 | InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 2'"); |
| 2190 | |
| 2191 | InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 1'"); |
| 2192 | InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 2'"); |
| 2193 | |
| 2194 | InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 1'"); |
| 2195 | InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 2'"); |
| 2196 | |
| 2197 | InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 1'"); |
| 2198 | InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 2'"); |
| 2199 | |
| 2200 | InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Vector'"); |
| 2201 | InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Scalar'"); |
| 2202 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2203 | InstructionDesc[OpMatrixTimesScalar].capabilities.push_back(CapabilityMatrix); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2204 | InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Matrix'"); |
| 2205 | InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Scalar'"); |
| 2206 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2207 | InstructionDesc[OpVectorTimesMatrix].capabilities.push_back(CapabilityMatrix); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2208 | InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Vector'"); |
| 2209 | InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Matrix'"); |
| 2210 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2211 | InstructionDesc[OpMatrixTimesVector].capabilities.push_back(CapabilityMatrix); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2212 | InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Matrix'"); |
| 2213 | InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Vector'"); |
| 2214 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2215 | InstructionDesc[OpMatrixTimesMatrix].capabilities.push_back(CapabilityMatrix); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2216 | InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'LeftMatrix'"); |
| 2217 | InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'RightMatrix'"); |
| 2218 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2219 | InstructionDesc[OpOuterProduct].capabilities.push_back(CapabilityMatrix); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2220 | InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 1'"); |
| 2221 | InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 2'"); |
| 2222 | |
| 2223 | InstructionDesc[OpDot].operands.push(OperandId, "'Vector 1'"); |
| 2224 | InstructionDesc[OpDot].operands.push(OperandId, "'Vector 2'"); |
| 2225 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2226 | InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 1'"); |
| 2227 | InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 2'"); |
| 2228 | |
| 2229 | InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 1'"); |
| 2230 | InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 2'"); |
| 2231 | |
| 2232 | InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 1'"); |
| 2233 | InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 2'"); |
| 2234 | |
| 2235 | InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 1'"); |
| 2236 | InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 2'"); |
| 2237 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2238 | InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Base'"); |
| 2239 | InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Shift'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2240 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2241 | InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Base'"); |
| 2242 | InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Shift'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2243 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2244 | InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Base'"); |
| 2245 | InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Shift'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2246 | |
| 2247 | InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 1'"); |
| 2248 | InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 2'"); |
| 2249 | |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2250 | InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 1'"); |
| 2251 | InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 2'"); |
| 2252 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2253 | InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 1'"); |
| 2254 | InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 2'"); |
| 2255 | |
| 2256 | InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 1'"); |
| 2257 | InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 2'"); |
| 2258 | |
| 2259 | InstructionDesc[OpLogicalNot].operands.push(OperandId, "'Operand'"); |
| 2260 | |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2261 | InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 1'"); |
| 2262 | InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 2'"); |
| 2263 | |
| 2264 | InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 1'"); |
| 2265 | InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 2'"); |
| 2266 | |
| 2267 | InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 1'"); |
| 2268 | InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 2'"); |
| 2269 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2270 | InstructionDesc[OpBitFieldInsert].capabilities.push_back(CapabilityShader); |
| 2271 | InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Base'"); |
| 2272 | InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Insert'"); |
| 2273 | InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Offset'"); |
| 2274 | InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Count'"); |
| 2275 | |
| 2276 | InstructionDesc[OpBitFieldSExtract].capabilities.push_back(CapabilityShader); |
| 2277 | InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Base'"); |
| 2278 | InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Offset'"); |
| 2279 | InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Count'"); |
| 2280 | |
| 2281 | InstructionDesc[OpBitFieldUExtract].capabilities.push_back(CapabilityShader); |
| 2282 | InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Base'"); |
| 2283 | InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Offset'"); |
| 2284 | InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Count'"); |
| 2285 | |
| 2286 | InstructionDesc[OpBitReverse].capabilities.push_back(CapabilityShader); |
| 2287 | InstructionDesc[OpBitReverse].operands.push(OperandId, "'Base'"); |
| 2288 | |
| 2289 | InstructionDesc[OpBitCount].operands.push(OperandId, "'Base'"); |
| 2290 | |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2291 | InstructionDesc[OpSelect].operands.push(OperandId, "'Condition'"); |
| 2292 | InstructionDesc[OpSelect].operands.push(OperandId, "'Object 1'"); |
| 2293 | InstructionDesc[OpSelect].operands.push(OperandId, "'Object 2'"); |
| 2294 | |
| 2295 | InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 1'"); |
| 2296 | InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 2'"); |
| 2297 | |
| 2298 | InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 1'"); |
| 2299 | InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 2'"); |
| 2300 | |
| 2301 | InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 1'"); |
| 2302 | InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 2'"); |
| 2303 | |
| 2304 | InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 1'"); |
| 2305 | InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 2'"); |
| 2306 | |
| 2307 | InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 1'"); |
| 2308 | InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 2'"); |
| 2309 | |
| 2310 | InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 1'"); |
| 2311 | InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 2'"); |
| 2312 | |
| 2313 | InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 1'"); |
| 2314 | InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 2'"); |
| 2315 | |
| 2316 | InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 1'"); |
| 2317 | InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 2'"); |
| 2318 | |
| 2319 | InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 1'"); |
| 2320 | InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 2'"); |
| 2321 | |
| 2322 | InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 1'"); |
| 2323 | InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 2'"); |
| 2324 | |
| 2325 | InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 1'"); |
| 2326 | InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 2'"); |
| 2327 | |
| 2328 | InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 1'"); |
| 2329 | InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 2'"); |
| 2330 | |
| 2331 | InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 1'"); |
| 2332 | InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 2'"); |
| 2333 | |
| 2334 | InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 1'"); |
| 2335 | InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 2'"); |
| 2336 | |
| 2337 | InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 1'"); |
| 2338 | InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 2'"); |
| 2339 | |
| 2340 | InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 1'"); |
| 2341 | InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 2'"); |
| 2342 | |
| 2343 | InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 1'"); |
| 2344 | InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 2'"); |
| 2345 | |
| 2346 | InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 1'"); |
| 2347 | InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 2'"); |
| 2348 | |
| 2349 | InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); |
| 2350 | InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); |
| 2351 | |
| 2352 | InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); |
| 2353 | InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); |
| 2354 | |
| 2355 | InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); |
| 2356 | InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); |
| 2357 | |
| 2358 | InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); |
| 2359 | InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); |
| 2360 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2361 | InstructionDesc[OpDPdx].capabilities.push_back(CapabilityShader); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2362 | InstructionDesc[OpDPdx].operands.push(OperandId, "'P'"); |
| 2363 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2364 | InstructionDesc[OpDPdy].capabilities.push_back(CapabilityShader); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2365 | InstructionDesc[OpDPdy].operands.push(OperandId, "'P'"); |
| 2366 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2367 | InstructionDesc[OpFwidth].capabilities.push_back(CapabilityShader); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2368 | InstructionDesc[OpFwidth].operands.push(OperandId, "'P'"); |
| 2369 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2370 | InstructionDesc[OpDPdxFine].capabilities.push_back(CapabilityDerivativeControl); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2371 | InstructionDesc[OpDPdxFine].operands.push(OperandId, "'P'"); |
| 2372 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2373 | InstructionDesc[OpDPdyFine].capabilities.push_back(CapabilityDerivativeControl); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2374 | InstructionDesc[OpDPdyFine].operands.push(OperandId, "'P'"); |
| 2375 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2376 | InstructionDesc[OpFwidthFine].capabilities.push_back(CapabilityDerivativeControl); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2377 | InstructionDesc[OpFwidthFine].operands.push(OperandId, "'P'"); |
| 2378 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2379 | InstructionDesc[OpDPdxCoarse].capabilities.push_back(CapabilityDerivativeControl); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2380 | InstructionDesc[OpDPdxCoarse].operands.push(OperandId, "'P'"); |
| 2381 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2382 | InstructionDesc[OpDPdyCoarse].capabilities.push_back(CapabilityDerivativeControl); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2383 | InstructionDesc[OpDPdyCoarse].operands.push(OperandId, "'P'"); |
| 2384 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2385 | InstructionDesc[OpFwidthCoarse].capabilities.push_back(CapabilityDerivativeControl); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2386 | InstructionDesc[OpFwidthCoarse].operands.push(OperandId, "'P'"); |
| 2387 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2388 | InstructionDesc[OpEmitVertex].capabilities.push_back(CapabilityGeometry); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2389 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2390 | InstructionDesc[OpEndPrimitive].capabilities.push_back(CapabilityGeometry); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2391 | |
| 2392 | InstructionDesc[OpEmitStreamVertex].operands.push(OperandId, "'Stream'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2393 | InstructionDesc[OpEmitStreamVertex].capabilities.push_back(CapabilityGeometryStreams); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2394 | |
| 2395 | InstructionDesc[OpEndStreamPrimitive].operands.push(OperandId, "'Stream'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2396 | InstructionDesc[OpEndStreamPrimitive].capabilities.push_back(CapabilityGeometryStreams); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2397 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2398 | InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Execution'"); |
| 2399 | InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Memory'"); |
| 2400 | InstructionDesc[OpControlBarrier].operands.push(OperandMemorySemantics, "'Semantics'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2401 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2402 | InstructionDesc[OpMemoryBarrier].operands.push(OperandScope, "'Memory'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2403 | InstructionDesc[OpMemoryBarrier].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2404 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2405 | InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Image'"); |
| 2406 | InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Coordinate'"); |
| 2407 | InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Sample'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2408 | |
| 2409 | InstructionDesc[OpAtomicLoad].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2410 | InstructionDesc[OpAtomicLoad].operands.push(OperandScope, "'Scope'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2411 | InstructionDesc[OpAtomicLoad].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2412 | |
| 2413 | InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2414 | InstructionDesc[OpAtomicStore].operands.push(OperandScope, "'Scope'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2415 | InstructionDesc[OpAtomicStore].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2416 | InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Value'"); |
| 2417 | |
| 2418 | InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2419 | InstructionDesc[OpAtomicExchange].operands.push(OperandScope, "'Scope'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2420 | InstructionDesc[OpAtomicExchange].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2421 | InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Value'"); |
| 2422 | |
| 2423 | InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2424 | InstructionDesc[OpAtomicCompareExchange].operands.push(OperandScope, "'Scope'"); |
| 2425 | InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Equal'"); |
| 2426 | InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Unequal'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2427 | InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Value'"); |
| 2428 | InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Comparator'"); |
| 2429 | |
| 2430 | InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2431 | InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandScope, "'Scope'"); |
| 2432 | InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Equal'"); |
| 2433 | InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Unequal'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2434 | InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Value'"); |
| 2435 | InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Comparator'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2436 | InstructionDesc[OpAtomicCompareExchangeWeak].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2437 | |
| 2438 | InstructionDesc[OpAtomicIIncrement].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2439 | InstructionDesc[OpAtomicIIncrement].operands.push(OperandScope, "'Scope'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2440 | InstructionDesc[OpAtomicIIncrement].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2441 | |
| 2442 | InstructionDesc[OpAtomicIDecrement].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2443 | InstructionDesc[OpAtomicIDecrement].operands.push(OperandScope, "'Scope'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2444 | InstructionDesc[OpAtomicIDecrement].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2445 | |
| 2446 | InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2447 | InstructionDesc[OpAtomicIAdd].operands.push(OperandScope, "'Scope'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2448 | InstructionDesc[OpAtomicIAdd].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2449 | InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Value'"); |
| 2450 | |
| 2451 | InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2452 | InstructionDesc[OpAtomicISub].operands.push(OperandScope, "'Scope'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2453 | InstructionDesc[OpAtomicISub].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2454 | InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Value'"); |
| 2455 | |
| 2456 | InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2457 | InstructionDesc[OpAtomicUMin].operands.push(OperandScope, "'Scope'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2458 | InstructionDesc[OpAtomicUMin].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2459 | InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Value'"); |
| 2460 | |
| 2461 | InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2462 | InstructionDesc[OpAtomicUMax].operands.push(OperandScope, "'Scope'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2463 | InstructionDesc[OpAtomicUMax].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2464 | InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Value'"); |
| 2465 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2466 | InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Pointer'"); |
| 2467 | InstructionDesc[OpAtomicSMin].operands.push(OperandScope, "'Scope'"); |
| 2468 | InstructionDesc[OpAtomicSMin].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2469 | InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Value'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2470 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2471 | InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Pointer'"); |
| 2472 | InstructionDesc[OpAtomicSMax].operands.push(OperandScope, "'Scope'"); |
| 2473 | InstructionDesc[OpAtomicSMax].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2474 | InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Value'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2475 | |
| 2476 | InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2477 | InstructionDesc[OpAtomicAnd].operands.push(OperandScope, "'Scope'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2478 | InstructionDesc[OpAtomicAnd].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2479 | InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Value'"); |
| 2480 | |
| 2481 | InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2482 | InstructionDesc[OpAtomicOr].operands.push(OperandScope, "'Scope'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2483 | InstructionDesc[OpAtomicOr].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2484 | InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Value'"); |
| 2485 | |
| 2486 | InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2487 | InstructionDesc[OpAtomicXor].operands.push(OperandScope, "'Scope'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2488 | InstructionDesc[OpAtomicXor].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2489 | InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Value'"); |
| 2490 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2491 | InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandId, "'Pointer'"); |
| 2492 | InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandScope, "'Scope'"); |
| 2493 | InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2494 | InstructionDesc[OpAtomicFlagTestAndSet].capabilities.push_back(CapabilityKernel); |
| 2495 | |
| 2496 | InstructionDesc[OpAtomicFlagClear].operands.push(OperandId, "'Pointer'"); |
| 2497 | InstructionDesc[OpAtomicFlagClear].operands.push(OperandScope, "'Scope'"); |
| 2498 | InstructionDesc[OpAtomicFlagClear].operands.push(OperandMemorySemantics, "'Semantics'"); |
| 2499 | InstructionDesc[OpAtomicFlagClear].capabilities.push_back(CapabilityKernel); |
| 2500 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2501 | InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Merge Block'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2502 | InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Continue Target'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2503 | InstructionDesc[OpLoopMerge].operands.push(OperandLoop, ""); |
| 2504 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2505 | InstructionDesc[OpSelectionMerge].operands.push(OperandId, "'Merge Block'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2506 | InstructionDesc[OpSelectionMerge].operands.push(OperandSelect, ""); |
| 2507 | |
| 2508 | InstructionDesc[OpBranch].operands.push(OperandId, "'Target Label'"); |
| 2509 | |
| 2510 | InstructionDesc[OpBranchConditional].operands.push(OperandId, "'Condition'"); |
| 2511 | InstructionDesc[OpBranchConditional].operands.push(OperandId, "'True Label'"); |
| 2512 | InstructionDesc[OpBranchConditional].operands.push(OperandId, "'False Label'"); |
| 2513 | InstructionDesc[OpBranchConditional].operands.push(OperandVariableLiterals, "'Branch weights'"); |
| 2514 | |
| 2515 | InstructionDesc[OpSwitch].operands.push(OperandId, "'Selector'"); |
| 2516 | InstructionDesc[OpSwitch].operands.push(OperandId, "'Default'"); |
| 2517 | InstructionDesc[OpSwitch].operands.push(OperandVariableLiteralId, "'Target'"); |
| 2518 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2519 | InstructionDesc[OpKill].capabilities.push_back(CapabilityShader); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2520 | |
| 2521 | InstructionDesc[OpReturnValue].operands.push(OperandId, "'Value'"); |
| 2522 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2523 | InstructionDesc[OpLifetimeStart].operands.push(OperandId, "'Pointer'"); |
| 2524 | InstructionDesc[OpLifetimeStart].operands.push(OperandLiteralNumber, "'Size'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2525 | InstructionDesc[OpLifetimeStart].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2526 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2527 | InstructionDesc[OpLifetimeStop].operands.push(OperandId, "'Pointer'"); |
| 2528 | InstructionDesc[OpLifetimeStop].operands.push(OperandLiteralNumber, "'Size'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2529 | InstructionDesc[OpLifetimeStop].capabilities.push_back(CapabilityKernel); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2530 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2531 | InstructionDesc[OpGroupAsyncCopy].capabilities.push_back(CapabilityKernel); |
| 2532 | InstructionDesc[OpGroupAsyncCopy].operands.push(OperandScope, "'Execution'"); |
| 2533 | InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Destination'"); |
| 2534 | InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Source'"); |
| 2535 | InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Num Elements'"); |
| 2536 | InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Stride'"); |
| 2537 | InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Event'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2538 | |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2539 | InstructionDesc[OpGroupWaitEvents].capabilities.push_back(CapabilityKernel); |
| 2540 | InstructionDesc[OpGroupWaitEvents].operands.push(OperandScope, "'Execution'"); |
| 2541 | InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Num Events'"); |
| 2542 | InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Events List'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2543 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2544 | InstructionDesc[OpGroupAll].capabilities.push_back(CapabilityGroups); |
| 2545 | InstructionDesc[OpGroupAll].operands.push(OperandScope, "'Execution'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2546 | InstructionDesc[OpGroupAll].operands.push(OperandId, "'Predicate'"); |
| 2547 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2548 | InstructionDesc[OpGroupAny].capabilities.push_back(CapabilityGroups); |
| 2549 | InstructionDesc[OpGroupAny].operands.push(OperandScope, "'Execution'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2550 | InstructionDesc[OpGroupAny].operands.push(OperandId, "'Predicate'"); |
| 2551 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2552 | InstructionDesc[OpGroupBroadcast].capabilities.push_back(CapabilityGroups); |
| 2553 | InstructionDesc[OpGroupBroadcast].operands.push(OperandScope, "'Execution'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2554 | InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'Value'"); |
| 2555 | InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'LocalId'"); |
| 2556 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2557 | InstructionDesc[OpGroupIAdd].capabilities.push_back(CapabilityGroups); |
| 2558 | InstructionDesc[OpGroupIAdd].operands.push(OperandScope, "'Execution'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2559 | InstructionDesc[OpGroupIAdd].operands.push(OperandGroupOperation, "'Operation'"); |
| 2560 | InstructionDesc[OpGroupIAdd].operands.push(OperandId, "'X'"); |
| 2561 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2562 | InstructionDesc[OpGroupFAdd].capabilities.push_back(CapabilityGroups); |
| 2563 | InstructionDesc[OpGroupFAdd].operands.push(OperandScope, "'Execution'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2564 | InstructionDesc[OpGroupFAdd].operands.push(OperandGroupOperation, "'Operation'"); |
| 2565 | InstructionDesc[OpGroupFAdd].operands.push(OperandId, "'X'"); |
| 2566 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2567 | InstructionDesc[OpGroupUMin].capabilities.push_back(CapabilityGroups); |
| 2568 | InstructionDesc[OpGroupUMin].operands.push(OperandScope, "'Execution'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2569 | InstructionDesc[OpGroupUMin].operands.push(OperandGroupOperation, "'Operation'"); |
| 2570 | InstructionDesc[OpGroupUMin].operands.push(OperandId, "'X'"); |
| 2571 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2572 | InstructionDesc[OpGroupSMin].capabilities.push_back(CapabilityGroups); |
| 2573 | InstructionDesc[OpGroupSMin].operands.push(OperandScope, "'Execution'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2574 | InstructionDesc[OpGroupSMin].operands.push(OperandGroupOperation, "'Operation'"); |
| 2575 | InstructionDesc[OpGroupSMin].operands.push(OperandId, "X"); |
| 2576 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2577 | InstructionDesc[OpGroupFMin].capabilities.push_back(CapabilityGroups); |
| 2578 | InstructionDesc[OpGroupFMin].operands.push(OperandScope, "'Execution'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2579 | InstructionDesc[OpGroupFMin].operands.push(OperandGroupOperation, "'Operation'"); |
| 2580 | InstructionDesc[OpGroupFMin].operands.push(OperandId, "X"); |
| 2581 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2582 | InstructionDesc[OpGroupUMax].capabilities.push_back(CapabilityGroups); |
| 2583 | InstructionDesc[OpGroupUMax].operands.push(OperandScope, "'Execution'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2584 | InstructionDesc[OpGroupUMax].operands.push(OperandGroupOperation, "'Operation'"); |
| 2585 | InstructionDesc[OpGroupUMax].operands.push(OperandId, "X"); |
| 2586 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2587 | InstructionDesc[OpGroupSMax].capabilities.push_back(CapabilityGroups); |
| 2588 | InstructionDesc[OpGroupSMax].operands.push(OperandScope, "'Execution'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2589 | InstructionDesc[OpGroupSMax].operands.push(OperandGroupOperation, "'Operation'"); |
| 2590 | InstructionDesc[OpGroupSMax].operands.push(OperandId, "X"); |
| 2591 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2592 | InstructionDesc[OpGroupFMax].capabilities.push_back(CapabilityGroups); |
| 2593 | InstructionDesc[OpGroupFMax].operands.push(OperandScope, "'Execution'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2594 | InstructionDesc[OpGroupFMax].operands.push(OperandGroupOperation, "'Operation'"); |
| 2595 | InstructionDesc[OpGroupFMax].operands.push(OperandId, "X"); |
| 2596 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2597 | InstructionDesc[OpReadPipe].capabilities.push_back(CapabilityPipes); |
| 2598 | InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pipe'"); |
| 2599 | InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2600 | InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Size'"); |
| 2601 | InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Alignment'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2602 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2603 | InstructionDesc[OpWritePipe].capabilities.push_back(CapabilityPipes); |
| 2604 | InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pipe'"); |
| 2605 | InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2606 | InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Size'"); |
| 2607 | InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Alignment'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2608 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2609 | InstructionDesc[OpReservedReadPipe].capabilities.push_back(CapabilityPipes); |
| 2610 | InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pipe'"); |
| 2611 | InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Reserve Id'"); |
| 2612 | InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Index'"); |
| 2613 | InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2614 | InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Size'"); |
| 2615 | InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Alignment'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2616 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2617 | InstructionDesc[OpReservedWritePipe].capabilities.push_back(CapabilityPipes); |
| 2618 | InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pipe'"); |
| 2619 | InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Reserve Id'"); |
| 2620 | InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Index'"); |
| 2621 | InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pointer'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2622 | InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Size'"); |
| 2623 | InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Alignment'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2624 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2625 | InstructionDesc[OpReserveReadPipePackets].capabilities.push_back(CapabilityPipes); |
| 2626 | InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Pipe'"); |
| 2627 | InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Num Packets'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2628 | InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Size'"); |
| 2629 | InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2630 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2631 | InstructionDesc[OpReserveWritePipePackets].capabilities.push_back(CapabilityPipes); |
| 2632 | InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Pipe'"); |
| 2633 | InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Num Packets'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2634 | InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Size'"); |
| 2635 | InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2636 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2637 | InstructionDesc[OpCommitReadPipe].capabilities.push_back(CapabilityPipes); |
| 2638 | InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Pipe'"); |
| 2639 | InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Reserve Id'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2640 | InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Size'"); |
| 2641 | InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Alignment'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2642 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2643 | InstructionDesc[OpCommitWritePipe].capabilities.push_back(CapabilityPipes); |
| 2644 | InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Pipe'"); |
| 2645 | InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Reserve Id'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2646 | InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Size'"); |
| 2647 | InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Alignment'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2648 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2649 | InstructionDesc[OpIsValidReserveId].capabilities.push_back(CapabilityPipes); |
| 2650 | InstructionDesc[OpIsValidReserveId].operands.push(OperandId, "'Reserve Id'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2651 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2652 | InstructionDesc[OpGetNumPipePackets].capabilities.push_back(CapabilityPipes); |
| 2653 | InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Pipe'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2654 | InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Size'"); |
| 2655 | InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Alignment'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2656 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2657 | InstructionDesc[OpGetMaxPipePackets].capabilities.push_back(CapabilityPipes); |
| 2658 | InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Pipe'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2659 | InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Size'"); |
| 2660 | InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Alignment'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2661 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2662 | InstructionDesc[OpGroupReserveReadPipePackets].capabilities.push_back(CapabilityPipes); |
| 2663 | InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandScope, "'Execution'"); |
| 2664 | InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Pipe'"); |
| 2665 | InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Num Packets'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2666 | InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Size'"); |
| 2667 | InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2668 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2669 | InstructionDesc[OpGroupReserveWritePipePackets].capabilities.push_back(CapabilityPipes); |
| 2670 | InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandScope, "'Execution'"); |
| 2671 | InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Pipe'"); |
| 2672 | InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Num Packets'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2673 | InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Size'"); |
| 2674 | InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2675 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2676 | InstructionDesc[OpGroupCommitReadPipe].capabilities.push_back(CapabilityPipes); |
| 2677 | InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandScope, "'Execution'"); |
| 2678 | InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Pipe'"); |
| 2679 | InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Reserve Id'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2680 | InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Size'"); |
| 2681 | InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Alignment'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2682 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2683 | InstructionDesc[OpGroupCommitWritePipe].capabilities.push_back(CapabilityPipes); |
| 2684 | InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandScope, "'Execution'"); |
| 2685 | InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Pipe'"); |
| 2686 | InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Reserve Id'"); |
John Kessenich | 55e7d11 | 2015-11-15 21:33:39 -0700 | [diff] [blame] | 2687 | InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Size'"); |
| 2688 | InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Alignment'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2689 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2690 | InstructionDesc[OpBuildNDRange].capabilities.push_back(CapabilityDeviceEnqueue); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2691 | InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkSize'"); |
| 2692 | InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'LocalWorkSize'"); |
| 2693 | InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkOffset'"); |
| 2694 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2695 | InstructionDesc[OpGetDefaultQueue].capabilities.push_back(CapabilityDeviceEnqueue); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2696 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2697 | InstructionDesc[OpCaptureEventProfilingInfo].capabilities.push_back(CapabilityDeviceEnqueue); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2698 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2699 | InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Event'"); |
| 2700 | InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Profiling Info'"); |
| 2701 | InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Value'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2702 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2703 | InstructionDesc[OpSetUserEventStatus].capabilities.push_back(CapabilityDeviceEnqueue); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2704 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2705 | InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Event'"); |
| 2706 | InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Status'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2707 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2708 | InstructionDesc[OpIsValidEvent].capabilities.push_back(CapabilityDeviceEnqueue); |
| 2709 | InstructionDesc[OpIsValidEvent].operands.push(OperandId, "'Event'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2710 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2711 | InstructionDesc[OpCreateUserEvent].capabilities.push_back(CapabilityDeviceEnqueue); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2712 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2713 | InstructionDesc[OpRetainEvent].capabilities.push_back(CapabilityDeviceEnqueue); |
| 2714 | InstructionDesc[OpRetainEvent].operands.push(OperandId, "'Event'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2715 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2716 | InstructionDesc[OpReleaseEvent].capabilities.push_back(CapabilityDeviceEnqueue); |
| 2717 | InstructionDesc[OpReleaseEvent].operands.push(OperandId, "'Event'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2718 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2719 | InstructionDesc[OpGetKernelWorkGroupSize].capabilities.push_back(CapabilityDeviceEnqueue); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2720 | InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Invoke'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2721 | InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param'"); |
| 2722 | InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Size'"); |
| 2723 | InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Align'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2724 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2725 | InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].capabilities.push_back(CapabilityDeviceEnqueue); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2726 | InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Invoke'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2727 | InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param'"); |
| 2728 | InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Size'"); |
| 2729 | InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Align'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2730 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2731 | InstructionDesc[OpGetKernelNDrangeSubGroupCount].capabilities.push_back(CapabilityDeviceEnqueue); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2732 | InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'ND Range'"); |
| 2733 | InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Invoke'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2734 | InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param'"); |
| 2735 | InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Size'"); |
| 2736 | InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Align'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2737 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2738 | InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].capabilities.push_back(CapabilityDeviceEnqueue); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2739 | InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'ND Range'"); |
| 2740 | InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Invoke'"); |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2741 | InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param'"); |
| 2742 | InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Size'"); |
| 2743 | InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Align'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2744 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2745 | InstructionDesc[OpEnqueueKernel].capabilities.push_back(CapabilityDeviceEnqueue); |
| 2746 | InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Queue'"); |
| 2747 | InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Flags'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2748 | InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'ND Range'"); |
| 2749 | InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Num Events'"); |
| 2750 | InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Wait Events'"); |
| 2751 | InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Ret Event'"); |
| 2752 | InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Invoke'"); |
| 2753 | InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param'"); |
| 2754 | InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Size'"); |
| 2755 | InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Align'"); |
| 2756 | InstructionDesc[OpEnqueueKernel].operands.push(OperandVariableIds, "'Local Size'"); |
| 2757 | |
John Kessenich | 5e4b124 | 2015-08-06 22:53:06 -0600 | [diff] [blame] | 2758 | InstructionDesc[OpEnqueueMarker].capabilities.push_back(CapabilityDeviceEnqueue); |
| 2759 | InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Queue'"); |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2760 | InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Num Events'"); |
| 2761 | InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Wait Events'"); |
| 2762 | InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Ret Event'"); |
Rex Xu | 9d93a23 | 2016-05-05 12:30:44 +0800 | [diff] [blame] | 2763 | |
Rex Xu | 5159664 | 2016-09-21 18:56:12 +0800 | [diff] [blame] | 2764 | InstructionDesc[OpSubgroupBallotKHR].operands.push(OperandId, "'Predicate'"); |
| 2765 | |
| 2766 | InstructionDesc[OpSubgroupFirstInvocationKHR].operands.push(OperandId, "'Value'"); |
| 2767 | |
chaoc | f200da8 | 2016-12-20 12:44:35 -0800 | [diff] [blame^] | 2768 | InstructionDesc[OpSubgroupReadInvocationKHR].capabilities.push_back(CapabilityGroups); |
| 2769 | InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Value'"); |
| 2770 | InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Index'"); |
| 2771 | |
Rex Xu | 9d93a23 | 2016-05-05 12:30:44 +0800 | [diff] [blame] | 2772 | #ifdef AMD_EXTENSIONS |
| 2773 | InstructionDesc[OpGroupIAddNonUniformAMD].capabilities.push_back(CapabilityGroups); |
| 2774 | InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandScope, "'Execution'"); |
| 2775 | InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); |
| 2776 | InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandId, "'X'"); |
| 2777 | |
| 2778 | InstructionDesc[OpGroupFAddNonUniformAMD].capabilities.push_back(CapabilityGroups); |
| 2779 | InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandScope, "'Execution'"); |
| 2780 | InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); |
| 2781 | InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandId, "'X'"); |
| 2782 | |
| 2783 | InstructionDesc[OpGroupUMinNonUniformAMD].capabilities.push_back(CapabilityGroups); |
| 2784 | InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); |
| 2785 | InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); |
| 2786 | InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandId, "'X'"); |
| 2787 | |
| 2788 | InstructionDesc[OpGroupSMinNonUniformAMD].capabilities.push_back(CapabilityGroups); |
| 2789 | InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); |
| 2790 | InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); |
| 2791 | InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandId, "X"); |
| 2792 | |
| 2793 | InstructionDesc[OpGroupFMinNonUniformAMD].capabilities.push_back(CapabilityGroups); |
| 2794 | InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); |
| 2795 | InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); |
| 2796 | InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandId, "X"); |
| 2797 | |
| 2798 | InstructionDesc[OpGroupUMaxNonUniformAMD].capabilities.push_back(CapabilityGroups); |
| 2799 | InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); |
| 2800 | InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); |
| 2801 | InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandId, "X"); |
| 2802 | |
| 2803 | InstructionDesc[OpGroupSMaxNonUniformAMD].capabilities.push_back(CapabilityGroups); |
| 2804 | InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); |
| 2805 | InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); |
| 2806 | InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandId, "X"); |
| 2807 | |
| 2808 | InstructionDesc[OpGroupFMaxNonUniformAMD].capabilities.push_back(CapabilityGroups); |
| 2809 | InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); |
| 2810 | InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); |
| 2811 | InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandId, "X"); |
| 2812 | #endif |
John Kessenich | 140f3df | 2015-06-26 16:58:36 -0600 | [diff] [blame] | 2813 | } |
| 2814 | |
| 2815 | }; // end spv namespace |