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