spirv.h 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870
  1. /*
  2. ** Copyright (c) 2014-2016 The Khronos Group Inc.
  3. **
  4. ** Permission is hereby granted, free of charge, to any person obtaining a copy
  5. ** of this software and/or associated documentation files (the "Materials"),
  6. ** to deal in the Materials without restriction, including without limitation
  7. ** the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. ** and/or sell copies of the Materials, and to permit persons to whom the
  9. ** Materials are furnished to do so, subject to the following conditions:
  10. **
  11. ** The above copyright notice and this permission notice shall be included in
  12. ** all copies or substantial portions of the Materials.
  13. **
  14. ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
  15. ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
  16. ** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
  17. **
  18. ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  19. ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  21. ** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  22. ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  23. ** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
  24. ** IN THE MATERIALS.
  25. */
  26. /*
  27. ** This header is automatically generated by the same tool that creates
  28. ** the Binary Section of the SPIR-V specification.
  29. */
  30. /*
  31. ** Enumeration tokens for SPIR-V, in various styles:
  32. ** C, C++, C++11, JSON, Lua, Python
  33. **
  34. ** - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
  35. ** - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
  36. ** - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
  37. ** - Lua will use tables, e.g.: spv.SourceLanguage.GLSL
  38. ** - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']
  39. **
  40. ** Some tokens act like mask values, which can be OR'd together,
  41. ** while others are mutually exclusive. The mask-like ones have
  42. ** "Mask" in their name, and a parallel enum that has the shift
  43. ** amount (1 << x) for each corresponding enumerant.
  44. */
  45. #ifndef spirv_H
  46. #define spirv_H
  47. typedef unsigned int SpvId;
  48. #define SPV_VERSION 0x10000
  49. #define SPV_REVISION 4
  50. static const unsigned int SpvMagicNumber = 0x07230203;
  51. static const unsigned int SpvVersion = 0x00010000;
  52. static const unsigned int SpvRevision = 4;
  53. static const unsigned int SpvOpCodeMask = 0xffff;
  54. static const unsigned int SpvWordCountShift = 16;
  55. typedef enum SpvSourceLanguage_ {
  56. SpvSourceLanguageUnknown = 0,
  57. SpvSourceLanguageESSL = 1,
  58. SpvSourceLanguageGLSL = 2,
  59. SpvSourceLanguageOpenCL_C = 3,
  60. SpvSourceLanguageOpenCL_CPP = 4,
  61. } SpvSourceLanguage;
  62. typedef enum SpvExecutionModel_ {
  63. SpvExecutionModelVertex = 0,
  64. SpvExecutionModelTessellationControl = 1,
  65. SpvExecutionModelTessellationEvaluation = 2,
  66. SpvExecutionModelGeometry = 3,
  67. SpvExecutionModelFragment = 4,
  68. SpvExecutionModelGLCompute = 5,
  69. SpvExecutionModelKernel = 6,
  70. } SpvExecutionModel;
  71. typedef enum SpvAddressingModel_ {
  72. SpvAddressingModelLogical = 0,
  73. SpvAddressingModelPhysical32 = 1,
  74. SpvAddressingModelPhysical64 = 2,
  75. } SpvAddressingModel;
  76. typedef enum SpvMemoryModel_ {
  77. SpvMemoryModelSimple = 0,
  78. SpvMemoryModelGLSL450 = 1,
  79. SpvMemoryModelOpenCL = 2,
  80. } SpvMemoryModel;
  81. typedef enum SpvExecutionMode_ {
  82. SpvExecutionModeInvocations = 0,
  83. SpvExecutionModeSpacingEqual = 1,
  84. SpvExecutionModeSpacingFractionalEven = 2,
  85. SpvExecutionModeSpacingFractionalOdd = 3,
  86. SpvExecutionModeVertexOrderCw = 4,
  87. SpvExecutionModeVertexOrderCcw = 5,
  88. SpvExecutionModePixelCenterInteger = 6,
  89. SpvExecutionModeOriginUpperLeft = 7,
  90. SpvExecutionModeOriginLowerLeft = 8,
  91. SpvExecutionModeEarlyFragmentTests = 9,
  92. SpvExecutionModePointMode = 10,
  93. SpvExecutionModeXfb = 11,
  94. SpvExecutionModeDepthReplacing = 12,
  95. SpvExecutionModeDepthGreater = 14,
  96. SpvExecutionModeDepthLess = 15,
  97. SpvExecutionModeDepthUnchanged = 16,
  98. SpvExecutionModeLocalSize = 17,
  99. SpvExecutionModeLocalSizeHint = 18,
  100. SpvExecutionModeInputPoints = 19,
  101. SpvExecutionModeInputLines = 20,
  102. SpvExecutionModeInputLinesAdjacency = 21,
  103. SpvExecutionModeTriangles = 22,
  104. SpvExecutionModeInputTrianglesAdjacency = 23,
  105. SpvExecutionModeQuads = 24,
  106. SpvExecutionModeIsolines = 25,
  107. SpvExecutionModeOutputVertices = 26,
  108. SpvExecutionModeOutputPoints = 27,
  109. SpvExecutionModeOutputLineStrip = 28,
  110. SpvExecutionModeOutputTriangleStrip = 29,
  111. SpvExecutionModeVecTypeHint = 30,
  112. SpvExecutionModeContractionOff = 31,
  113. } SpvExecutionMode;
  114. typedef enum SpvStorageClass_ {
  115. SpvStorageClassUniformConstant = 0,
  116. SpvStorageClassInput = 1,
  117. SpvStorageClassUniform = 2,
  118. SpvStorageClassOutput = 3,
  119. SpvStorageClassWorkgroup = 4,
  120. SpvStorageClassCrossWorkgroup = 5,
  121. SpvStorageClassPrivate = 6,
  122. SpvStorageClassFunction = 7,
  123. SpvStorageClassGeneric = 8,
  124. SpvStorageClassPushConstant = 9,
  125. SpvStorageClassAtomicCounter = 10,
  126. SpvStorageClassImage = 11,
  127. } SpvStorageClass;
  128. typedef enum SpvDim_ {
  129. SpvDim1D = 0,
  130. SpvDim2D = 1,
  131. SpvDim3D = 2,
  132. SpvDimCube = 3,
  133. SpvDimRect = 4,
  134. SpvDimBuffer = 5,
  135. SpvDimSubpassData = 6,
  136. } SpvDim;
  137. typedef enum SpvSamplerAddressingMode_ {
  138. SpvSamplerAddressingModeNone = 0,
  139. SpvSamplerAddressingModeClampToEdge = 1,
  140. SpvSamplerAddressingModeClamp = 2,
  141. SpvSamplerAddressingModeRepeat = 3,
  142. SpvSamplerAddressingModeRepeatMirrored = 4,
  143. } SpvSamplerAddressingMode;
  144. typedef enum SpvSamplerFilterMode_ {
  145. SpvSamplerFilterModeNearest = 0,
  146. SpvSamplerFilterModeLinear = 1,
  147. } SpvSamplerFilterMode;
  148. typedef enum SpvImageFormat_ {
  149. SpvImageFormatUnknown = 0,
  150. SpvImageFormatRgba32f = 1,
  151. SpvImageFormatRgba16f = 2,
  152. SpvImageFormatR32f = 3,
  153. SpvImageFormatRgba8 = 4,
  154. SpvImageFormatRgba8Snorm = 5,
  155. SpvImageFormatRg32f = 6,
  156. SpvImageFormatRg16f = 7,
  157. SpvImageFormatR11fG11fB10f = 8,
  158. SpvImageFormatR16f = 9,
  159. SpvImageFormatRgba16 = 10,
  160. SpvImageFormatRgb10A2 = 11,
  161. SpvImageFormatRg16 = 12,
  162. SpvImageFormatRg8 = 13,
  163. SpvImageFormatR16 = 14,
  164. SpvImageFormatR8 = 15,
  165. SpvImageFormatRgba16Snorm = 16,
  166. SpvImageFormatRg16Snorm = 17,
  167. SpvImageFormatRg8Snorm = 18,
  168. SpvImageFormatR16Snorm = 19,
  169. SpvImageFormatR8Snorm = 20,
  170. SpvImageFormatRgba32i = 21,
  171. SpvImageFormatRgba16i = 22,
  172. SpvImageFormatRgba8i = 23,
  173. SpvImageFormatR32i = 24,
  174. SpvImageFormatRg32i = 25,
  175. SpvImageFormatRg16i = 26,
  176. SpvImageFormatRg8i = 27,
  177. SpvImageFormatR16i = 28,
  178. SpvImageFormatR8i = 29,
  179. SpvImageFormatRgba32ui = 30,
  180. SpvImageFormatRgba16ui = 31,
  181. SpvImageFormatRgba8ui = 32,
  182. SpvImageFormatR32ui = 33,
  183. SpvImageFormatRgb10a2ui = 34,
  184. SpvImageFormatRg32ui = 35,
  185. SpvImageFormatRg16ui = 36,
  186. SpvImageFormatRg8ui = 37,
  187. SpvImageFormatR16ui = 38,
  188. SpvImageFormatR8ui = 39,
  189. } SpvImageFormat;
  190. typedef enum SpvImageChannelOrder_ {
  191. SpvImageChannelOrderR = 0,
  192. SpvImageChannelOrderA = 1,
  193. SpvImageChannelOrderRG = 2,
  194. SpvImageChannelOrderRA = 3,
  195. SpvImageChannelOrderRGB = 4,
  196. SpvImageChannelOrderRGBA = 5,
  197. SpvImageChannelOrderBGRA = 6,
  198. SpvImageChannelOrderARGB = 7,
  199. SpvImageChannelOrderIntensity = 8,
  200. SpvImageChannelOrderLuminance = 9,
  201. SpvImageChannelOrderRx = 10,
  202. SpvImageChannelOrderRGx = 11,
  203. SpvImageChannelOrderRGBx = 12,
  204. SpvImageChannelOrderDepth = 13,
  205. SpvImageChannelOrderDepthStencil = 14,
  206. SpvImageChannelOrdersRGB = 15,
  207. SpvImageChannelOrdersRGBx = 16,
  208. SpvImageChannelOrdersRGBA = 17,
  209. SpvImageChannelOrdersBGRA = 18,
  210. } SpvImageChannelOrder;
  211. typedef enum SpvImageChannelDataType_ {
  212. SpvImageChannelDataTypeSnormInt8 = 0,
  213. SpvImageChannelDataTypeSnormInt16 = 1,
  214. SpvImageChannelDataTypeUnormInt8 = 2,
  215. SpvImageChannelDataTypeUnormInt16 = 3,
  216. SpvImageChannelDataTypeUnormShort565 = 4,
  217. SpvImageChannelDataTypeUnormShort555 = 5,
  218. SpvImageChannelDataTypeUnormInt101010 = 6,
  219. SpvImageChannelDataTypeSignedInt8 = 7,
  220. SpvImageChannelDataTypeSignedInt16 = 8,
  221. SpvImageChannelDataTypeSignedInt32 = 9,
  222. SpvImageChannelDataTypeUnsignedInt8 = 10,
  223. SpvImageChannelDataTypeUnsignedInt16 = 11,
  224. SpvImageChannelDataTypeUnsignedInt32 = 12,
  225. SpvImageChannelDataTypeHalfFloat = 13,
  226. SpvImageChannelDataTypeFloat = 14,
  227. SpvImageChannelDataTypeUnormInt24 = 15,
  228. SpvImageChannelDataTypeUnormInt101010_2 = 16,
  229. } SpvImageChannelDataType;
  230. typedef enum SpvImageOperandsShift_ {
  231. SpvImageOperandsBiasShift = 0,
  232. SpvImageOperandsLodShift = 1,
  233. SpvImageOperandsGradShift = 2,
  234. SpvImageOperandsConstOffsetShift = 3,
  235. SpvImageOperandsOffsetShift = 4,
  236. SpvImageOperandsConstOffsetsShift = 5,
  237. SpvImageOperandsSampleShift = 6,
  238. SpvImageOperandsMinLodShift = 7,
  239. } SpvImageOperandsShift;
  240. typedef enum SpvImageOperandsMask_ {
  241. SpvImageOperandsMaskNone = 0,
  242. SpvImageOperandsBiasMask = 0x00000001,
  243. SpvImageOperandsLodMask = 0x00000002,
  244. SpvImageOperandsGradMask = 0x00000004,
  245. SpvImageOperandsConstOffsetMask = 0x00000008,
  246. SpvImageOperandsOffsetMask = 0x00000010,
  247. SpvImageOperandsConstOffsetsMask = 0x00000020,
  248. SpvImageOperandsSampleMask = 0x00000040,
  249. SpvImageOperandsMinLodMask = 0x00000080,
  250. } SpvImageOperandsMask;
  251. typedef enum SpvFPFastMathModeShift_ {
  252. SpvFPFastMathModeNotNaNShift = 0,
  253. SpvFPFastMathModeNotInfShift = 1,
  254. SpvFPFastMathModeNSZShift = 2,
  255. SpvFPFastMathModeAllowRecipShift = 3,
  256. SpvFPFastMathModeFastShift = 4,
  257. } SpvFPFastMathModeShift;
  258. typedef enum SpvFPFastMathModeMask_ {
  259. SpvFPFastMathModeMaskNone = 0,
  260. SpvFPFastMathModeNotNaNMask = 0x00000001,
  261. SpvFPFastMathModeNotInfMask = 0x00000002,
  262. SpvFPFastMathModeNSZMask = 0x00000004,
  263. SpvFPFastMathModeAllowRecipMask = 0x00000008,
  264. SpvFPFastMathModeFastMask = 0x00000010,
  265. } SpvFPFastMathModeMask;
  266. typedef enum SpvFPRoundingMode_ {
  267. SpvFPRoundingModeRTE = 0,
  268. SpvFPRoundingModeRTZ = 1,
  269. SpvFPRoundingModeRTP = 2,
  270. SpvFPRoundingModeRTN = 3,
  271. } SpvFPRoundingMode;
  272. typedef enum SpvLinkageType_ {
  273. SpvLinkageTypeExport = 0,
  274. SpvLinkageTypeImport = 1,
  275. } SpvLinkageType;
  276. typedef enum SpvAccessQualifier_ {
  277. SpvAccessQualifierReadOnly = 0,
  278. SpvAccessQualifierWriteOnly = 1,
  279. SpvAccessQualifierReadWrite = 2,
  280. } SpvAccessQualifier;
  281. typedef enum SpvFunctionParameterAttribute_ {
  282. SpvFunctionParameterAttributeZext = 0,
  283. SpvFunctionParameterAttributeSext = 1,
  284. SpvFunctionParameterAttributeByVal = 2,
  285. SpvFunctionParameterAttributeSret = 3,
  286. SpvFunctionParameterAttributeNoAlias = 4,
  287. SpvFunctionParameterAttributeNoCapture = 5,
  288. SpvFunctionParameterAttributeNoWrite = 6,
  289. SpvFunctionParameterAttributeNoReadWrite = 7,
  290. } SpvFunctionParameterAttribute;
  291. typedef enum SpvDecoration_ {
  292. SpvDecorationRelaxedPrecision = 0,
  293. SpvDecorationSpecId = 1,
  294. SpvDecorationBlock = 2,
  295. SpvDecorationBufferBlock = 3,
  296. SpvDecorationRowMajor = 4,
  297. SpvDecorationColMajor = 5,
  298. SpvDecorationArrayStride = 6,
  299. SpvDecorationMatrixStride = 7,
  300. SpvDecorationGLSLShared = 8,
  301. SpvDecorationGLSLPacked = 9,
  302. SpvDecorationCPacked = 10,
  303. SpvDecorationBuiltIn = 11,
  304. SpvDecorationNoPerspective = 13,
  305. SpvDecorationFlat = 14,
  306. SpvDecorationPatch = 15,
  307. SpvDecorationCentroid = 16,
  308. SpvDecorationSample = 17,
  309. SpvDecorationInvariant = 18,
  310. SpvDecorationRestrict = 19,
  311. SpvDecorationAliased = 20,
  312. SpvDecorationVolatile = 21,
  313. SpvDecorationConstant = 22,
  314. SpvDecorationCoherent = 23,
  315. SpvDecorationNonWritable = 24,
  316. SpvDecorationNonReadable = 25,
  317. SpvDecorationUniform = 26,
  318. SpvDecorationSaturatedConversion = 28,
  319. SpvDecorationStream = 29,
  320. SpvDecorationLocation = 30,
  321. SpvDecorationComponent = 31,
  322. SpvDecorationIndex = 32,
  323. SpvDecorationBinding = 33,
  324. SpvDecorationDescriptorSet = 34,
  325. SpvDecorationOffset = 35,
  326. SpvDecorationXfbBuffer = 36,
  327. SpvDecorationXfbStride = 37,
  328. SpvDecorationFuncParamAttr = 38,
  329. SpvDecorationFPRoundingMode = 39,
  330. SpvDecorationFPFastMathMode = 40,
  331. SpvDecorationLinkageAttributes = 41,
  332. SpvDecorationNoContraction = 42,
  333. SpvDecorationInputAttachmentIndex = 43,
  334. SpvDecorationAlignment = 44,
  335. } SpvDecoration;
  336. typedef enum SpvBuiltIn_ {
  337. SpvBuiltInPosition = 0,
  338. SpvBuiltInPointSize = 1,
  339. SpvBuiltInClipDistance = 3,
  340. SpvBuiltInCullDistance = 4,
  341. SpvBuiltInVertexId = 5,
  342. SpvBuiltInInstanceId = 6,
  343. SpvBuiltInPrimitiveId = 7,
  344. SpvBuiltInInvocationId = 8,
  345. SpvBuiltInLayer = 9,
  346. SpvBuiltInViewportIndex = 10,
  347. SpvBuiltInTessLevelOuter = 11,
  348. SpvBuiltInTessLevelInner = 12,
  349. SpvBuiltInTessCoord = 13,
  350. SpvBuiltInPatchVertices = 14,
  351. SpvBuiltInFragCoord = 15,
  352. SpvBuiltInPointCoord = 16,
  353. SpvBuiltInFrontFacing = 17,
  354. SpvBuiltInSampleId = 18,
  355. SpvBuiltInSamplePosition = 19,
  356. SpvBuiltInSampleMask = 20,
  357. SpvBuiltInFragDepth = 22,
  358. SpvBuiltInHelperInvocation = 23,
  359. SpvBuiltInNumWorkgroups = 24,
  360. SpvBuiltInWorkgroupSize = 25,
  361. SpvBuiltInWorkgroupId = 26,
  362. SpvBuiltInLocalInvocationId = 27,
  363. SpvBuiltInGlobalInvocationId = 28,
  364. SpvBuiltInLocalInvocationIndex = 29,
  365. SpvBuiltInWorkDim = 30,
  366. SpvBuiltInGlobalSize = 31,
  367. SpvBuiltInEnqueuedWorkgroupSize = 32,
  368. SpvBuiltInGlobalOffset = 33,
  369. SpvBuiltInGlobalLinearId = 34,
  370. SpvBuiltInSubgroupSize = 36,
  371. SpvBuiltInSubgroupMaxSize = 37,
  372. SpvBuiltInNumSubgroups = 38,
  373. SpvBuiltInNumEnqueuedSubgroups = 39,
  374. SpvBuiltInSubgroupId = 40,
  375. SpvBuiltInSubgroupLocalInvocationId = 41,
  376. SpvBuiltInVertexIndex = 42,
  377. SpvBuiltInInstanceIndex = 43,
  378. } SpvBuiltIn;
  379. typedef enum SpvSelectionControlShift_ {
  380. SpvSelectionControlFlattenShift = 0,
  381. SpvSelectionControlDontFlattenShift = 1,
  382. } SpvSelectionControlShift;
  383. typedef enum SpvSelectionControlMask_ {
  384. SpvSelectionControlMaskNone = 0,
  385. SpvSelectionControlFlattenMask = 0x00000001,
  386. SpvSelectionControlDontFlattenMask = 0x00000002,
  387. } SpvSelectionControlMask;
  388. typedef enum SpvLoopControlShift_ {
  389. SpvLoopControlUnrollShift = 0,
  390. SpvLoopControlDontUnrollShift = 1,
  391. } SpvLoopControlShift;
  392. typedef enum SpvLoopControlMask_ {
  393. SpvLoopControlMaskNone = 0,
  394. SpvLoopControlUnrollMask = 0x00000001,
  395. SpvLoopControlDontUnrollMask = 0x00000002,
  396. } SpvLoopControlMask;
  397. typedef enum SpvFunctionControlShift_ {
  398. SpvFunctionControlInlineShift = 0,
  399. SpvFunctionControlDontInlineShift = 1,
  400. SpvFunctionControlPureShift = 2,
  401. SpvFunctionControlConstShift = 3,
  402. } SpvFunctionControlShift;
  403. typedef enum SpvFunctionControlMask_ {
  404. SpvFunctionControlMaskNone = 0,
  405. SpvFunctionControlInlineMask = 0x00000001,
  406. SpvFunctionControlDontInlineMask = 0x00000002,
  407. SpvFunctionControlPureMask = 0x00000004,
  408. SpvFunctionControlConstMask = 0x00000008,
  409. } SpvFunctionControlMask;
  410. typedef enum SpvMemorySemanticsShift_ {
  411. SpvMemorySemanticsAcquireShift = 1,
  412. SpvMemorySemanticsReleaseShift = 2,
  413. SpvMemorySemanticsAcquireReleaseShift = 3,
  414. SpvMemorySemanticsSequentiallyConsistentShift = 4,
  415. SpvMemorySemanticsUniformMemoryShift = 6,
  416. SpvMemorySemanticsSubgroupMemoryShift = 7,
  417. SpvMemorySemanticsWorkgroupMemoryShift = 8,
  418. SpvMemorySemanticsCrossWorkgroupMemoryShift = 9,
  419. SpvMemorySemanticsAtomicCounterMemoryShift = 10,
  420. SpvMemorySemanticsImageMemoryShift = 11,
  421. } SpvMemorySemanticsShift;
  422. typedef enum SpvMemorySemanticsMask_ {
  423. SpvMemorySemanticsMaskNone = 0,
  424. SpvMemorySemanticsAcquireMask = 0x00000002,
  425. SpvMemorySemanticsReleaseMask = 0x00000004,
  426. SpvMemorySemanticsAcquireReleaseMask = 0x00000008,
  427. SpvMemorySemanticsSequentiallyConsistentMask = 0x00000010,
  428. SpvMemorySemanticsUniformMemoryMask = 0x00000040,
  429. SpvMemorySemanticsSubgroupMemoryMask = 0x00000080,
  430. SpvMemorySemanticsWorkgroupMemoryMask = 0x00000100,
  431. SpvMemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
  432. SpvMemorySemanticsAtomicCounterMemoryMask = 0x00000400,
  433. SpvMemorySemanticsImageMemoryMask = 0x00000800,
  434. } SpvMemorySemanticsMask;
  435. typedef enum SpvMemoryAccessShift_ {
  436. SpvMemoryAccessVolatileShift = 0,
  437. SpvMemoryAccessAlignedShift = 1,
  438. SpvMemoryAccessNontemporalShift = 2,
  439. } SpvMemoryAccessShift;
  440. typedef enum SpvMemoryAccessMask_ {
  441. SpvMemoryAccessMaskNone = 0,
  442. SpvMemoryAccessVolatileMask = 0x00000001,
  443. SpvMemoryAccessAlignedMask = 0x00000002,
  444. SpvMemoryAccessNontemporalMask = 0x00000004,
  445. } SpvMemoryAccessMask;
  446. typedef enum SpvScope_ {
  447. SpvScopeCrossDevice = 0,
  448. SpvScopeDevice = 1,
  449. SpvScopeWorkgroup = 2,
  450. SpvScopeSubgroup = 3,
  451. SpvScopeInvocation = 4,
  452. } SpvScope;
  453. typedef enum SpvGroupOperation_ {
  454. SpvGroupOperationReduce = 0,
  455. SpvGroupOperationInclusiveScan = 1,
  456. SpvGroupOperationExclusiveScan = 2,
  457. } SpvGroupOperation;
  458. typedef enum SpvKernelEnqueueFlags_ {
  459. SpvKernelEnqueueFlagsNoWait = 0,
  460. SpvKernelEnqueueFlagsWaitKernel = 1,
  461. SpvKernelEnqueueFlagsWaitWorkGroup = 2,
  462. } SpvKernelEnqueueFlags;
  463. typedef enum SpvKernelProfilingInfoShift_ {
  464. SpvKernelProfilingInfoCmdExecTimeShift = 0,
  465. } SpvKernelProfilingInfoShift;
  466. typedef enum SpvKernelProfilingInfoMask_ {
  467. SpvKernelProfilingInfoMaskNone = 0,
  468. SpvKernelProfilingInfoCmdExecTimeMask = 0x00000001,
  469. } SpvKernelProfilingInfoMask;
  470. typedef enum SpvCapability_ {
  471. SpvCapabilityMatrix = 0,
  472. SpvCapabilityShader = 1,
  473. SpvCapabilityGeometry = 2,
  474. SpvCapabilityTessellation = 3,
  475. SpvCapabilityAddresses = 4,
  476. SpvCapabilityLinkage = 5,
  477. SpvCapabilityKernel = 6,
  478. SpvCapabilityVector16 = 7,
  479. SpvCapabilityFloat16Buffer = 8,
  480. SpvCapabilityFloat16 = 9,
  481. SpvCapabilityFloat64 = 10,
  482. SpvCapabilityInt64 = 11,
  483. SpvCapabilityInt64Atomics = 12,
  484. SpvCapabilityImageBasic = 13,
  485. SpvCapabilityImageReadWrite = 14,
  486. SpvCapabilityImageMipmap = 15,
  487. SpvCapabilityPipes = 17,
  488. SpvCapabilityGroups = 18,
  489. SpvCapabilityDeviceEnqueue = 19,
  490. SpvCapabilityLiteralSampler = 20,
  491. SpvCapabilityAtomicStorage = 21,
  492. SpvCapabilityInt16 = 22,
  493. SpvCapabilityTessellationPointSize = 23,
  494. SpvCapabilityGeometryPointSize = 24,
  495. SpvCapabilityImageGatherExtended = 25,
  496. SpvCapabilityStorageImageMultisample = 27,
  497. SpvCapabilityUniformBufferArrayDynamicIndexing = 28,
  498. SpvCapabilitySampledImageArrayDynamicIndexing = 29,
  499. SpvCapabilityStorageBufferArrayDynamicIndexing = 30,
  500. SpvCapabilityStorageImageArrayDynamicIndexing = 31,
  501. SpvCapabilityClipDistance = 32,
  502. SpvCapabilityCullDistance = 33,
  503. SpvCapabilityImageCubeArray = 34,
  504. SpvCapabilitySampleRateShading = 35,
  505. SpvCapabilityImageRect = 36,
  506. SpvCapabilitySampledRect = 37,
  507. SpvCapabilityGenericPointer = 38,
  508. SpvCapabilityInt8 = 39,
  509. SpvCapabilityInputAttachment = 40,
  510. SpvCapabilitySparseResidency = 41,
  511. SpvCapabilityMinLod = 42,
  512. SpvCapabilitySampled1D = 43,
  513. SpvCapabilityImage1D = 44,
  514. SpvCapabilitySampledCubeArray = 45,
  515. SpvCapabilitySampledBuffer = 46,
  516. SpvCapabilityImageBuffer = 47,
  517. SpvCapabilityImageMSArray = 48,
  518. SpvCapabilityStorageImageExtendedFormats = 49,
  519. SpvCapabilityImageQuery = 50,
  520. SpvCapabilityDerivativeControl = 51,
  521. SpvCapabilityInterpolationFunction = 52,
  522. SpvCapabilityTransformFeedback = 53,
  523. SpvCapabilityGeometryStreams = 54,
  524. SpvCapabilityStorageImageReadWithoutFormat = 55,
  525. SpvCapabilityStorageImageWriteWithoutFormat = 56,
  526. SpvCapabilityMultiViewport = 57,
  527. } SpvCapability;
  528. typedef enum SpvOp_ {
  529. SpvOpNop = 0,
  530. SpvOpUndef = 1,
  531. SpvOpSourceContinued = 2,
  532. SpvOpSource = 3,
  533. SpvOpSourceExtension = 4,
  534. SpvOpName = 5,
  535. SpvOpMemberName = 6,
  536. SpvOpString = 7,
  537. SpvOpLine = 8,
  538. SpvOpExtension = 10,
  539. SpvOpExtInstImport = 11,
  540. SpvOpExtInst = 12,
  541. SpvOpMemoryModel = 14,
  542. SpvOpEntryPoint = 15,
  543. SpvOpExecutionMode = 16,
  544. SpvOpCapability = 17,
  545. SpvOpTypeVoid = 19,
  546. SpvOpTypeBool = 20,
  547. SpvOpTypeInt = 21,
  548. SpvOpTypeFloat = 22,
  549. SpvOpTypeVector = 23,
  550. SpvOpTypeMatrix = 24,
  551. SpvOpTypeImage = 25,
  552. SpvOpTypeSampler = 26,
  553. SpvOpTypeSampledImage = 27,
  554. SpvOpTypeArray = 28,
  555. SpvOpTypeRuntimeArray = 29,
  556. SpvOpTypeStruct = 30,
  557. SpvOpTypeOpaque = 31,
  558. SpvOpTypePointer = 32,
  559. SpvOpTypeFunction = 33,
  560. SpvOpTypeEvent = 34,
  561. SpvOpTypeDeviceEvent = 35,
  562. SpvOpTypeReserveId = 36,
  563. SpvOpTypeQueue = 37,
  564. SpvOpTypePipe = 38,
  565. SpvOpTypeForwardPointer = 39,
  566. SpvOpConstantTrue = 41,
  567. SpvOpConstantFalse = 42,
  568. SpvOpConstant = 43,
  569. SpvOpConstantComposite = 44,
  570. SpvOpConstantSampler = 45,
  571. SpvOpConstantNull = 46,
  572. SpvOpSpecConstantTrue = 48,
  573. SpvOpSpecConstantFalse = 49,
  574. SpvOpSpecConstant = 50,
  575. SpvOpSpecConstantComposite = 51,
  576. SpvOpSpecConstantOp = 52,
  577. SpvOpFunction = 54,
  578. SpvOpFunctionParameter = 55,
  579. SpvOpFunctionEnd = 56,
  580. SpvOpFunctionCall = 57,
  581. SpvOpVariable = 59,
  582. SpvOpImageTexelPointer = 60,
  583. SpvOpLoad = 61,
  584. SpvOpStore = 62,
  585. SpvOpCopyMemory = 63,
  586. SpvOpCopyMemorySized = 64,
  587. SpvOpAccessChain = 65,
  588. SpvOpInBoundsAccessChain = 66,
  589. SpvOpPtrAccessChain = 67,
  590. SpvOpArrayLength = 68,
  591. SpvOpGenericPtrMemSemantics = 69,
  592. SpvOpInBoundsPtrAccessChain = 70,
  593. SpvOpDecorate = 71,
  594. SpvOpMemberDecorate = 72,
  595. SpvOpDecorationGroup = 73,
  596. SpvOpGroupDecorate = 74,
  597. SpvOpGroupMemberDecorate = 75,
  598. SpvOpVectorExtractDynamic = 77,
  599. SpvOpVectorInsertDynamic = 78,
  600. SpvOpVectorShuffle = 79,
  601. SpvOpCompositeConstruct = 80,
  602. SpvOpCompositeExtract = 81,
  603. SpvOpCompositeInsert = 82,
  604. SpvOpCopyObject = 83,
  605. SpvOpTranspose = 84,
  606. SpvOpSampledImage = 86,
  607. SpvOpImageSampleImplicitLod = 87,
  608. SpvOpImageSampleExplicitLod = 88,
  609. SpvOpImageSampleDrefImplicitLod = 89,
  610. SpvOpImageSampleDrefExplicitLod = 90,
  611. SpvOpImageSampleProjImplicitLod = 91,
  612. SpvOpImageSampleProjExplicitLod = 92,
  613. SpvOpImageSampleProjDrefImplicitLod = 93,
  614. SpvOpImageSampleProjDrefExplicitLod = 94,
  615. SpvOpImageFetch = 95,
  616. SpvOpImageGather = 96,
  617. SpvOpImageDrefGather = 97,
  618. SpvOpImageRead = 98,
  619. SpvOpImageWrite = 99,
  620. SpvOpImage = 100,
  621. SpvOpImageQueryFormat = 101,
  622. SpvOpImageQueryOrder = 102,
  623. SpvOpImageQuerySizeLod = 103,
  624. SpvOpImageQuerySize = 104,
  625. SpvOpImageQueryLod = 105,
  626. SpvOpImageQueryLevels = 106,
  627. SpvOpImageQuerySamples = 107,
  628. SpvOpConvertFToU = 109,
  629. SpvOpConvertFToS = 110,
  630. SpvOpConvertSToF = 111,
  631. SpvOpConvertUToF = 112,
  632. SpvOpUConvert = 113,
  633. SpvOpSConvert = 114,
  634. SpvOpFConvert = 115,
  635. SpvOpQuantizeToF16 = 116,
  636. SpvOpConvertPtrToU = 117,
  637. SpvOpSatConvertSToU = 118,
  638. SpvOpSatConvertUToS = 119,
  639. SpvOpConvertUToPtr = 120,
  640. SpvOpPtrCastToGeneric = 121,
  641. SpvOpGenericCastToPtr = 122,
  642. SpvOpGenericCastToPtrExplicit = 123,
  643. SpvOpBitcast = 124,
  644. SpvOpSNegate = 126,
  645. SpvOpFNegate = 127,
  646. SpvOpIAdd = 128,
  647. SpvOpFAdd = 129,
  648. SpvOpISub = 130,
  649. SpvOpFSub = 131,
  650. SpvOpIMul = 132,
  651. SpvOpFMul = 133,
  652. SpvOpUDiv = 134,
  653. SpvOpSDiv = 135,
  654. SpvOpFDiv = 136,
  655. SpvOpUMod = 137,
  656. SpvOpSRem = 138,
  657. SpvOpSMod = 139,
  658. SpvOpFRem = 140,
  659. SpvOpFMod = 141,
  660. SpvOpVectorTimesScalar = 142,
  661. SpvOpMatrixTimesScalar = 143,
  662. SpvOpVectorTimesMatrix = 144,
  663. SpvOpMatrixTimesVector = 145,
  664. SpvOpMatrixTimesMatrix = 146,
  665. SpvOpOuterProduct = 147,
  666. SpvOpDot = 148,
  667. SpvOpIAddCarry = 149,
  668. SpvOpISubBorrow = 150,
  669. SpvOpUMulExtended = 151,
  670. SpvOpSMulExtended = 152,
  671. SpvOpAny = 154,
  672. SpvOpAll = 155,
  673. SpvOpIsNan = 156,
  674. SpvOpIsInf = 157,
  675. SpvOpIsFinite = 158,
  676. SpvOpIsNormal = 159,
  677. SpvOpSignBitSet = 160,
  678. SpvOpLessOrGreater = 161,
  679. SpvOpOrdered = 162,
  680. SpvOpUnordered = 163,
  681. SpvOpLogicalEqual = 164,
  682. SpvOpLogicalNotEqual = 165,
  683. SpvOpLogicalOr = 166,
  684. SpvOpLogicalAnd = 167,
  685. SpvOpLogicalNot = 168,
  686. SpvOpSelect = 169,
  687. SpvOpIEqual = 170,
  688. SpvOpINotEqual = 171,
  689. SpvOpUGreaterThan = 172,
  690. SpvOpSGreaterThan = 173,
  691. SpvOpUGreaterThanEqual = 174,
  692. SpvOpSGreaterThanEqual = 175,
  693. SpvOpULessThan = 176,
  694. SpvOpSLessThan = 177,
  695. SpvOpULessThanEqual = 178,
  696. SpvOpSLessThanEqual = 179,
  697. SpvOpFOrdEqual = 180,
  698. SpvOpFUnordEqual = 181,
  699. SpvOpFOrdNotEqual = 182,
  700. SpvOpFUnordNotEqual = 183,
  701. SpvOpFOrdLessThan = 184,
  702. SpvOpFUnordLessThan = 185,
  703. SpvOpFOrdGreaterThan = 186,
  704. SpvOpFUnordGreaterThan = 187,
  705. SpvOpFOrdLessThanEqual = 188,
  706. SpvOpFUnordLessThanEqual = 189,
  707. SpvOpFOrdGreaterThanEqual = 190,
  708. SpvOpFUnordGreaterThanEqual = 191,
  709. SpvOpShiftRightLogical = 194,
  710. SpvOpShiftRightArithmetic = 195,
  711. SpvOpShiftLeftLogical = 196,
  712. SpvOpBitwiseOr = 197,
  713. SpvOpBitwiseXor = 198,
  714. SpvOpBitwiseAnd = 199,
  715. SpvOpNot = 200,
  716. SpvOpBitFieldInsert = 201,
  717. SpvOpBitFieldSExtract = 202,
  718. SpvOpBitFieldUExtract = 203,
  719. SpvOpBitReverse = 204,
  720. SpvOpBitCount = 205,
  721. SpvOpDPdx = 207,
  722. SpvOpDPdy = 208,
  723. SpvOpFwidth = 209,
  724. SpvOpDPdxFine = 210,
  725. SpvOpDPdyFine = 211,
  726. SpvOpFwidthFine = 212,
  727. SpvOpDPdxCoarse = 213,
  728. SpvOpDPdyCoarse = 214,
  729. SpvOpFwidthCoarse = 215,
  730. SpvOpEmitVertex = 218,
  731. SpvOpEndPrimitive = 219,
  732. SpvOpEmitStreamVertex = 220,
  733. SpvOpEndStreamPrimitive = 221,
  734. SpvOpControlBarrier = 224,
  735. SpvOpMemoryBarrier = 225,
  736. SpvOpAtomicLoad = 227,
  737. SpvOpAtomicStore = 228,
  738. SpvOpAtomicExchange = 229,
  739. SpvOpAtomicCompareExchange = 230,
  740. SpvOpAtomicCompareExchangeWeak = 231,
  741. SpvOpAtomicIIncrement = 232,
  742. SpvOpAtomicIDecrement = 233,
  743. SpvOpAtomicIAdd = 234,
  744. SpvOpAtomicISub = 235,
  745. SpvOpAtomicSMin = 236,
  746. SpvOpAtomicUMin = 237,
  747. SpvOpAtomicSMax = 238,
  748. SpvOpAtomicUMax = 239,
  749. SpvOpAtomicAnd = 240,
  750. SpvOpAtomicOr = 241,
  751. SpvOpAtomicXor = 242,
  752. SpvOpPhi = 245,
  753. SpvOpLoopMerge = 246,
  754. SpvOpSelectionMerge = 247,
  755. SpvOpLabel = 248,
  756. SpvOpBranch = 249,
  757. SpvOpBranchConditional = 250,
  758. SpvOpSwitch = 251,
  759. SpvOpKill = 252,
  760. SpvOpReturn = 253,
  761. SpvOpReturnValue = 254,
  762. SpvOpUnreachable = 255,
  763. SpvOpLifetimeStart = 256,
  764. SpvOpLifetimeStop = 257,
  765. SpvOpGroupAsyncCopy = 259,
  766. SpvOpGroupWaitEvents = 260,
  767. SpvOpGroupAll = 261,
  768. SpvOpGroupAny = 262,
  769. SpvOpGroupBroadcast = 263,
  770. SpvOpGroupIAdd = 264,
  771. SpvOpGroupFAdd = 265,
  772. SpvOpGroupFMin = 266,
  773. SpvOpGroupUMin = 267,
  774. SpvOpGroupSMin = 268,
  775. SpvOpGroupFMax = 269,
  776. SpvOpGroupUMax = 270,
  777. SpvOpGroupSMax = 271,
  778. SpvOpReadPipe = 274,
  779. SpvOpWritePipe = 275,
  780. SpvOpReservedReadPipe = 276,
  781. SpvOpReservedWritePipe = 277,
  782. SpvOpReserveReadPipePackets = 278,
  783. SpvOpReserveWritePipePackets = 279,
  784. SpvOpCommitReadPipe = 280,
  785. SpvOpCommitWritePipe = 281,
  786. SpvOpIsValidReserveId = 282,
  787. SpvOpGetNumPipePackets = 283,
  788. SpvOpGetMaxPipePackets = 284,
  789. SpvOpGroupReserveReadPipePackets = 285,
  790. SpvOpGroupReserveWritePipePackets = 286,
  791. SpvOpGroupCommitReadPipe = 287,
  792. SpvOpGroupCommitWritePipe = 288,
  793. SpvOpEnqueueMarker = 291,
  794. SpvOpEnqueueKernel = 292,
  795. SpvOpGetKernelNDrangeSubGroupCount = 293,
  796. SpvOpGetKernelNDrangeMaxSubGroupSize = 294,
  797. SpvOpGetKernelWorkGroupSize = 295,
  798. SpvOpGetKernelPreferredWorkGroupSizeMultiple = 296,
  799. SpvOpRetainEvent = 297,
  800. SpvOpReleaseEvent = 298,
  801. SpvOpCreateUserEvent = 299,
  802. SpvOpIsValidEvent = 300,
  803. SpvOpSetUserEventStatus = 301,
  804. SpvOpCaptureEventProfilingInfo = 302,
  805. SpvOpGetDefaultQueue = 303,
  806. SpvOpBuildNDRange = 304,
  807. SpvOpImageSparseSampleImplicitLod = 305,
  808. SpvOpImageSparseSampleExplicitLod = 306,
  809. SpvOpImageSparseSampleDrefImplicitLod = 307,
  810. SpvOpImageSparseSampleDrefExplicitLod = 308,
  811. SpvOpImageSparseSampleProjImplicitLod = 309,
  812. SpvOpImageSparseSampleProjExplicitLod = 310,
  813. SpvOpImageSparseSampleProjDrefImplicitLod = 311,
  814. SpvOpImageSparseSampleProjDrefExplicitLod = 312,
  815. SpvOpImageSparseFetch = 313,
  816. SpvOpImageSparseGather = 314,
  817. SpvOpImageSparseDrefGather = 315,
  818. SpvOpImageSparseTexelsResident = 316,
  819. SpvOpNoLine = 317,
  820. SpvOpAtomicFlagTestAndSet = 318,
  821. SpvOpAtomicFlagClear = 319,
  822. SpvOpImageSparseRead = 320,
  823. } SpvOp;
  824. #endif // #ifndef spirv_H