spirv.hpp 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879
  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 SourceLanguage {
  51. SourceLanguageUnknown = 0,
  52. SourceLanguageESSL = 1,
  53. SourceLanguageGLSL = 2,
  54. SourceLanguageOpenCL_C = 3,
  55. SourceLanguageOpenCL_CPP = 4,
  56. };
  57. enum ExecutionModel {
  58. ExecutionModelVertex = 0,
  59. ExecutionModelTessellationControl = 1,
  60. ExecutionModelTessellationEvaluation = 2,
  61. ExecutionModelGeometry = 3,
  62. ExecutionModelFragment = 4,
  63. ExecutionModelGLCompute = 5,
  64. ExecutionModelKernel = 6,
  65. };
  66. enum AddressingModel {
  67. AddressingModelLogical = 0,
  68. AddressingModelPhysical32 = 1,
  69. AddressingModelPhysical64 = 2,
  70. };
  71. enum MemoryModel {
  72. MemoryModelSimple = 0,
  73. MemoryModelGLSL450 = 1,
  74. MemoryModelOpenCL = 2,
  75. };
  76. enum ExecutionMode {
  77. ExecutionModeInvocations = 0,
  78. ExecutionModeSpacingEqual = 1,
  79. ExecutionModeSpacingFractionalEven = 2,
  80. ExecutionModeSpacingFractionalOdd = 3,
  81. ExecutionModeVertexOrderCw = 4,
  82. ExecutionModeVertexOrderCcw = 5,
  83. ExecutionModePixelCenterInteger = 6,
  84. ExecutionModeOriginUpperLeft = 7,
  85. ExecutionModeOriginLowerLeft = 8,
  86. ExecutionModeEarlyFragmentTests = 9,
  87. ExecutionModePointMode = 10,
  88. ExecutionModeXfb = 11,
  89. ExecutionModeDepthReplacing = 12,
  90. ExecutionModeDepthGreater = 14,
  91. ExecutionModeDepthLess = 15,
  92. ExecutionModeDepthUnchanged = 16,
  93. ExecutionModeLocalSize = 17,
  94. ExecutionModeLocalSizeHint = 18,
  95. ExecutionModeInputPoints = 19,
  96. ExecutionModeInputLines = 20,
  97. ExecutionModeInputLinesAdjacency = 21,
  98. ExecutionModeTriangles = 22,
  99. ExecutionModeInputTrianglesAdjacency = 23,
  100. ExecutionModeQuads = 24,
  101. ExecutionModeIsolines = 25,
  102. ExecutionModeOutputVertices = 26,
  103. ExecutionModeOutputPoints = 27,
  104. ExecutionModeOutputLineStrip = 28,
  105. ExecutionModeOutputTriangleStrip = 29,
  106. ExecutionModeVecTypeHint = 30,
  107. ExecutionModeContractionOff = 31,
  108. };
  109. enum StorageClass {
  110. StorageClassUniformConstant = 0,
  111. StorageClassInput = 1,
  112. StorageClassUniform = 2,
  113. StorageClassOutput = 3,
  114. StorageClassWorkgroup = 4,
  115. StorageClassCrossWorkgroup = 5,
  116. StorageClassPrivate = 6,
  117. StorageClassFunction = 7,
  118. StorageClassGeneric = 8,
  119. StorageClassPushConstant = 9,
  120. StorageClassAtomicCounter = 10,
  121. StorageClassImage = 11,
  122. };
  123. enum Dim {
  124. Dim1D = 0,
  125. Dim2D = 1,
  126. Dim3D = 2,
  127. DimCube = 3,
  128. DimRect = 4,
  129. DimBuffer = 5,
  130. DimSubpassData = 6,
  131. };
  132. enum SamplerAddressingMode {
  133. SamplerAddressingModeNone = 0,
  134. SamplerAddressingModeClampToEdge = 1,
  135. SamplerAddressingModeClamp = 2,
  136. SamplerAddressingModeRepeat = 3,
  137. SamplerAddressingModeRepeatMirrored = 4,
  138. };
  139. enum SamplerFilterMode {
  140. SamplerFilterModeNearest = 0,
  141. SamplerFilterModeLinear = 1,
  142. };
  143. enum ImageFormat {
  144. ImageFormatUnknown = 0,
  145. ImageFormatRgba32f = 1,
  146. ImageFormatRgba16f = 2,
  147. ImageFormatR32f = 3,
  148. ImageFormatRgba8 = 4,
  149. ImageFormatRgba8Snorm = 5,
  150. ImageFormatRg32f = 6,
  151. ImageFormatRg16f = 7,
  152. ImageFormatR11fG11fB10f = 8,
  153. ImageFormatR16f = 9,
  154. ImageFormatRgba16 = 10,
  155. ImageFormatRgb10A2 = 11,
  156. ImageFormatRg16 = 12,
  157. ImageFormatRg8 = 13,
  158. ImageFormatR16 = 14,
  159. ImageFormatR8 = 15,
  160. ImageFormatRgba16Snorm = 16,
  161. ImageFormatRg16Snorm = 17,
  162. ImageFormatRg8Snorm = 18,
  163. ImageFormatR16Snorm = 19,
  164. ImageFormatR8Snorm = 20,
  165. ImageFormatRgba32i = 21,
  166. ImageFormatRgba16i = 22,
  167. ImageFormatRgba8i = 23,
  168. ImageFormatR32i = 24,
  169. ImageFormatRg32i = 25,
  170. ImageFormatRg16i = 26,
  171. ImageFormatRg8i = 27,
  172. ImageFormatR16i = 28,
  173. ImageFormatR8i = 29,
  174. ImageFormatRgba32ui = 30,
  175. ImageFormatRgba16ui = 31,
  176. ImageFormatRgba8ui = 32,
  177. ImageFormatR32ui = 33,
  178. ImageFormatRgb10a2ui = 34,
  179. ImageFormatRg32ui = 35,
  180. ImageFormatRg16ui = 36,
  181. ImageFormatRg8ui = 37,
  182. ImageFormatR16ui = 38,
  183. ImageFormatR8ui = 39,
  184. };
  185. enum ImageChannelOrder {
  186. ImageChannelOrderR = 0,
  187. ImageChannelOrderA = 1,
  188. ImageChannelOrderRG = 2,
  189. ImageChannelOrderRA = 3,
  190. ImageChannelOrderRGB = 4,
  191. ImageChannelOrderRGBA = 5,
  192. ImageChannelOrderBGRA = 6,
  193. ImageChannelOrderARGB = 7,
  194. ImageChannelOrderIntensity = 8,
  195. ImageChannelOrderLuminance = 9,
  196. ImageChannelOrderRx = 10,
  197. ImageChannelOrderRGx = 11,
  198. ImageChannelOrderRGBx = 12,
  199. ImageChannelOrderDepth = 13,
  200. ImageChannelOrderDepthStencil = 14,
  201. ImageChannelOrdersRGB = 15,
  202. ImageChannelOrdersRGBx = 16,
  203. ImageChannelOrdersRGBA = 17,
  204. ImageChannelOrdersBGRA = 18,
  205. };
  206. enum ImageChannelDataType {
  207. ImageChannelDataTypeSnormInt8 = 0,
  208. ImageChannelDataTypeSnormInt16 = 1,
  209. ImageChannelDataTypeUnormInt8 = 2,
  210. ImageChannelDataTypeUnormInt16 = 3,
  211. ImageChannelDataTypeUnormShort565 = 4,
  212. ImageChannelDataTypeUnormShort555 = 5,
  213. ImageChannelDataTypeUnormInt101010 = 6,
  214. ImageChannelDataTypeSignedInt8 = 7,
  215. ImageChannelDataTypeSignedInt16 = 8,
  216. ImageChannelDataTypeSignedInt32 = 9,
  217. ImageChannelDataTypeUnsignedInt8 = 10,
  218. ImageChannelDataTypeUnsignedInt16 = 11,
  219. ImageChannelDataTypeUnsignedInt32 = 12,
  220. ImageChannelDataTypeHalfFloat = 13,
  221. ImageChannelDataTypeFloat = 14,
  222. ImageChannelDataTypeUnormInt24 = 15,
  223. ImageChannelDataTypeUnormInt101010_2 = 16,
  224. };
  225. enum ImageOperandsShift {
  226. ImageOperandsBiasShift = 0,
  227. ImageOperandsLodShift = 1,
  228. ImageOperandsGradShift = 2,
  229. ImageOperandsConstOffsetShift = 3,
  230. ImageOperandsOffsetShift = 4,
  231. ImageOperandsConstOffsetsShift = 5,
  232. ImageOperandsSampleShift = 6,
  233. ImageOperandsMinLodShift = 7,
  234. };
  235. enum ImageOperandsMask {
  236. ImageOperandsMaskNone = 0,
  237. ImageOperandsBiasMask = 0x00000001,
  238. ImageOperandsLodMask = 0x00000002,
  239. ImageOperandsGradMask = 0x00000004,
  240. ImageOperandsConstOffsetMask = 0x00000008,
  241. ImageOperandsOffsetMask = 0x00000010,
  242. ImageOperandsConstOffsetsMask = 0x00000020,
  243. ImageOperandsSampleMask = 0x00000040,
  244. ImageOperandsMinLodMask = 0x00000080,
  245. };
  246. enum FPFastMathModeShift {
  247. FPFastMathModeNotNaNShift = 0,
  248. FPFastMathModeNotInfShift = 1,
  249. FPFastMathModeNSZShift = 2,
  250. FPFastMathModeAllowRecipShift = 3,
  251. FPFastMathModeFastShift = 4,
  252. };
  253. enum FPFastMathModeMask {
  254. FPFastMathModeMaskNone = 0,
  255. FPFastMathModeNotNaNMask = 0x00000001,
  256. FPFastMathModeNotInfMask = 0x00000002,
  257. FPFastMathModeNSZMask = 0x00000004,
  258. FPFastMathModeAllowRecipMask = 0x00000008,
  259. FPFastMathModeFastMask = 0x00000010,
  260. };
  261. enum FPRoundingMode {
  262. FPRoundingModeRTE = 0,
  263. FPRoundingModeRTZ = 1,
  264. FPRoundingModeRTP = 2,
  265. FPRoundingModeRTN = 3,
  266. };
  267. enum LinkageType {
  268. LinkageTypeExport = 0,
  269. LinkageTypeImport = 1,
  270. };
  271. enum AccessQualifier {
  272. AccessQualifierReadOnly = 0,
  273. AccessQualifierWriteOnly = 1,
  274. AccessQualifierReadWrite = 2,
  275. };
  276. enum FunctionParameterAttribute {
  277. FunctionParameterAttributeZext = 0,
  278. FunctionParameterAttributeSext = 1,
  279. FunctionParameterAttributeByVal = 2,
  280. FunctionParameterAttributeSret = 3,
  281. FunctionParameterAttributeNoAlias = 4,
  282. FunctionParameterAttributeNoCapture = 5,
  283. FunctionParameterAttributeNoWrite = 6,
  284. FunctionParameterAttributeNoReadWrite = 7,
  285. };
  286. enum Decoration {
  287. DecorationRelaxedPrecision = 0,
  288. DecorationSpecId = 1,
  289. DecorationBlock = 2,
  290. DecorationBufferBlock = 3,
  291. DecorationRowMajor = 4,
  292. DecorationColMajor = 5,
  293. DecorationArrayStride = 6,
  294. DecorationMatrixStride = 7,
  295. DecorationGLSLShared = 8,
  296. DecorationGLSLPacked = 9,
  297. DecorationCPacked = 10,
  298. DecorationBuiltIn = 11,
  299. DecorationNoPerspective = 13,
  300. DecorationFlat = 14,
  301. DecorationPatch = 15,
  302. DecorationCentroid = 16,
  303. DecorationSample = 17,
  304. DecorationInvariant = 18,
  305. DecorationRestrict = 19,
  306. DecorationAliased = 20,
  307. DecorationVolatile = 21,
  308. DecorationConstant = 22,
  309. DecorationCoherent = 23,
  310. DecorationNonWritable = 24,
  311. DecorationNonReadable = 25,
  312. DecorationUniform = 26,
  313. DecorationSaturatedConversion = 28,
  314. DecorationStream = 29,
  315. DecorationLocation = 30,
  316. DecorationComponent = 31,
  317. DecorationIndex = 32,
  318. DecorationBinding = 33,
  319. DecorationDescriptorSet = 34,
  320. DecorationOffset = 35,
  321. DecorationXfbBuffer = 36,
  322. DecorationXfbStride = 37,
  323. DecorationFuncParamAttr = 38,
  324. DecorationFPRoundingMode = 39,
  325. DecorationFPFastMathMode = 40,
  326. DecorationLinkageAttributes = 41,
  327. DecorationNoContraction = 42,
  328. DecorationInputAttachmentIndex = 43,
  329. DecorationAlignment = 44,
  330. };
  331. enum BuiltIn {
  332. BuiltInPosition = 0,
  333. BuiltInPointSize = 1,
  334. BuiltInClipDistance = 3,
  335. BuiltInCullDistance = 4,
  336. BuiltInVertexId = 5,
  337. BuiltInInstanceId = 6,
  338. BuiltInPrimitiveId = 7,
  339. BuiltInInvocationId = 8,
  340. BuiltInLayer = 9,
  341. BuiltInViewportIndex = 10,
  342. BuiltInTessLevelOuter = 11,
  343. BuiltInTessLevelInner = 12,
  344. BuiltInTessCoord = 13,
  345. BuiltInPatchVertices = 14,
  346. BuiltInFragCoord = 15,
  347. BuiltInPointCoord = 16,
  348. BuiltInFrontFacing = 17,
  349. BuiltInSampleId = 18,
  350. BuiltInSamplePosition = 19,
  351. BuiltInSampleMask = 20,
  352. BuiltInFragDepth = 22,
  353. BuiltInHelperInvocation = 23,
  354. BuiltInNumWorkgroups = 24,
  355. BuiltInWorkgroupSize = 25,
  356. BuiltInWorkgroupId = 26,
  357. BuiltInLocalInvocationId = 27,
  358. BuiltInGlobalInvocationId = 28,
  359. BuiltInLocalInvocationIndex = 29,
  360. BuiltInWorkDim = 30,
  361. BuiltInGlobalSize = 31,
  362. BuiltInEnqueuedWorkgroupSize = 32,
  363. BuiltInGlobalOffset = 33,
  364. BuiltInGlobalLinearId = 34,
  365. BuiltInSubgroupSize = 36,
  366. BuiltInSubgroupMaxSize = 37,
  367. BuiltInNumSubgroups = 38,
  368. BuiltInNumEnqueuedSubgroups = 39,
  369. BuiltInSubgroupId = 40,
  370. BuiltInSubgroupLocalInvocationId = 41,
  371. BuiltInVertexIndex = 42,
  372. BuiltInInstanceIndex = 43,
  373. };
  374. enum SelectionControlShift {
  375. SelectionControlFlattenShift = 0,
  376. SelectionControlDontFlattenShift = 1,
  377. };
  378. enum SelectionControlMask {
  379. SelectionControlMaskNone = 0,
  380. SelectionControlFlattenMask = 0x00000001,
  381. SelectionControlDontFlattenMask = 0x00000002,
  382. };
  383. enum LoopControlShift {
  384. LoopControlUnrollShift = 0,
  385. LoopControlDontUnrollShift = 1,
  386. };
  387. enum LoopControlMask {
  388. LoopControlMaskNone = 0,
  389. LoopControlUnrollMask = 0x00000001,
  390. LoopControlDontUnrollMask = 0x00000002,
  391. };
  392. enum FunctionControlShift {
  393. FunctionControlInlineShift = 0,
  394. FunctionControlDontInlineShift = 1,
  395. FunctionControlPureShift = 2,
  396. FunctionControlConstShift = 3,
  397. };
  398. enum FunctionControlMask {
  399. FunctionControlMaskNone = 0,
  400. FunctionControlInlineMask = 0x00000001,
  401. FunctionControlDontInlineMask = 0x00000002,
  402. FunctionControlPureMask = 0x00000004,
  403. FunctionControlConstMask = 0x00000008,
  404. };
  405. enum MemorySemanticsShift {
  406. MemorySemanticsAcquireShift = 1,
  407. MemorySemanticsReleaseShift = 2,
  408. MemorySemanticsAcquireReleaseShift = 3,
  409. MemorySemanticsSequentiallyConsistentShift = 4,
  410. MemorySemanticsUniformMemoryShift = 6,
  411. MemorySemanticsSubgroupMemoryShift = 7,
  412. MemorySemanticsWorkgroupMemoryShift = 8,
  413. MemorySemanticsCrossWorkgroupMemoryShift = 9,
  414. MemorySemanticsAtomicCounterMemoryShift = 10,
  415. MemorySemanticsImageMemoryShift = 11,
  416. };
  417. enum MemorySemanticsMask {
  418. MemorySemanticsMaskNone = 0,
  419. MemorySemanticsAcquireMask = 0x00000002,
  420. MemorySemanticsReleaseMask = 0x00000004,
  421. MemorySemanticsAcquireReleaseMask = 0x00000008,
  422. MemorySemanticsSequentiallyConsistentMask = 0x00000010,
  423. MemorySemanticsUniformMemoryMask = 0x00000040,
  424. MemorySemanticsSubgroupMemoryMask = 0x00000080,
  425. MemorySemanticsWorkgroupMemoryMask = 0x00000100,
  426. MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
  427. MemorySemanticsAtomicCounterMemoryMask = 0x00000400,
  428. MemorySemanticsImageMemoryMask = 0x00000800,
  429. };
  430. enum MemoryAccessShift {
  431. MemoryAccessVolatileShift = 0,
  432. MemoryAccessAlignedShift = 1,
  433. MemoryAccessNontemporalShift = 2,
  434. };
  435. enum MemoryAccessMask {
  436. MemoryAccessMaskNone = 0,
  437. MemoryAccessVolatileMask = 0x00000001,
  438. MemoryAccessAlignedMask = 0x00000002,
  439. MemoryAccessNontemporalMask = 0x00000004,
  440. };
  441. enum Scope {
  442. ScopeCrossDevice = 0,
  443. ScopeDevice = 1,
  444. ScopeWorkgroup = 2,
  445. ScopeSubgroup = 3,
  446. ScopeInvocation = 4,
  447. };
  448. enum GroupOperation {
  449. GroupOperationReduce = 0,
  450. GroupOperationInclusiveScan = 1,
  451. GroupOperationExclusiveScan = 2,
  452. };
  453. enum KernelEnqueueFlags {
  454. KernelEnqueueFlagsNoWait = 0,
  455. KernelEnqueueFlagsWaitKernel = 1,
  456. KernelEnqueueFlagsWaitWorkGroup = 2,
  457. };
  458. enum KernelProfilingInfoShift {
  459. KernelProfilingInfoCmdExecTimeShift = 0,
  460. };
  461. enum KernelProfilingInfoMask {
  462. KernelProfilingInfoMaskNone = 0,
  463. KernelProfilingInfoCmdExecTimeMask = 0x00000001,
  464. };
  465. enum Capability {
  466. CapabilityMatrix = 0,
  467. CapabilityShader = 1,
  468. CapabilityGeometry = 2,
  469. CapabilityTessellation = 3,
  470. CapabilityAddresses = 4,
  471. CapabilityLinkage = 5,
  472. CapabilityKernel = 6,
  473. CapabilityVector16 = 7,
  474. CapabilityFloat16Buffer = 8,
  475. CapabilityFloat16 = 9,
  476. CapabilityFloat64 = 10,
  477. CapabilityInt64 = 11,
  478. CapabilityInt64Atomics = 12,
  479. CapabilityImageBasic = 13,
  480. CapabilityImageReadWrite = 14,
  481. CapabilityImageMipmap = 15,
  482. CapabilityPipes = 17,
  483. CapabilityGroups = 18,
  484. CapabilityDeviceEnqueue = 19,
  485. CapabilityLiteralSampler = 20,
  486. CapabilityAtomicStorage = 21,
  487. CapabilityInt16 = 22,
  488. CapabilityTessellationPointSize = 23,
  489. CapabilityGeometryPointSize = 24,
  490. CapabilityImageGatherExtended = 25,
  491. CapabilityStorageImageMultisample = 27,
  492. CapabilityUniformBufferArrayDynamicIndexing = 28,
  493. CapabilitySampledImageArrayDynamicIndexing = 29,
  494. CapabilityStorageBufferArrayDynamicIndexing = 30,
  495. CapabilityStorageImageArrayDynamicIndexing = 31,
  496. CapabilityClipDistance = 32,
  497. CapabilityCullDistance = 33,
  498. CapabilityImageCubeArray = 34,
  499. CapabilitySampleRateShading = 35,
  500. CapabilityImageRect = 36,
  501. CapabilitySampledRect = 37,
  502. CapabilityGenericPointer = 38,
  503. CapabilityInt8 = 39,
  504. CapabilityInputAttachment = 40,
  505. CapabilitySparseResidency = 41,
  506. CapabilityMinLod = 42,
  507. CapabilitySampled1D = 43,
  508. CapabilityImage1D = 44,
  509. CapabilitySampledCubeArray = 45,
  510. CapabilitySampledBuffer = 46,
  511. CapabilityImageBuffer = 47,
  512. CapabilityImageMSArray = 48,
  513. CapabilityStorageImageExtendedFormats = 49,
  514. CapabilityImageQuery = 50,
  515. CapabilityDerivativeControl = 51,
  516. CapabilityInterpolationFunction = 52,
  517. CapabilityTransformFeedback = 53,
  518. CapabilityGeometryStreams = 54,
  519. CapabilityStorageImageReadWithoutFormat = 55,
  520. CapabilityStorageImageWriteWithoutFormat = 56,
  521. CapabilityMultiViewport = 57,
  522. };
  523. enum Op {
  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