doc.cpp 137 KB

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