spirv.hpp11 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880
  1. // Copyright (c) 2014-2016 The Khronos Group Inc.
  2. //
  3. // Permission is hereby granted, free of charge, to any person obtaining a copy
  4. // of this software and/or associated documentation files (the "Materials"),
  5. // to deal in the Materials without restriction, including without limitation
  6. // the rights to use, copy, modify, merge, publish, distribute, sublicense,
  7. // and/or sell copies of the Materials, and to permit persons to whom the
  8. // Materials are furnished to do so, subject to the following conditions:
  9. //
  10. // The above copyright notice and this permission notice shall be included in
  11. // all copies or substantial portions of the Materials.
  12. //
  13. // MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
  14. // STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
  15. // HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
  16. //
  17. // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  18. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  20. // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  22. // FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
  23. // IN THE MATERIALS.
  24. // This header is automatically generated by the same tool that creates
  25. // the Binary Section of the SPIR-V specification.
  26. // Enumeration tokens for SPIR-V, in various styles:
  27. // C, C++, C++11, JSON, Lua, Python
  28. //
  29. // - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
  30. // - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
  31. // - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
  32. // - Lua will use tables, e.g.: spv.SourceLanguage.GLSL
  33. // - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']
  34. //
  35. // Some tokens act like mask values, which can be OR'd together,
  36. // while others are mutually exclusive. The mask-like ones have
  37. // "Mask" in their name, and a parallel enum that has the shift
  38. // amount (1 << x) for each corresponding enumerant.
  39. #ifndef spirv_HPP
  40. #define spirv_HPP
  41. namespace spv {
  42. typedef unsigned int Id;
  43. #define SPV_VERSION 0x10000
  44. #define SPV_REVISION 3
  45. static const unsigned int MagicNumber = 0x07230203;
  46. static const unsigned int Version = 0x00010000;
  47. static const unsigned int Revision = 3;
  48. static const unsigned int OpCodeMask = 0xffff;
  49. static const unsigned int WordCountShift = 16;
  50. enum class SourceLanguage : unsigned {
  51. Unknown = 0,
  52. ESSL = 1,
  53. GLSL = 2,
  54. OpenCL_C = 3,
  55. OpenCL_CPP = 4,
  56. };
  57. enum class ExecutionModel : unsigned {
  58. Vertex = 0,
  59. TessellationControl = 1,
  60. TessellationEvaluation = 2,
  61. Geometry = 3,
  62. Fragment = 4,
  63. GLCompute = 5,
  64. Kernel = 6,
  65. };
  66. enum class AddressingModel : unsigned {
  67. Logical = 0,
  68. Physical32 = 1,
  69. Physical64 = 2,
  70. };
  71. enum class MemoryModel : unsigned {
  72. Simple = 0,
  73. GLSL450 = 1,
  74. OpenCL = 2,
  75. };
  76. enum class ExecutionMode : unsigned {
  77. Invocations = 0,
  78. SpacingEqual = 1,
  79. SpacingFractionalEven = 2,
  80. SpacingFractionalOdd = 3,
  81. VertexOrderCw = 4,
  82. VertexOrderCcw = 5,
  83. PixelCenterInteger = 6,
  84. OriginUpperLeft = 7,
  85. OriginLowerLeft = 8,
  86. EarlyFragmentTests = 9,
  87. PointMode = 10,
  88. Xfb = 11,
  89. DepthReplacing = 12,
  90. DepthGreater = 14,
  91. DepthLess = 15,
  92. DepthUnchanged = 16,
  93. LocalSize = 17,
  94. LocalSizeHint = 18,
  95. InputPoints = 19,
  96. InputLines = 20,
  97. InputLinesAdjacency = 21,
  98. Triangles = 22,
  99. InputTrianglesAdjacency = 23,
  100. Quads = 24,
  101. Isolines = 25,
  102. OutputVertices = 26,
  103. OutputPoints = 27,
  104. OutputLineStrip = 28,
  105. OutputTriangleStrip = 29,
  106. VecTypeHint = 30,
  107. ContractionOff = 31,
  108. };
  109. enum class StorageClass : unsigned {
  110. UniformConstant = 0,
  111. Input = 1,
  112. Uniform = 2,
  113. Output = 3,
  114. Workgroup = 4,
  115. CrossWorkgroup = 5,
  116. Private = 6,
  117. Function = 7,
  118. Generic = 8,
  119. PushConstant = 9,
  120. AtomicCounter = 10,
  121. Image = 11,
  122. };
  123. enum class Dim : unsigned {
  124. Dim1D = 0,
  125. Dim2D = 1,
  126. Dim3D = 2,
  127. Cube = 3,
  128. Rect = 4,
  129. Buffer = 5,
  130. SubpassData = 6,
  131. };
  132. enum class SamplerAddressingMode : unsigned {
  133. None = 0,
  134. ClampToEdge = 1,
  135. Clamp = 2,
  136. Repeat = 3,
  137. RepeatMirrored = 4,
  138. };
  139. enum class SamplerFilterMode : unsigned {
  140. Nearest = 0,
  141. Linear = 1,
  142. };
  143. enum class ImageFormat : unsigned {
  144. Unknown = 0,
  145. Rgba32f = 1,
  146. Rgba16f = 2,
  147. R32f = 3,
  148. Rgba8 = 4,
  149. Rgba8Snorm = 5,
  150. Rg32f = 6,
  151. Rg16f = 7,
  152. R11fG11fB10f = 8,
  153. R16f = 9,
  154. Rgba16 = 10,
  155. Rgb10A2 = 11,
  156. Rg16 = 12,
  157. Rg8 = 13,
  158. R16 = 14,
  159. R8 = 15,
  160. Rgba16Snorm = 16,
  161. Rg16Snorm = 17,
  162. Rg8Snorm = 18,
  163. R16Snorm = 19,
  164. R8Snorm = 20,
  165. Rgba32i = 21,
  166. Rgba16i = 22,
  167. Rgba8i = 23,
  168. R32i = 24,
  169. Rg32i = 25,
  170. Rg16i = 26,
  171. Rg8i = 27,
  172. R16i = 28,
  173. R8i = 29,
  174. Rgba32ui = 30,
  175. Rgba16ui = 31,
  176. Rgba8ui = 32,
  177. R32ui = 33,
  178. Rgb10a2ui = 34,
  179. Rg32ui = 35,
  180. Rg16ui = 36,
  181. Rg8ui = 37,
  182. R16ui = 38,
  183. R8ui = 39,
  184. };
  185. enum class ImageChannelOrder : unsigned {
  186. R = 0,
  187. A = 1,
  188. RG = 2,
  189. RA = 3,
  190. RGB = 4,
  191. RGBA = 5,
  192. BGRA = 6,
  193. ARGB = 7,
  194. Intensity = 8,
  195. Luminance = 9,
  196. Rx = 10,
  197. RGx = 11,
  198. RGBx = 12,
  199. Depth = 13,
  200. DepthStencil = 14,
  201. sRGB = 15,
  202. sRGBx = 16,
  203. sRGBA = 17,
  204. sBGRA = 18,
  205. };
  206. enum class ImageChannelDataType : unsigned {
  207. SnormInt8 = 0,
  208. SnormInt16 = 1,
  209. UnormInt8 = 2,
  210. UnormInt16 = 3,
  211. UnormShort565 = 4,
  212. UnormShort555 = 5,
  213. UnormInt101010 = 6,
  214. SignedInt8 = 7,
  215. SignedInt16 = 8,
  216. SignedInt32 = 9,
  217. UnsignedInt8 = 10,
  218. UnsignedInt16 = 11,
  219. UnsignedInt32 = 12,
  220. HalfFloat = 13,
  221. Float = 14,
  222. UnormInt24 = 15,
  223. UnormInt101010_2 = 16,
  224. };
  225. enum class ImageOperandsShift : unsigned {
  226. Bias = 0,
  227. Lod = 1,
  228. Grad = 2,
  229. ConstOffset = 3,
  230. Offset = 4,
  231. ConstOffsets = 5,
  232. Sample = 6,
  233. MinLod = 7,
  234. };
  235. enum class ImageOperandsMask : unsigned {
  236. MaskNone = 0,
  237. Bias = 0x00000001,
  238. Lod = 0x00000002,
  239. Grad = 0x00000004,
  240. ConstOffset = 0x00000008,
  241. Offset = 0x00000010,
  242. ConstOffsets = 0x00000020,
  243. Sample = 0x00000040,
  244. MinLod = 0x00000080,
  245. };
  246. enum class FPFastMathModeShift : unsigned {
  247. NotNaN = 0,
  248. NotInf = 1,
  249. NSZ = 2,
  250. AllowRecip = 3,
  251. Fast = 4,
  252. };
  253. enum class FPFastMathModeMask : unsigned {
  254. MaskNone = 0,
  255. NotNaN = 0x00000001,
  256. NotInf = 0x00000002,
  257. NSZ = 0x00000004,
  258. AllowRecip = 0x00000008,
  259. Fast = 0x00000010,
  260. };
  261. enum class FPRoundingMode : unsigned {
  262. RTE = 0,
  263. RTZ = 1,
  264. RTP = 2,
  265. RTN = 3,
  266. };
  267. enum class LinkageType : unsigned {
  268. Export = 0,
  269. Import = 1,
  270. };
  271. enum class AccessQualifier : unsigned {
  272. ReadOnly = 0,
  273. WriteOnly = 1,
  274. ReadWrite = 2,
  275. };
  276. enum class FunctionParameterAttribute : unsigned {
  277. Zext = 0,
  278. Sext = 1,
  279. ByVal = 2,
  280. Sret = 3,
  281. NoAlias = 4,
  282. NoCapture = 5,
  283. NoWrite = 6,
  284. NoReadWrite = 7,
  285. };
  286. enum class Decoration : unsigned {
  287. RelaxedPrecision = 0,
  288. SpecId = 1,
  289. Block = 2,
  290. BufferBlock = 3,
  291. RowMajor = 4,
  292. ColMajor = 5,
  293. ArrayStride = 6,
  294. MatrixStride = 7,
  295. GLSLShared = 8,
  296. GLSLPacked = 9,
  297. CPacked = 10,
  298. BuiltIn = 11,
  299. NoPerspective = 13,
  300. Flat = 14,
  301. Patch = 15,
  302. Centroid = 16,
  303. Sample = 17,
  304. Invariant = 18,
  305. Restrict = 19,
  306. Aliased = 20,
  307. Volatile = 21,
  308. Constant = 22,
  309. Coherent = 23,
  310. NonWritable = 24,
  311. NonReadable = 25,
  312. Uniform = 26,
  313. SaturatedConversion = 28,
  314. Stream = 29,
  315. Location = 30,
  316. Component = 31,
  317. Index = 32,
  318. Binding = 33,
  319. DescriptorSet = 34,
  320. Offset = 35,
  321. XfbBuffer = 36,
  322. XfbStride = 37,
  323. FuncParamAttr = 38,
  324. FPRoundingMode = 39,
  325. FPFastMathMode = 40,
  326. LinkageAttributes = 41,
  327. NoContraction = 42,
  328. InputAttachmentIndex = 43,
  329. Alignment = 44,
  330. };
  331. enum class BuiltIn : unsigned {
  332. Position = 0,
  333. PointSize = 1,
  334. ClipDistance = 3,
  335. CullDistance = 4,
  336. VertexId = 5,
  337. InstanceId = 6,
  338. PrimitiveId = 7,
  339. InvocationId = 8,
  340. Layer = 9,
  341. ViewportIndex = 10,
  342. TessLevelOuter = 11,
  343. TessLevelInner = 12,
  344. TessCoord = 13,
  345. PatchVertices = 14,
  346. FragCoord = 15,
  347. PointCoord = 16,
  348. FrontFacing = 17,
  349. SampleId = 18,
  350. SamplePosition = 19,
  351. SampleMask = 20,
  352. FragDepth = 22,
  353. HelperInvocation = 23,
  354. NumWorkgroups = 24,
  355. WorkgroupSize = 25,
  356. WorkgroupId = 26,
  357. LocalInvocationId = 27,
  358. GlobalInvocationId = 28,
  359. LocalInvocationIndex = 29,
  360. WorkDim = 30,
  361. GlobalSize = 31,
  362. EnqueuedWorkgroupSize = 32,
  363. GlobalOffset = 33,
  364. GlobalLinearId = 34,
  365. SubgroupSize = 36,
  366. SubgroupMaxSize = 37,
  367. NumSubgroups = 38,
  368. NumEnqueuedSubgroups = 39,
  369. SubgroupId = 40,
  370. SubgroupLocalInvocationId = 41,
  371. VertexIndex = 42,
  372. InstanceIndex = 43,
  373. };
  374. enum class SelectionControlShift : unsigned {
  375. Flatten = 0,
  376. DontFlatten = 1,
  377. };
  378. enum class SelectionControlMask : unsigned {
  379. MaskNone = 0,
  380. Flatten = 0x00000001,
  381. DontFlatten = 0x00000002,
  382. };
  383. enum class LoopControlShift : unsigned {
  384. Unroll = 0,
  385. DontUnroll = 1,
  386. };
  387. enum class LoopControlMask : unsigned {
  388. MaskNone = 0,
  389. Unroll = 0x00000001,
  390. DontUnroll = 0x00000002,
  391. };
  392. enum class FunctionControlShift : unsigned {
  393. Inline = 0,
  394. DontInline = 1,
  395. Pure = 2,
  396. Const = 3,
  397. };
  398. enum class FunctionControlMask : unsigned {
  399. MaskNone = 0,
  400. Inline = 0x00000001,
  401. DontInline = 0x00000002,
  402. Pure = 0x00000004,
  403. Const = 0x00000008,
  404. };
  405. enum class MemorySemanticsShift : unsigned {
  406. Acquire = 1,
  407. Release = 2,
  408. AcquireRelease = 3,
  409. SequentiallyConsistent = 4,
  410. UniformMemory = 6,
  411. SubgroupMemory = 7,
  412. WorkgroupMemory = 8,
  413. CrossWorkgroupMemory = 9,
  414. AtomicCounterMemory = 10,
  415. ImageMemory = 11,
  416. };
  417. enum class MemorySemanticsMask : unsigned {
  418. MaskNone = 0,
  419. Acquire = 0x00000002,
  420. Release = 0x00000004,
  421. AcquireRelease = 0x00000008,
  422. SequentiallyConsistent = 0x00000010,
  423. UniformMemory = 0x00000040,
  424. SubgroupMemory = 0x00000080,
  425. WorkgroupMemory = 0x00000100,
  426. CrossWorkgroupMemory = 0x00000200,
  427. AtomicCounterMemory = 0x00000400,
  428. ImageMemory = 0x00000800,
  429. };
  430. enum class MemoryAccessShift : unsigned {
  431. Volatile = 0,
  432. Aligned = 1,
  433. Nontemporal = 2,
  434. };
  435. enum class MemoryAccessMask : unsigned {
  436. MaskNone = 0,
  437. Volatile = 0x00000001,
  438. Aligned = 0x00000002,
  439. Nontemporal = 0x00000004,
  440. };
  441. enum class Scope : unsigned {
  442. CrossDevice = 0,
  443. Device = 1,
  444. Workgroup = 2,
  445. Subgroup = 3,
  446. Invocation = 4,
  447. };
  448. enum class GroupOperation : unsigned {
  449. Reduce = 0,
  450. InclusiveScan = 1,
  451. ExclusiveScan = 2,
  452. };
  453. enum class KernelEnqueueFlags : unsigned {
  454. NoWait = 0,
  455. WaitKernel = 1,
  456. WaitWorkGroup = 2,
  457. };
  458. enum class KernelProfilingInfoShift : unsigned {
  459. CmdExecTime = 0,
  460. };
  461. enum class KernelProfilingInfoMask : unsigned {
  462. MaskNone = 0,
  463. CmdExecTime = 0x00000001,
  464. };
  465. enum class Capability : unsigned {
  466. Matrix = 0,
  467. Shader = 1,
  468. Geometry = 2,
  469. Tessellation = 3,
  470. Addresses = 4,
  471. Linkage = 5,
  472. Kernel = 6,
  473. Vector16 = 7,
  474. Float16Buffer = 8,
  475. Float16 = 9,
  476. Float64 = 10,
  477. Int64 = 11,
  478. Int64Atomics = 12,
  479. ImageBasic = 13,
  480. ImageReadWrite = 14,
  481. ImageMipmap = 15,
  482. Pipes = 17,
  483. Groups = 18,
  484. DeviceEnqueue = 19,
  485. LiteralSampler = 20,
  486. AtomicStorage = 21,
  487. Int16 = 22,
  488. TessellationPointSize = 23,
  489. GeometryPointSize = 24,
  490. ImageGatherExtended = 25,
  491. StorageImageMultisample = 27,
  492. UniformBufferArrayDynamicIndexing = 28,
  493. SampledImageArrayDynamicIndexing = 29,
  494. StorageBufferArrayDynamicIndexing = 30,
  495. StorageImageArrayDynamicIndexing = 31,
  496. ClipDistance = 32,
  497. CullDistance = 33,
  498. ImageCubeArray = 34,
  499. SampleRateShading = 35,
  500. ImageRect = 36,
  501. SampledRect = 37,
  502. GenericPointer = 38,
  503. Int8 = 39,
  504. InputAttachment = 40,
  505. SparseResidency = 41,
  506. MinLod = 42,
  507. Sampled1D = 43,
  508. Image1D = 44,
  509. SampledCubeArray = 45,
  510. SampledBuffer = 46,
  511. ImageBuffer = 47,
  512. ImageMSArray = 48,
  513. StorageImageExtendedFormats = 49,
  514. ImageQuery = 50,
  515. DerivativeControl = 51,
  516. InterpolationFunction = 52,
  517. TransformFeedback = 53,
  518. GeometryStreams = 54,
  519. StorageImageReadWithoutFormat = 55,
  520. StorageImageWriteWithoutFormat = 56,
  521. MultiViewport = 57,
  522. };
  523. enum class Op : unsigned {
  524. OpNop = 0,
  525. OpUndef = 1,
  526. OpSourceContinued = 2,
  527. OpSource = 3,
  528. OpSourceExtension = 4,
  529. OpName = 5,
  530. OpMemberName = 6,
  531. OpString = 7,
  532. OpLine = 8,
  533. OpExtension = 10,
  534. OpExtInstImport = 11,
  535. OpExtInst = 12,
  536. OpMemoryModel = 14,
  537. OpEntryPoint = 15,
  538. OpExecutionMode = 16,
  539. OpCapability = 17,
  540. OpTypeVoid = 19,
  541. OpTypeBool = 20,
  542. OpTypeInt = 21,
  543. OpTypeFloat = 22,
  544. OpTypeVector = 23,
  545. OpTypeMatrix = 24,
  546. OpTypeImage = 25,
  547. OpTypeSampler = 26,
  548. OpTypeSampledImage = 27,
  549. OpTypeArray = 28,
  550. OpTypeRuntimeArray = 29,
  551. OpTypeStruct = 30,
  552. OpTypeOpaque = 31,
  553. OpTypePointer = 32,
  554. OpTypeFunction = 33,
  555. OpTypeEvent = 34,
  556. OpTypeDeviceEvent = 35,
  557. OpTypeReserveId = 36,
  558. OpTypeQueue = 37,
  559. OpTypePipe = 38,
  560. OpTypeForwardPointer = 39,
  561. OpConstantTrue = 41,
  562. OpConstantFalse = 42,
  563. OpConstant = 43,
  564. OpConstantComposite = 44,
  565. OpConstantSampler = 45,
  566. OpConstantNull = 46,
  567. OpSpecConstantTrue = 48,
  568. OpSpecConstantFalse = 49,
  569. OpSpecConstant = 50,
  570. OpSpecConstantComposite = 51,
  571. OpSpecConstantOp = 52,
  572. OpFunction = 54,
  573. OpFunctionParameter = 55,
  574. OpFunctionEnd = 56,
  575. OpFunctionCall = 57,
  576. OpVariable = 59,
  577. OpImageTexelPointer = 60,
  578. OpLoad = 61,
  579. OpStore = 62,
  580. OpCopyMemory = 63,
  581. OpCopyMemorySized = 64,
  582. OpAccessChain = 65,
  583. OpInBoundsAccessChain = 66,
  584. OpPtrAccessChain = 67,
  585. OpArrayLength = 68,
  586. OpGenericPtrMemSemantics = 69,
  587. OpInBoundsPtrAccessChain = 70,
  588. OpDecorate = 71,
  589. OpMemberDecorate = 72,
  590. OpDecorationGroup = 73,
  591. OpGroupDecorate = 74,
  592. OpGroupMemberDecorate = 75,
  593. OpVectorExtractDynamic = 77,
  594. OpVectorInsertDynamic = 78,
  595. OpVectorShuffle = 79,
  596. OpCompositeConstruct = 80,
  597. OpCompositeExtract = 81,
  598. OpCompositeInsert = 82,
  599. OpCopyObject = 83,
  600. OpTranspose = 84,
  601. OpSampledImage = 86,
  602. OpImageSampleImplicitLod = 87,
  603. OpImageSampleExplicitLod = 88,
  604. OpImageSampleDrefImplicitLod = 89,
  605. OpImageSampleDrefExplicitLod = 90,
  606. OpImageSampleProjImplicitLod = 91,
  607. OpImageSampleProjExplicitLod = 92,
  608. OpImageSampleProjDrefImplicitLod = 93,
  609. OpImageSampleProjDrefExplicitLod = 94,
  610. OpImageFetch = 95,
  611. OpImageGather = 96,
  612. OpImageDrefGather = 97,
  613. OpImageRead = 98,
  614. OpImageWrite = 99,
  615. OpImage = 100,
  616. OpImageQueryFormat = 101,
  617. OpImageQueryOrder = 102,
  618. OpImageQuerySizeLod = 103,
  619. OpImageQuerySize = 104,
  620. OpImageQueryLod = 105,
  621. OpImageQueryLevels = 106,
  622. OpImageQuerySamples = 107,
  623. OpConvertFToU = 109,
  624. OpConvertFToS = 110,
  625. OpConvertSToF = 111,
  626. OpConvertUToF = 112,
  627. OpUConvert = 113,
  628. OpSConvert = 114,
  629. OpFConvert = 115,
  630. OpQuantizeToF16 = 116,
  631. OpConvertPtrToU = 117,
  632. OpSatConvertSToU = 118,
  633. OpSatConvertUToS = 119,
  634. OpConvertUToPtr = 120,
  635. OpPtrCastToGeneric = 121,
  636. OpGenericCastToPtr = 122,
  637. OpGenericCastToPtrExplicit = 123,
  638. OpBitcast = 124,
  639. OpSNegate = 126,
  640. OpFNegate = 127,
  641. OpIAdd = 128,
  642. OpFAdd = 129,
  643. OpISub = 130,
  644. OpFSub = 131,
  645. OpIMul = 132,
  646. OpFMul = 133,
  647. OpUDiv = 134,
  648. OpSDiv = 135,
  649. OpFDiv = 136,
  650. OpUMod = 137,
  651. OpSRem = 138,
  652. OpSMod = 139,
  653. OpFRem = 140,
  654. OpFMod = 141,
  655. OpVectorTimesScalar = 142,
  656. OpMatrixTimesScalar = 143,
  657. OpVectorTimesMatrix = 144,
  658. OpMatrixTimesVector = 145,
  659. OpMatrixTimesMatrix = 146,
  660. OpOuterProduct = 147,
  661. OpDot = 148,
  662. OpIAddCarry = 149,
  663. OpISubBorrow = 150,
  664. OpUMulExtended = 151,
  665. OpSMulExtended = 152,
  666. OpAny = 154,
  667. OpAll = 155,
  668. OpIsNan = 156,
  669. OpIsInf = 157,
  670. OpIsFinite = 158,
  671. OpIsNormal = 159,
  672. OpSignBitSet = 160,
  673. OpLessOrGreater = 161,
  674. OpOrdered = 162,
  675. OpUnordered = 163,
  676. OpLogicalEqual = 164,
  677. OpLogicalNotEqual = 165,
  678. OpLogicalOr = 166,
  679. OpLogicalAnd = 167,
  680. OpLogicalNot = 168,
  681. OpSelect = 169,
  682. OpIEqual = 170,
  683. OpINotEqual = 171,
  684. OpUGreaterThan = 172,
  685. OpSGreaterThan = 173,
  686. OpUGreaterThanEqual = 174,
  687. OpSGreaterThanEqual = 175,
  688. OpULessThan = 176,
  689. OpSLessThan = 177,
  690. OpULessThanEqual = 178,
  691. OpSLessThanEqual = 179,
  692. OpFOrdEqual = 180,
  693. OpFUnordEqual = 181,
  694. OpFOrdNotEqual = 182,
  695. OpFUnordNotEqual = 183,
  696. OpFOrdLessThan = 184,
  697. OpFUnordLessThan = 185,
  698. OpFOrdGreaterThan = 186,
  699. OpFUnordGreaterThan = 187,
  700. OpFOrdLessThanEqual = 188,
  701. OpFUnordLessThanEqual = 189,
  702. OpFOrdGreaterThanEqual = 190,
  703. OpFUnordGreaterThanEqual = 191,
  704. OpShiftRightLogical = 194,
  705. OpShiftRightArithmetic = 195,
  706. OpShiftLeftLogical = 196,
  707. OpBitwiseOr = 197,
  708. OpBitwiseXor = 198,
  709. OpBitwiseAnd = 199,
  710. OpNot = 200,
  711. OpBitFieldInsert = 201,
  712. OpBitFieldSExtract = 202,
  713. OpBitFieldUExtract = 203,
  714. OpBitReverse = 204,
  715. OpBitCount = 205,
  716. OpDPdx = 207,
  717. OpDPdy = 208,
  718. OpFwidth = 209,
  719. OpDPdxFine = 210,
  720. OpDPdyFine = 211,
  721. OpFwidthFine = 212,
  722. OpDPdxCoarse = 213,
  723. OpDPdyCoarse = 214,
  724. OpFwidthCoarse = 215,
  725. OpEmitVertex = 218,
  726. OpEndPrimitive = 219,
  727. OpEmitStreamVertex = 220,
  728. OpEndStreamPrimitive = 221,
  729. OpControlBarrier = 224,
  730. OpMemoryBarrier = 225,
  731. OpAtomicLoad = 227,
  732. OpAtomicStore = 228,
  733. OpAtomicExchange = 229,
  734. OpAtomicCompareExchange = 230,
  735. OpAtomicCompareExchangeWeak = 231,
  736. OpAtomicIIncrement = 232,
  737. OpAtomicIDecrement = 233,
  738. OpAtomicIAdd = 234,
  739. OpAtomicISub = 235,
  740. OpAtomicSMin = 236,
  741. OpAtomicUMin = 237,
  742. OpAtomicSMax = 238,
  743. OpAtomicUMax = 239,
  744. OpAtomicAnd = 240,
  745. OpAtomicOr = 241,
  746. OpAtomicXor = 242,
  747. OpPhi = 245,
  748. OpLoopMerge = 246,
  749. OpSelectionMerge = 247,
  750. OpLabel = 248,
  751. OpBranch = 249,
  752. OpBranchConditional = 250,
  753. OpSwitch = 251,
  754. OpKill = 252,
  755. OpReturn = 253,
  756. OpReturnValue = 254,
  757. OpUnreachable = 255,
  758. OpLifetimeStart = 256,
  759. OpLifetimeStop = 257,
  760. OpGroupAsyncCopy = 259,
  761. OpGroupWaitEvents = 260,
  762. OpGroupAll = 261,
  763. OpGroupAny = 262,
  764. OpGroupBroadcast = 263,
  765. OpGroupIAdd = 264,
  766. OpGroupFAdd = 265,
  767. OpGroupFMin = 266,
  768. OpGroupUMin = 267,
  769. OpGroupSMin = 268,
  770. OpGroupFMax = 269,
  771. OpGroupUMax = 270,
  772. OpGroupSMax = 271,
  773. OpReadPipe = 274,
  774. OpWritePipe = 275,
  775. OpReservedReadPipe = 276,
  776. OpReservedWritePipe = 277,
  777. OpReserveReadPipePackets = 278,
  778. OpReserveWritePipePackets = 279,
  779. OpCommitReadPipe = 280,
  780. OpCommitWritePipe = 281,
  781. OpIsValidReserveId = 282,
  782. OpGetNumPipePackets = 283,
  783. OpGetMaxPipePackets = 284,
  784. OpGroupReserveReadPipePackets = 285,
  785. OpGroupReserveWritePipePackets = 286,
  786. OpGroupCommitReadPipe = 287,
  787. OpGroupCommitWritePipe = 288,
  788. OpEnqueueMarker = 291,
  789. OpEnqueueKernel = 292,
  790. OpGetKernelNDrangeSubGroupCount = 293,
  791. OpGetKernelNDrangeMaxSubGroupSize = 294,
  792. OpGetKernelWorkGroupSize = 295,
  793. OpGetKernelPreferredWorkGroupSizeMultiple = 296,
  794. OpRetainEvent = 297,
  795. OpReleaseEvent = 298,
  796. OpCreateUserEvent = 299,
  797. OpIsValidEvent = 300,
  798. OpSetUserEventStatus = 301,
  799. OpCaptureEventProfilingInfo = 302,
  800. OpGetDefaultQueue = 303,
  801. OpBuildNDRange = 304,
  802. OpImageSparseSampleImplicitLod = 305,
  803. OpImageSparseSampleExplicitLod = 306,
  804. OpImageSparseSampleDrefImplicitLod = 307,
  805. OpImageSparseSampleDrefExplicitLod = 308,
  806. OpImageSparseSampleProjImplicitLod = 309,
  807. OpImageSparseSampleProjExplicitLod = 310,
  808. OpImageSparseSampleProjDrefImplicitLod = 311,
  809. OpImageSparseSampleProjDrefExplicitLod = 312,
  810. OpImageSparseFetch = 313,
  811. OpImageSparseGather = 314,
  812. OpImageSparseDrefGather = 315,
  813. OpImageSparseTexelsResident = 316,
  814. OpNoLine = 317,
  815. OpAtomicFlagTestAndSet = 318,
  816. OpAtomicFlagClear = 319,
  817. OpImageSparseRead = 320,
  818. };
  819. // Overload operator| for mask bit combining
  820. inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); }
  821. inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); }
  822. inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); }
  823. inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); }
  824. inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); }
  825. inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
  826. inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
  827. inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
  828. } // end namespace spv
  829. #endif // #ifndef spirv_HPP