webgpu.h 245 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888
  1. // BSD 3-Clause License
  2. //
  3. // Copyright (c) 2019, "WebGPU native" developers
  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 are met:
  8. //
  9. // 1. Redistributions of source code must retain the above copyright notice, this
  10. // list of conditions and the following disclaimer.
  11. //
  12. // 2. Redistributions in binary form must reproduce the above copyright notice,
  13. // this list of conditions and the following disclaimer in the documentation
  14. // and/or other materials provided with the distribution.
  15. //
  16. // 3. Neither the name of the copyright holder nor the names of its
  17. // contributors may be used to endorse or promote products derived from
  18. // this software without specific prior written permission.
  19. //
  20. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  21. // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  22. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  23. // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  24. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  25. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  26. // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  27. // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28. // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  29. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  30. #ifdef __EMSCRIPTEN__
  31. #error "Do not include this header. Emscripten already provides headers needed for WebGPU."
  32. #endif
  33. #ifndef WEBGPU_H_
  34. #define WEBGPU_H_
  35. #if defined(WGPU_SHARED_LIBRARY)
  36. # if defined(_WIN32)
  37. # if defined(WGPU_IMPLEMENTATION)
  38. # define WGPU_EXPORT __declspec(dllexport)
  39. # else
  40. # define WGPU_EXPORT __declspec(dllimport)
  41. # endif
  42. # else // defined(_WIN32)
  43. # if defined(WGPU_IMPLEMENTATION)
  44. # define WGPU_EXPORT __attribute__((visibility("default")))
  45. # else
  46. # define WGPU_EXPORT
  47. # endif
  48. # endif // defined(_WIN32)
  49. #else // defined(WGPU_SHARED_LIBRARY)
  50. # define WGPU_EXPORT
  51. #endif // defined(WGPU_SHARED_LIBRARY)
  52. #if !defined(WGPU_OBJECT_ATTRIBUTE)
  53. #define WGPU_OBJECT_ATTRIBUTE
  54. #endif
  55. #if !defined(WGPU_ENUM_ATTRIBUTE)
  56. #define WGPU_ENUM_ATTRIBUTE
  57. #endif
  58. #if !defined(WGPU_STRUCTURE_ATTRIBUTE)
  59. #define WGPU_STRUCTURE_ATTRIBUTE
  60. #endif
  61. #if !defined(WGPU_FUNCTION_ATTRIBUTE)
  62. #define WGPU_FUNCTION_ATTRIBUTE
  63. #endif
  64. #if !defined(WGPU_NULLABLE)
  65. #define WGPU_NULLABLE
  66. #endif
  67. #include <stdint.h>
  68. #include <stddef.h>
  69. #include <math.h>
  70. #define _wgpu_COMMA ,
  71. #if defined(__cplusplus)
  72. # define _wgpu_ENUM_ZERO_INIT(type) type(0)
  73. # define _wgpu_STRUCT_ZERO_INIT {}
  74. # if __cplusplus >= 201103L
  75. # define _wgpu_MAKE_INIT_STRUCT(type, value) (type value)
  76. # else
  77. # define _wgpu_MAKE_INIT_STRUCT(type, value) value
  78. # endif
  79. #else
  80. # define _wgpu_ENUM_ZERO_INIT(type) (type)0
  81. # define _wgpu_STRUCT_ZERO_INIT {0}
  82. # if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  83. # define _wgpu_MAKE_INIT_STRUCT(type, value) ((type) value)
  84. # else
  85. # define _wgpu_MAKE_INIT_STRUCT(type, value) value
  86. # endif
  87. #endif
  88. #define WGPU_TRUE (UINT32_C(1))
  89. #define WGPU_FALSE (UINT32_C(0))
  90. #define WGPU_ARRAY_LAYER_COUNT_UNDEFINED (UINT32_MAX)
  91. #define WGPU_COPY_STRIDE_UNDEFINED (UINT32_MAX)
  92. #define WGPU_DEPTH_CLEAR_VALUE_UNDEFINED (NAN)
  93. #define WGPU_DEPTH_SLICE_UNDEFINED (UINT32_MAX)
  94. #define WGPU_INVALID_BINDING (UINT32_MAX)
  95. #define WGPU_LIMIT_U32_UNDEFINED (UINT32_MAX)
  96. #define WGPU_LIMIT_U64_UNDEFINED (UINT64_MAX)
  97. #define WGPU_MIP_LEVEL_COUNT_UNDEFINED (UINT32_MAX)
  98. #define WGPU_QUERY_SET_INDEX_UNDEFINED (UINT32_MAX)
  99. #define WGPU_STRLEN (SIZE_MAX)
  100. #define WGPU_WHOLE_MAP_SIZE (SIZE_MAX)
  101. #define WGPU_WHOLE_SIZE (UINT64_MAX)
  102. typedef struct WGPUStringView {
  103. WGPU_NULLABLE char const * data;
  104. size_t length;
  105. } WGPUStringView WGPU_STRUCTURE_ATTRIBUTE;
  106. #define WGPU_STRING_VIEW_INIT _wgpu_MAKE_INIT_STRUCT(WGPUStringView, { \
  107. /*.data=*/NULL _wgpu_COMMA \
  108. /*.length=*/WGPU_STRLEN _wgpu_COMMA \
  109. })
  110. typedef uint64_t WGPUFlags;
  111. typedef uint32_t WGPUBool;
  112. typedef struct WGPUAdapterImpl* WGPUAdapter WGPU_OBJECT_ATTRIBUTE;
  113. typedef struct WGPUBindGroupImpl* WGPUBindGroup WGPU_OBJECT_ATTRIBUTE;
  114. typedef struct WGPUBindGroupLayoutImpl* WGPUBindGroupLayout WGPU_OBJECT_ATTRIBUTE;
  115. typedef struct WGPUBufferImpl* WGPUBuffer WGPU_OBJECT_ATTRIBUTE;
  116. typedef struct WGPUCommandBufferImpl* WGPUCommandBuffer WGPU_OBJECT_ATTRIBUTE;
  117. typedef struct WGPUComputePipelineImpl* WGPUComputePipeline WGPU_OBJECT_ATTRIBUTE;
  118. typedef struct WGPUDeviceImpl* WGPUDevice WGPU_OBJECT_ATTRIBUTE;
  119. typedef struct WGPUExternalTextureImpl* WGPUExternalTexture WGPU_OBJECT_ATTRIBUTE;
  120. typedef struct WGPUInstanceImpl* WGPUInstance WGPU_OBJECT_ATTRIBUTE;
  121. typedef struct WGPUPipelineLayoutImpl* WGPUPipelineLayout WGPU_OBJECT_ATTRIBUTE;
  122. typedef struct WGPUQuerySetImpl* WGPUQuerySet WGPU_OBJECT_ATTRIBUTE;
  123. typedef struct WGPUQueueImpl* WGPUQueue WGPU_OBJECT_ATTRIBUTE;
  124. typedef struct WGPURenderBundleImpl* WGPURenderBundle WGPU_OBJECT_ATTRIBUTE;
  125. typedef struct WGPURenderPipelineImpl* WGPURenderPipeline WGPU_OBJECT_ATTRIBUTE;
  126. typedef struct WGPUResourceTableImpl* WGPUResourceTable WGPU_OBJECT_ATTRIBUTE;
  127. typedef struct WGPUSamplerImpl* WGPUSampler WGPU_OBJECT_ATTRIBUTE;
  128. typedef struct WGPUShaderModuleImpl* WGPUShaderModule WGPU_OBJECT_ATTRIBUTE;
  129. typedef struct WGPUSharedBufferMemoryImpl* WGPUSharedBufferMemory WGPU_OBJECT_ATTRIBUTE;
  130. typedef struct WGPUSharedFenceImpl* WGPUSharedFence WGPU_OBJECT_ATTRIBUTE;
  131. typedef struct WGPUSharedTextureMemoryImpl* WGPUSharedTextureMemory WGPU_OBJECT_ATTRIBUTE;
  132. typedef struct WGPUSurfaceImpl* WGPUSurface WGPU_OBJECT_ATTRIBUTE;
  133. typedef struct WGPUTexelBufferViewImpl* WGPUTexelBufferView WGPU_OBJECT_ATTRIBUTE;
  134. typedef struct WGPUTextureImpl* WGPUTexture WGPU_OBJECT_ATTRIBUTE;
  135. typedef struct WGPUTextureViewImpl* WGPUTextureView WGPU_OBJECT_ATTRIBUTE;
  136. typedef struct WGPUCommandEncoderImpl* WGPUCommandEncoder WGPU_OBJECT_ATTRIBUTE;
  137. typedef struct WGPUComputePassEncoderImpl* WGPUComputePassEncoder WGPU_OBJECT_ATTRIBUTE;
  138. typedef struct WGPURenderBundleEncoderImpl* WGPURenderBundleEncoder WGPU_OBJECT_ATTRIBUTE;
  139. typedef struct WGPURenderPassEncoderImpl* WGPURenderPassEncoder WGPU_OBJECT_ATTRIBUTE;
  140. // Structure forward declarations
  141. struct WGPUAdapterPropertiesD3D;
  142. struct WGPUAdapterPropertiesVk;
  143. struct WGPUAdapterPropertiesWGPU;
  144. struct WGPUBindingResource;
  145. struct WGPUBlendComponent;
  146. struct WGPUBufferBindingLayout;
  147. struct WGPUBufferHostMappedPointer;
  148. struct WGPUColor;
  149. struct WGPUColorTargetStateExpandResolveTextureDawn;
  150. struct WGPUCommandBufferDescriptor;
  151. struct WGPUCompatibilityModeLimits;
  152. struct WGPUConstantEntry;
  153. struct WGPUCopyTextureForBrowserOptions;
  154. struct WGPUDawnAdapterPropertiesPowerPreference;
  155. struct WGPUDawnBufferDescriptorErrorInfoFromWireClient;
  156. struct WGPUDawnCacheDeviceDescriptor;
  157. struct WGPUDawnCompilationMessageUtf16;
  158. struct WGPUDawnConsumeAdapterDescriptor;
  159. struct WGPUDawnDeviceAllocatorControl;
  160. struct WGPUDawnDrmFormatProperties;
  161. struct WGPUDawnEncoderInternalUsageDescriptor;
  162. struct WGPUDawnFakeBufferOOMForTesting;
  163. struct WGPUDawnFakeDeviceInitializeErrorForTesting;
  164. struct WGPUDawnHostMappedPointerLimits;
  165. struct WGPUDawnInjectedInvalidSType;
  166. struct WGPUDawnRenderPassColorAttachmentRenderToSingleSampled;
  167. struct WGPUDawnShaderModuleSPIRVOptionsDescriptor;
  168. struct WGPUDawnTexelCopyBufferRowAlignmentLimits;
  169. struct WGPUDawnTextureInternalUsageDescriptor;
  170. struct WGPUDawnTogglesDescriptor;
  171. struct WGPUDawnWGSLBlocklist;
  172. struct WGPUDawnWireWGSLControl;
  173. struct WGPUEmscriptenSurfaceSourceCanvasHTMLSelector;
  174. struct WGPUExtent2D;
  175. struct WGPUExtent3D;
  176. struct WGPUExternalTextureBindingEntry;
  177. struct WGPUExternalTextureBindingLayout;
  178. struct WGPUFuture;
  179. struct WGPUInstanceLimits;
  180. struct WGPUINTERNAL_HAVE_EMDAWNWEBGPU_HEADER;
  181. struct WGPUMemoryHeapInfo;
  182. struct WGPUMultisampleState;
  183. struct WGPUOrigin2D;
  184. struct WGPUOrigin3D;
  185. struct WGPUPassTimestampWrites;
  186. struct WGPUPipelineLayoutResourceTable;
  187. struct WGPUPipelineLayoutStorageAttachment;
  188. struct WGPUPrimitiveState;
  189. struct WGPUQuerySetDescriptor;
  190. struct WGPUQueueDescriptor;
  191. struct WGPURenderBundleDescriptor;
  192. struct WGPURenderBundleEncoderDescriptor;
  193. struct WGPURenderPassDepthStencilAttachment;
  194. struct WGPURenderPassDescriptorExpandResolveRect;
  195. struct WGPURenderPassDescriptorResolveRect;
  196. struct WGPURenderPassMaxDrawCount;
  197. struct WGPURequestAdapterWebGPUBackendOptions;
  198. struct WGPURequestAdapterWebXROptions;
  199. struct WGPUResourceTableDescriptor;
  200. struct WGPUResourceTableLimits;
  201. struct WGPUSamplerBindingLayout;
  202. struct WGPUShaderModuleCompilationOptions;
  203. struct WGPUShaderSourceSPIRV;
  204. struct WGPUShaderSourceWGSL;
  205. struct WGPUSharedBufferMemoryBeginAccessDescriptor;
  206. struct WGPUSharedBufferMemoryDescriptor;
  207. struct WGPUSharedBufferMemoryEndAccessState;
  208. struct WGPUSharedBufferMemoryProperties;
  209. struct WGPUSharedFenceDXGISharedHandleDescriptor;
  210. struct WGPUSharedFenceDXGISharedHandleExportInfo;
  211. struct WGPUSharedFenceEGLSyncDescriptor;
  212. struct WGPUSharedFenceEGLSyncExportInfo;
  213. struct WGPUSharedFenceMTLSharedEventDescriptor;
  214. struct WGPUSharedFenceMTLSharedEventExportInfo;
  215. struct WGPUSharedFenceSyncFDDescriptor;
  216. struct WGPUSharedFenceSyncFDExportInfo;
  217. struct WGPUSharedFenceVkSemaphoreOpaqueFDDescriptor;
  218. struct WGPUSharedFenceVkSemaphoreOpaqueFDExportInfo;
  219. struct WGPUSharedFenceVkSemaphoreZirconHandleDescriptor;
  220. struct WGPUSharedFenceVkSemaphoreZirconHandleExportInfo;
  221. struct WGPUSharedTextureMemoryAHardwareBufferDescriptor;
  222. struct WGPUSharedTextureMemoryD3D11BeginState;
  223. struct WGPUSharedTextureMemoryD3DSwapchainBeginState;
  224. struct WGPUSharedTextureMemoryDmaBufPlane;
  225. struct WGPUSharedTextureMemoryDXGISharedHandleDescriptor;
  226. struct WGPUSharedTextureMemoryEGLImageDescriptor;
  227. struct WGPUSharedTextureMemoryIOSurfaceDescriptor;
  228. struct WGPUSharedTextureMemoryOpaqueFDDescriptor;
  229. struct WGPUSharedTextureMemoryVkDedicatedAllocationDescriptor;
  230. struct WGPUSharedTextureMemoryVkImageLayoutBeginState;
  231. struct WGPUSharedTextureMemoryVkImageLayoutEndState;
  232. struct WGPUSharedTextureMemoryZirconHandleDescriptor;
  233. struct WGPUStaticSamplerBindingLayout;
  234. struct WGPUStencilFaceState;
  235. struct WGPUStorageTextureBindingLayout;
  236. struct WGPUSubgroupMatrixConfig;
  237. struct WGPUSupportedFeatures;
  238. struct WGPUSupportedInstanceFeatures;
  239. struct WGPUSupportedWGSLLanguageFeatures;
  240. struct WGPUSurfaceCapabilities;
  241. struct WGPUSurfaceColorManagement;
  242. struct WGPUSurfaceConfiguration;
  243. struct WGPUSurfaceDescriptorFromWindowsCoreWindow;
  244. struct WGPUSurfaceDescriptorFromWindowsUWPSwapChainPanel;
  245. struct WGPUSurfaceDescriptorFromWindowsWinUISwapChainPanel;
  246. struct WGPUSurfaceSourceAndroidNativeWindow;
  247. struct WGPUSurfaceSourceMetalLayer;
  248. struct WGPUSurfaceSourceWaylandSurface;
  249. struct WGPUSurfaceSourceWindowsHWND;
  250. struct WGPUSurfaceSourceXCBWindow;
  251. struct WGPUSurfaceSourceXlibWindow;
  252. struct WGPUSurfaceTexture;
  253. struct WGPUTexelBufferBindingEntry;
  254. struct WGPUTexelBufferBindingLayout;
  255. struct WGPUTexelBufferViewDescriptor;
  256. struct WGPUTexelCopyBufferLayout;
  257. struct WGPUTextureBindingLayout;
  258. struct WGPUTextureBindingViewDimensionDescriptor;
  259. struct WGPUTextureComponentSwizzle;
  260. struct WGPUVertexAttribute;
  261. struct WGPUYCbCrVkDescriptor;
  262. struct WGPUAdapterPropertiesMemoryHeaps;
  263. struct WGPUAdapterPropertiesSubgroupMatrixConfigs;
  264. struct WGPUAHardwareBufferProperties;
  265. struct WGPUBindGroupEntry;
  266. struct WGPUBindGroupLayoutEntry;
  267. struct WGPUBlendState;
  268. struct WGPUBufferDescriptor;
  269. struct WGPUCommandEncoderDescriptor;
  270. struct WGPUCompilationMessage;
  271. struct WGPUComputePassDescriptor;
  272. struct WGPUComputeState;
  273. struct WGPUDawnDrmFormatCapabilities;
  274. struct WGPUDepthStencilState;
  275. struct WGPUExternalTextureDescriptor;
  276. struct WGPUFutureWaitInfo;
  277. struct WGPUImageCopyExternalTexture;
  278. struct WGPUInstanceDescriptor;
  279. struct WGPULimits;
  280. struct WGPUPipelineLayoutPixelLocalStorage;
  281. struct WGPURenderPassColorAttachment;
  282. struct WGPURenderPassStorageAttachment;
  283. struct WGPURequestAdapterOptions;
  284. struct WGPUSamplerDescriptor;
  285. struct WGPUShaderModuleDescriptor;
  286. struct WGPUSharedFenceDescriptor;
  287. struct WGPUSharedFenceExportInfo;
  288. struct WGPUSharedTextureMemoryAHardwareBufferProperties;
  289. struct WGPUSharedTextureMemoryBeginAccessDescriptor;
  290. struct WGPUSharedTextureMemoryDmaBufDescriptor;
  291. struct WGPUSharedTextureMemoryMetalEndAccessState;
  292. struct WGPUSurfaceDescriptor;
  293. struct WGPUTexelCopyBufferInfo;
  294. struct WGPUTexelCopyTextureInfo;
  295. struct WGPUTextureComponentSwizzleDescriptor;
  296. struct WGPUTextureDescriptor;
  297. struct WGPUVertexBufferLayout;
  298. struct WGPUAdapterInfo;
  299. struct WGPUBindGroupDescriptor;
  300. struct WGPUBindGroupLayoutDescriptor;
  301. struct WGPUColorTargetState;
  302. struct WGPUCompilationInfo;
  303. struct WGPUComputePipelineDescriptor;
  304. struct WGPUDawnFormatCapabilities;
  305. struct WGPUDeviceDescriptor;
  306. struct WGPUPipelineLayoutDescriptor;
  307. struct WGPURenderPassPixelLocalStorage;
  308. struct WGPUSharedTextureMemoryDescriptor;
  309. struct WGPUSharedTextureMemoryEndAccessState;
  310. struct WGPUSharedTextureMemoryProperties;
  311. struct WGPUTextureViewDescriptor;
  312. struct WGPUVertexState;
  313. struct WGPUFragmentState;
  314. struct WGPURenderPassDescriptor;
  315. struct WGPURenderPipelineDescriptor;
  316. // Callback info structure forward declarations.
  317. struct WGPUBufferMapCallbackInfo;
  318. struct WGPUCompilationInfoCallbackInfo;
  319. struct WGPUCreateComputePipelineAsyncCallbackInfo;
  320. struct WGPUCreateRenderPipelineAsyncCallbackInfo;
  321. struct WGPUDeviceLostCallbackInfo;
  322. struct WGPULoggingCallbackInfo;
  323. struct WGPUPopErrorScopeCallbackInfo;
  324. struct WGPUQueueWorkDoneCallbackInfo;
  325. struct WGPURequestAdapterCallbackInfo;
  326. struct WGPURequestDeviceCallbackInfo;
  327. struct WGPUUncapturedErrorCallbackInfo;
  328. typedef enum WGPUAdapterType {
  329. WGPUAdapterType_DiscreteGPU = 0x00000001,
  330. WGPUAdapterType_IntegratedGPU = 0x00000002,
  331. WGPUAdapterType_CPU = 0x00000003,
  332. WGPUAdapterType_Unknown = 0x00000004,
  333. WGPUAdapterType_Force32 = 0x7FFFFFFF
  334. } WGPUAdapterType WGPU_ENUM_ATTRIBUTE;
  335. typedef enum WGPUAddressMode {
  336. WGPUAddressMode_Undefined = 0x00000000,
  337. WGPUAddressMode_ClampToEdge = 0x00000001,
  338. WGPUAddressMode_Repeat = 0x00000002,
  339. WGPUAddressMode_MirrorRepeat = 0x00000003,
  340. WGPUAddressMode_Force32 = 0x7FFFFFFF
  341. } WGPUAddressMode WGPU_ENUM_ATTRIBUTE;
  342. typedef enum WGPUAlphaMode {
  343. WGPUAlphaMode_Opaque = 0x00000001,
  344. WGPUAlphaMode_Premultiplied = 0x00000002,
  345. WGPUAlphaMode_Unpremultiplied = 0x00000003,
  346. WGPUAlphaMode_Force32 = 0x7FFFFFFF
  347. } WGPUAlphaMode WGPU_ENUM_ATTRIBUTE;
  348. typedef enum WGPUBackendType {
  349. WGPUBackendType_Undefined = 0x00000000,
  350. WGPUBackendType_Null = 0x00000001,
  351. WGPUBackendType_WebGPU = 0x00000002,
  352. WGPUBackendType_D3D11 = 0x00000003,
  353. WGPUBackendType_D3D12 = 0x00000004,
  354. WGPUBackendType_Metal = 0x00000005,
  355. WGPUBackendType_Vulkan = 0x00000006,
  356. WGPUBackendType_OpenGL = 0x00000007,
  357. WGPUBackendType_OpenGLES = 0x00000008,
  358. WGPUBackendType_Force32 = 0x7FFFFFFF
  359. } WGPUBackendType WGPU_ENUM_ATTRIBUTE;
  360. typedef enum WGPUBlendFactor {
  361. WGPUBlendFactor_Undefined = 0x00000000,
  362. WGPUBlendFactor_Zero = 0x00000001,
  363. WGPUBlendFactor_One = 0x00000002,
  364. WGPUBlendFactor_Src = 0x00000003,
  365. WGPUBlendFactor_OneMinusSrc = 0x00000004,
  366. WGPUBlendFactor_SrcAlpha = 0x00000005,
  367. WGPUBlendFactor_OneMinusSrcAlpha = 0x00000006,
  368. WGPUBlendFactor_Dst = 0x00000007,
  369. WGPUBlendFactor_OneMinusDst = 0x00000008,
  370. WGPUBlendFactor_DstAlpha = 0x00000009,
  371. WGPUBlendFactor_OneMinusDstAlpha = 0x0000000A,
  372. WGPUBlendFactor_SrcAlphaSaturated = 0x0000000B,
  373. WGPUBlendFactor_Constant = 0x0000000C,
  374. WGPUBlendFactor_OneMinusConstant = 0x0000000D,
  375. WGPUBlendFactor_Src1 = 0x0000000E,
  376. WGPUBlendFactor_OneMinusSrc1 = 0x0000000F,
  377. WGPUBlendFactor_Src1Alpha = 0x00000010,
  378. WGPUBlendFactor_OneMinusSrc1Alpha = 0x00000011,
  379. WGPUBlendFactor_Force32 = 0x7FFFFFFF
  380. } WGPUBlendFactor WGPU_ENUM_ATTRIBUTE;
  381. typedef enum WGPUBlendOperation {
  382. WGPUBlendOperation_Undefined = 0x00000000,
  383. WGPUBlendOperation_Add = 0x00000001,
  384. WGPUBlendOperation_Subtract = 0x00000002,
  385. WGPUBlendOperation_ReverseSubtract = 0x00000003,
  386. WGPUBlendOperation_Min = 0x00000004,
  387. WGPUBlendOperation_Max = 0x00000005,
  388. WGPUBlendOperation_Force32 = 0x7FFFFFFF
  389. } WGPUBlendOperation WGPU_ENUM_ATTRIBUTE;
  390. typedef enum WGPUBufferBindingType {
  391. WGPUBufferBindingType_BindingNotUsed = 0x00000000,
  392. WGPUBufferBindingType_Undefined = 0x00000001,
  393. WGPUBufferBindingType_Uniform = 0x00000002,
  394. WGPUBufferBindingType_Storage = 0x00000003,
  395. WGPUBufferBindingType_ReadOnlyStorage = 0x00000004,
  396. WGPUBufferBindingType_Force32 = 0x7FFFFFFF
  397. } WGPUBufferBindingType WGPU_ENUM_ATTRIBUTE;
  398. typedef enum WGPUBufferMapState {
  399. WGPUBufferMapState_Unmapped = 0x00000001,
  400. WGPUBufferMapState_Pending = 0x00000002,
  401. WGPUBufferMapState_Mapped = 0x00000003,
  402. WGPUBufferMapState_Force32 = 0x7FFFFFFF
  403. } WGPUBufferMapState WGPU_ENUM_ATTRIBUTE;
  404. typedef enum WGPUCallbackMode {
  405. WGPUCallbackMode_WaitAnyOnly = 0x00000001,
  406. WGPUCallbackMode_AllowProcessEvents = 0x00000002,
  407. WGPUCallbackMode_AllowSpontaneous = 0x00000003,
  408. WGPUCallbackMode_Force32 = 0x7FFFFFFF
  409. } WGPUCallbackMode WGPU_ENUM_ATTRIBUTE;
  410. typedef enum WGPUCompareFunction {
  411. WGPUCompareFunction_Undefined = 0x00000000,
  412. WGPUCompareFunction_Never = 0x00000001,
  413. WGPUCompareFunction_Less = 0x00000002,
  414. WGPUCompareFunction_Equal = 0x00000003,
  415. WGPUCompareFunction_LessEqual = 0x00000004,
  416. WGPUCompareFunction_Greater = 0x00000005,
  417. WGPUCompareFunction_NotEqual = 0x00000006,
  418. WGPUCompareFunction_GreaterEqual = 0x00000007,
  419. WGPUCompareFunction_Always = 0x00000008,
  420. WGPUCompareFunction_Force32 = 0x7FFFFFFF
  421. } WGPUCompareFunction WGPU_ENUM_ATTRIBUTE;
  422. typedef enum WGPUCompilationInfoRequestStatus {
  423. WGPUCompilationInfoRequestStatus_Success = 0x00000001,
  424. WGPUCompilationInfoRequestStatus_CallbackCancelled = 0x00000002,
  425. WGPUCompilationInfoRequestStatus_Force32 = 0x7FFFFFFF
  426. } WGPUCompilationInfoRequestStatus WGPU_ENUM_ATTRIBUTE;
  427. typedef enum WGPUCompilationMessageType {
  428. WGPUCompilationMessageType_Error = 0x00000001,
  429. WGPUCompilationMessageType_Warning = 0x00000002,
  430. WGPUCompilationMessageType_Info = 0x00000003,
  431. WGPUCompilationMessageType_Force32 = 0x7FFFFFFF
  432. } WGPUCompilationMessageType WGPU_ENUM_ATTRIBUTE;
  433. typedef enum WGPUComponentSwizzle {
  434. WGPUComponentSwizzle_Undefined = 0x00000000,
  435. WGPUComponentSwizzle_Zero = 0x00000001,
  436. WGPUComponentSwizzle_One = 0x00000002,
  437. WGPUComponentSwizzle_R = 0x00000003,
  438. WGPUComponentSwizzle_G = 0x00000004,
  439. WGPUComponentSwizzle_B = 0x00000005,
  440. WGPUComponentSwizzle_A = 0x00000006,
  441. WGPUComponentSwizzle_Force32 = 0x7FFFFFFF
  442. } WGPUComponentSwizzle WGPU_ENUM_ATTRIBUTE;
  443. typedef enum WGPUCompositeAlphaMode {
  444. WGPUCompositeAlphaMode_Auto = 0x00000000,
  445. WGPUCompositeAlphaMode_Opaque = 0x00000001,
  446. WGPUCompositeAlphaMode_Premultiplied = 0x00000002,
  447. WGPUCompositeAlphaMode_Unpremultiplied = 0x00000003,
  448. WGPUCompositeAlphaMode_Inherit = 0x00000004,
  449. WGPUCompositeAlphaMode_Force32 = 0x7FFFFFFF
  450. } WGPUCompositeAlphaMode WGPU_ENUM_ATTRIBUTE;
  451. typedef enum WGPUCreatePipelineAsyncStatus {
  452. WGPUCreatePipelineAsyncStatus_Success = 0x00000001,
  453. WGPUCreatePipelineAsyncStatus_CallbackCancelled = 0x00000002,
  454. WGPUCreatePipelineAsyncStatus_ValidationError = 0x00000003,
  455. WGPUCreatePipelineAsyncStatus_InternalError = 0x00000004,
  456. WGPUCreatePipelineAsyncStatus_Force32 = 0x7FFFFFFF
  457. } WGPUCreatePipelineAsyncStatus WGPU_ENUM_ATTRIBUTE;
  458. typedef enum WGPUCullMode {
  459. WGPUCullMode_Undefined = 0x00000000,
  460. WGPUCullMode_None = 0x00000001,
  461. WGPUCullMode_Front = 0x00000002,
  462. WGPUCullMode_Back = 0x00000003,
  463. WGPUCullMode_Force32 = 0x7FFFFFFF
  464. } WGPUCullMode WGPU_ENUM_ATTRIBUTE;
  465. typedef enum WGPUDeviceLostReason {
  466. WGPUDeviceLostReason_Unknown = 0x00000001,
  467. WGPUDeviceLostReason_Destroyed = 0x00000002,
  468. WGPUDeviceLostReason_CallbackCancelled = 0x00000003,
  469. WGPUDeviceLostReason_FailedCreation = 0x00000004,
  470. WGPUDeviceLostReason_Force32 = 0x7FFFFFFF
  471. } WGPUDeviceLostReason WGPU_ENUM_ATTRIBUTE;
  472. typedef enum WGPUErrorFilter {
  473. WGPUErrorFilter_Validation = 0x00000001,
  474. WGPUErrorFilter_OutOfMemory = 0x00000002,
  475. WGPUErrorFilter_Internal = 0x00000003,
  476. WGPUErrorFilter_Force32 = 0x7FFFFFFF
  477. } WGPUErrorFilter WGPU_ENUM_ATTRIBUTE;
  478. typedef enum WGPUErrorType {
  479. WGPUErrorType_NoError = 0x00000001,
  480. WGPUErrorType_Validation = 0x00000002,
  481. WGPUErrorType_OutOfMemory = 0x00000003,
  482. WGPUErrorType_Internal = 0x00000004,
  483. WGPUErrorType_Unknown = 0x00000005,
  484. WGPUErrorType_Force32 = 0x7FFFFFFF
  485. } WGPUErrorType WGPU_ENUM_ATTRIBUTE;
  486. typedef enum WGPUExternalTextureRotation {
  487. WGPUExternalTextureRotation_Rotate0Degrees = 0x00000001,
  488. WGPUExternalTextureRotation_Rotate90Degrees = 0x00000002,
  489. WGPUExternalTextureRotation_Rotate180Degrees = 0x00000003,
  490. WGPUExternalTextureRotation_Rotate270Degrees = 0x00000004,
  491. WGPUExternalTextureRotation_Force32 = 0x7FFFFFFF
  492. } WGPUExternalTextureRotation WGPU_ENUM_ATTRIBUTE;
  493. typedef enum WGPUFeatureLevel {
  494. WGPUFeatureLevel_Undefined = 0x00000000,
  495. WGPUFeatureLevel_Compatibility = 0x00000001,
  496. WGPUFeatureLevel_Core = 0x00000002,
  497. WGPUFeatureLevel_Force32 = 0x7FFFFFFF
  498. } WGPUFeatureLevel WGPU_ENUM_ATTRIBUTE;
  499. typedef enum WGPUFeatureName {
  500. WGPUFeatureName_CoreFeaturesAndLimits = 0x00000001,
  501. WGPUFeatureName_DepthClipControl = 0x00000002,
  502. WGPUFeatureName_Depth32FloatStencil8 = 0x00000003,
  503. WGPUFeatureName_TextureCompressionBC = 0x00000004,
  504. WGPUFeatureName_TextureCompressionBCSliced3D = 0x00000005,
  505. WGPUFeatureName_TextureCompressionETC2 = 0x00000006,
  506. WGPUFeatureName_TextureCompressionASTC = 0x00000007,
  507. WGPUFeatureName_TextureCompressionASTCSliced3D = 0x00000008,
  508. WGPUFeatureName_TimestampQuery = 0x00000009,
  509. WGPUFeatureName_IndirectFirstInstance = 0x0000000A,
  510. WGPUFeatureName_ShaderF16 = 0x0000000B,
  511. WGPUFeatureName_RG11B10UfloatRenderable = 0x0000000C,
  512. WGPUFeatureName_BGRA8UnormStorage = 0x0000000D,
  513. WGPUFeatureName_Float32Filterable = 0x0000000E,
  514. WGPUFeatureName_Float32Blendable = 0x0000000F,
  515. WGPUFeatureName_ClipDistances = 0x00000010,
  516. WGPUFeatureName_DualSourceBlending = 0x00000011,
  517. WGPUFeatureName_Subgroups = 0x00000012,
  518. WGPUFeatureName_TextureFormatsTier1 = 0x00000013,
  519. WGPUFeatureName_TextureFormatsTier2 = 0x00000014,
  520. WGPUFeatureName_PrimitiveIndex = 0x00000015,
  521. WGPUFeatureName_TextureComponentSwizzle = 0x00000016,
  522. WGPUFeatureName_DawnInternalUsages = 0x00050000,
  523. WGPUFeatureName_DawnMultiPlanarFormats = 0x00050001,
  524. WGPUFeatureName_DawnNative = 0x00050002,
  525. WGPUFeatureName_ChromiumExperimentalTimestampQueryInsidePasses = 0x00050003,
  526. WGPUFeatureName_ImplicitDeviceSynchronization = 0x00050004,
  527. WGPUFeatureName_TransientAttachments = 0x00050006,
  528. WGPUFeatureName_MSAARenderToSingleSampled = 0x00050007,
  529. WGPUFeatureName_D3D11MultithreadProtected = 0x00050008,
  530. WGPUFeatureName_ANGLETextureSharing = 0x00050009,
  531. WGPUFeatureName_PixelLocalStorageCoherent = 0x0005000A,
  532. WGPUFeatureName_PixelLocalStorageNonCoherent = 0x0005000B,
  533. WGPUFeatureName_Unorm16TextureFormats = 0x0005000C,
  534. WGPUFeatureName_MultiPlanarFormatExtendedUsages = 0x0005000D,
  535. WGPUFeatureName_MultiPlanarFormatP010 = 0x0005000E,
  536. WGPUFeatureName_HostMappedPointer = 0x0005000F,
  537. WGPUFeatureName_MultiPlanarRenderTargets = 0x00050010,
  538. WGPUFeatureName_MultiPlanarFormatNv12a = 0x00050011,
  539. WGPUFeatureName_FramebufferFetch = 0x00050012,
  540. WGPUFeatureName_BufferMapExtendedUsages = 0x00050013,
  541. WGPUFeatureName_AdapterPropertiesMemoryHeaps = 0x00050014,
  542. WGPUFeatureName_AdapterPropertiesD3D = 0x00050015,
  543. WGPUFeatureName_AdapterPropertiesVk = 0x00050016,
  544. WGPUFeatureName_DawnFormatCapabilities = 0x00050017,
  545. WGPUFeatureName_DawnDrmFormatCapabilities = 0x00050018,
  546. WGPUFeatureName_MultiPlanarFormatNv16 = 0x00050019,
  547. WGPUFeatureName_MultiPlanarFormatNv24 = 0x0005001A,
  548. WGPUFeatureName_MultiPlanarFormatP210 = 0x0005001B,
  549. WGPUFeatureName_MultiPlanarFormatP410 = 0x0005001C,
  550. WGPUFeatureName_SharedTextureMemoryVkDedicatedAllocation = 0x0005001D,
  551. WGPUFeatureName_SharedTextureMemoryAHardwareBuffer = 0x0005001E,
  552. WGPUFeatureName_SharedTextureMemoryDmaBuf = 0x0005001F,
  553. WGPUFeatureName_SharedTextureMemoryOpaqueFD = 0x00050020,
  554. WGPUFeatureName_SharedTextureMemoryZirconHandle = 0x00050021,
  555. WGPUFeatureName_SharedTextureMemoryDXGISharedHandle = 0x00050022,
  556. WGPUFeatureName_SharedTextureMemoryD3D11Texture2D = 0x00050023,
  557. WGPUFeatureName_SharedTextureMemoryIOSurface = 0x00050024,
  558. WGPUFeatureName_SharedTextureMemoryEGLImage = 0x00050025,
  559. WGPUFeatureName_SharedFenceVkSemaphoreOpaqueFD = 0x00050026,
  560. WGPUFeatureName_SharedFenceSyncFD = 0x00050027,
  561. WGPUFeatureName_SharedFenceVkSemaphoreZirconHandle = 0x00050028,
  562. WGPUFeatureName_SharedFenceDXGISharedHandle = 0x00050029,
  563. WGPUFeatureName_SharedFenceMTLSharedEvent = 0x0005002A,
  564. WGPUFeatureName_SharedBufferMemoryD3D12Resource = 0x0005002B,
  565. WGPUFeatureName_StaticSamplers = 0x0005002C,
  566. WGPUFeatureName_YCbCrVulkanSamplers = 0x0005002D,
  567. WGPUFeatureName_ShaderModuleCompilationOptions = 0x0005002E,
  568. WGPUFeatureName_DawnLoadResolveTexture = 0x0005002F,
  569. WGPUFeatureName_DawnPartialLoadResolveTexture = 0x00050030,
  570. WGPUFeatureName_MultiDrawIndirect = 0x00050031,
  571. WGPUFeatureName_DawnTexelCopyBufferRowAlignment = 0x00050032,
  572. WGPUFeatureName_FlexibleTextureViews = 0x00050033,
  573. WGPUFeatureName_ChromiumExperimentalSubgroupMatrix = 0x00050034,
  574. WGPUFeatureName_SharedFenceEGLSync = 0x00050035,
  575. WGPUFeatureName_DawnDeviceAllocatorControl = 0x00050036,
  576. WGPUFeatureName_AdapterPropertiesWGPU = 0x00050037,
  577. WGPUFeatureName_SharedBufferMemoryD3D12SharedMemoryFileMappingHandle = 0x00050038,
  578. WGPUFeatureName_SharedTextureMemoryD3D12Resource = 0x00050039,
  579. WGPUFeatureName_ChromiumExperimentalSamplingResourceTable = 0x0005003A,
  580. WGPUFeatureName_ChromiumExperimentalSubgroupSizeControl = 0x0005003B,
  581. WGPUFeatureName_Force32 = 0x7FFFFFFF
  582. } WGPUFeatureName WGPU_ENUM_ATTRIBUTE;
  583. typedef enum WGPUFilterMode {
  584. WGPUFilterMode_Undefined = 0x00000000,
  585. WGPUFilterMode_Nearest = 0x00000001,
  586. WGPUFilterMode_Linear = 0x00000002,
  587. WGPUFilterMode_Force32 = 0x7FFFFFFF
  588. } WGPUFilterMode WGPU_ENUM_ATTRIBUTE;
  589. typedef enum WGPUFrontFace {
  590. WGPUFrontFace_Undefined = 0x00000000,
  591. WGPUFrontFace_CCW = 0x00000001,
  592. WGPUFrontFace_CW = 0x00000002,
  593. WGPUFrontFace_Force32 = 0x7FFFFFFF
  594. } WGPUFrontFace WGPU_ENUM_ATTRIBUTE;
  595. typedef enum WGPUIndexFormat {
  596. WGPUIndexFormat_Undefined = 0x00000000,
  597. WGPUIndexFormat_Uint16 = 0x00000001,
  598. WGPUIndexFormat_Uint32 = 0x00000002,
  599. WGPUIndexFormat_Force32 = 0x7FFFFFFF
  600. } WGPUIndexFormat WGPU_ENUM_ATTRIBUTE;
  601. typedef enum WGPUInstanceFeatureName {
  602. WGPUInstanceFeatureName_TimedWaitAny = 0x00000001,
  603. WGPUInstanceFeatureName_ShaderSourceSPIRV = 0x00000002,
  604. WGPUInstanceFeatureName_MultipleDevicesPerAdapter = 0x00000003,
  605. WGPUInstanceFeatureName_Force32 = 0x7FFFFFFF
  606. } WGPUInstanceFeatureName WGPU_ENUM_ATTRIBUTE;
  607. typedef enum WGPULoadOp {
  608. WGPULoadOp_Undefined = 0x00000000,
  609. WGPULoadOp_Load = 0x00000001,
  610. WGPULoadOp_Clear = 0x00000002,
  611. WGPULoadOp_ExpandResolveTexture = 0x00050003,
  612. WGPULoadOp_Force32 = 0x7FFFFFFF
  613. } WGPULoadOp WGPU_ENUM_ATTRIBUTE;
  614. typedef enum WGPULoggingType {
  615. WGPULoggingType_Verbose = 0x00000001,
  616. WGPULoggingType_Info = 0x00000002,
  617. WGPULoggingType_Warning = 0x00000003,
  618. WGPULoggingType_Error = 0x00000004,
  619. WGPULoggingType_Force32 = 0x7FFFFFFF
  620. } WGPULoggingType WGPU_ENUM_ATTRIBUTE;
  621. typedef enum WGPUMapAsyncStatus {
  622. WGPUMapAsyncStatus_Success = 0x00000001,
  623. WGPUMapAsyncStatus_CallbackCancelled = 0x00000002,
  624. WGPUMapAsyncStatus_Error = 0x00000003,
  625. WGPUMapAsyncStatus_Aborted = 0x00000004,
  626. WGPUMapAsyncStatus_Force32 = 0x7FFFFFFF
  627. } WGPUMapAsyncStatus WGPU_ENUM_ATTRIBUTE;
  628. typedef enum WGPUMipmapFilterMode {
  629. WGPUMipmapFilterMode_Undefined = 0x00000000,
  630. WGPUMipmapFilterMode_Nearest = 0x00000001,
  631. WGPUMipmapFilterMode_Linear = 0x00000002,
  632. WGPUMipmapFilterMode_Force32 = 0x7FFFFFFF
  633. } WGPUMipmapFilterMode WGPU_ENUM_ATTRIBUTE;
  634. typedef enum WGPUOptionalBool {
  635. WGPUOptionalBool_False = 0x00000000,
  636. WGPUOptionalBool_True = 0x00000001,
  637. WGPUOptionalBool_Undefined = 0x00000002,
  638. WGPUOptionalBool_Force32 = 0x7FFFFFFF
  639. } WGPUOptionalBool WGPU_ENUM_ATTRIBUTE;
  640. typedef enum WGPUPopErrorScopeStatus {
  641. WGPUPopErrorScopeStatus_Success = 0x00000001,
  642. WGPUPopErrorScopeStatus_CallbackCancelled = 0x00000002,
  643. WGPUPopErrorScopeStatus_Error = 0x00000003,
  644. WGPUPopErrorScopeStatus_Force32 = 0x7FFFFFFF
  645. } WGPUPopErrorScopeStatus WGPU_ENUM_ATTRIBUTE;
  646. typedef enum WGPUPowerPreference {
  647. WGPUPowerPreference_Undefined = 0x00000000,
  648. WGPUPowerPreference_LowPower = 0x00000001,
  649. WGPUPowerPreference_HighPerformance = 0x00000002,
  650. WGPUPowerPreference_Force32 = 0x7FFFFFFF
  651. } WGPUPowerPreference WGPU_ENUM_ATTRIBUTE;
  652. typedef enum WGPUPredefinedColorSpace {
  653. WGPUPredefinedColorSpace_SRGB = 0x00000001,
  654. WGPUPredefinedColorSpace_DisplayP3 = 0x00000002,
  655. WGPUPredefinedColorSpace_Force32 = 0x7FFFFFFF
  656. } WGPUPredefinedColorSpace WGPU_ENUM_ATTRIBUTE;
  657. typedef enum WGPUPresentMode {
  658. WGPUPresentMode_Undefined = 0x00000000,
  659. WGPUPresentMode_Fifo = 0x00000001,
  660. WGPUPresentMode_FifoRelaxed = 0x00000002,
  661. WGPUPresentMode_Immediate = 0x00000003,
  662. WGPUPresentMode_Mailbox = 0x00000004,
  663. WGPUPresentMode_Force32 = 0x7FFFFFFF
  664. } WGPUPresentMode WGPU_ENUM_ATTRIBUTE;
  665. typedef enum WGPUPrimitiveTopology {
  666. WGPUPrimitiveTopology_Undefined = 0x00000000,
  667. WGPUPrimitiveTopology_PointList = 0x00000001,
  668. WGPUPrimitiveTopology_LineList = 0x00000002,
  669. WGPUPrimitiveTopology_LineStrip = 0x00000003,
  670. WGPUPrimitiveTopology_TriangleList = 0x00000004,
  671. WGPUPrimitiveTopology_TriangleStrip = 0x00000005,
  672. WGPUPrimitiveTopology_Force32 = 0x7FFFFFFF
  673. } WGPUPrimitiveTopology WGPU_ENUM_ATTRIBUTE;
  674. typedef enum WGPUQueryType {
  675. WGPUQueryType_Occlusion = 0x00000001,
  676. WGPUQueryType_Timestamp = 0x00000002,
  677. WGPUQueryType_Force32 = 0x7FFFFFFF
  678. } WGPUQueryType WGPU_ENUM_ATTRIBUTE;
  679. typedef enum WGPUQueueWorkDoneStatus {
  680. WGPUQueueWorkDoneStatus_Success = 0x00000001,
  681. WGPUQueueWorkDoneStatus_CallbackCancelled = 0x00000002,
  682. WGPUQueueWorkDoneStatus_Error = 0x00000003,
  683. WGPUQueueWorkDoneStatus_Force32 = 0x7FFFFFFF
  684. } WGPUQueueWorkDoneStatus WGPU_ENUM_ATTRIBUTE;
  685. typedef enum WGPURequestAdapterStatus {
  686. WGPURequestAdapterStatus_Success = 0x00000001,
  687. WGPURequestAdapterStatus_CallbackCancelled = 0x00000002,
  688. WGPURequestAdapterStatus_Unavailable = 0x00000003,
  689. WGPURequestAdapterStatus_Error = 0x00000004,
  690. WGPURequestAdapterStatus_Force32 = 0x7FFFFFFF
  691. } WGPURequestAdapterStatus WGPU_ENUM_ATTRIBUTE;
  692. typedef enum WGPURequestDeviceStatus {
  693. WGPURequestDeviceStatus_Success = 0x00000001,
  694. WGPURequestDeviceStatus_CallbackCancelled = 0x00000002,
  695. WGPURequestDeviceStatus_Error = 0x00000003,
  696. WGPURequestDeviceStatus_Force32 = 0x7FFFFFFF
  697. } WGPURequestDeviceStatus WGPU_ENUM_ATTRIBUTE;
  698. typedef enum WGPUSamplerBindingType {
  699. WGPUSamplerBindingType_BindingNotUsed = 0x00000000,
  700. WGPUSamplerBindingType_Undefined = 0x00000001,
  701. WGPUSamplerBindingType_Filtering = 0x00000002,
  702. WGPUSamplerBindingType_NonFiltering = 0x00000003,
  703. WGPUSamplerBindingType_Comparison = 0x00000004,
  704. WGPUSamplerBindingType_Force32 = 0x7FFFFFFF
  705. } WGPUSamplerBindingType WGPU_ENUM_ATTRIBUTE;
  706. typedef enum WGPUSharedFenceType {
  707. WGPUSharedFenceType_VkSemaphoreOpaqueFD = 0x00000001,
  708. WGPUSharedFenceType_SyncFD = 0x00000002,
  709. WGPUSharedFenceType_VkSemaphoreZirconHandle = 0x00000003,
  710. WGPUSharedFenceType_DXGISharedHandle = 0x00000004,
  711. WGPUSharedFenceType_MTLSharedEvent = 0x00000005,
  712. WGPUSharedFenceType_EGLSync = 0x00000006,
  713. WGPUSharedFenceType_Force32 = 0x7FFFFFFF
  714. } WGPUSharedFenceType WGPU_ENUM_ATTRIBUTE;
  715. typedef enum WGPUStatus {
  716. WGPUStatus_Success = 0x00000001,
  717. WGPUStatus_Error = 0x00000002,
  718. WGPUStatus_Force32 = 0x7FFFFFFF
  719. } WGPUStatus WGPU_ENUM_ATTRIBUTE;
  720. typedef enum WGPUStencilOperation {
  721. WGPUStencilOperation_Undefined = 0x00000000,
  722. WGPUStencilOperation_Keep = 0x00000001,
  723. WGPUStencilOperation_Zero = 0x00000002,
  724. WGPUStencilOperation_Replace = 0x00000003,
  725. WGPUStencilOperation_Invert = 0x00000004,
  726. WGPUStencilOperation_IncrementClamp = 0x00000005,
  727. WGPUStencilOperation_DecrementClamp = 0x00000006,
  728. WGPUStencilOperation_IncrementWrap = 0x00000007,
  729. WGPUStencilOperation_DecrementWrap = 0x00000008,
  730. WGPUStencilOperation_Force32 = 0x7FFFFFFF
  731. } WGPUStencilOperation WGPU_ENUM_ATTRIBUTE;
  732. typedef enum WGPUStorageTextureAccess {
  733. WGPUStorageTextureAccess_BindingNotUsed = 0x00000000,
  734. WGPUStorageTextureAccess_Undefined = 0x00000001,
  735. WGPUStorageTextureAccess_WriteOnly = 0x00000002,
  736. WGPUStorageTextureAccess_ReadOnly = 0x00000003,
  737. WGPUStorageTextureAccess_ReadWrite = 0x00000004,
  738. WGPUStorageTextureAccess_Force32 = 0x7FFFFFFF
  739. } WGPUStorageTextureAccess WGPU_ENUM_ATTRIBUTE;
  740. typedef enum WGPUStoreOp {
  741. WGPUStoreOp_Undefined = 0x00000000,
  742. WGPUStoreOp_Store = 0x00000001,
  743. WGPUStoreOp_Discard = 0x00000002,
  744. WGPUStoreOp_Force32 = 0x7FFFFFFF
  745. } WGPUStoreOp WGPU_ENUM_ATTRIBUTE;
  746. typedef enum WGPUSType {
  747. WGPUSType_ShaderSourceSPIRV = 0x00000001,
  748. WGPUSType_ShaderSourceWGSL = 0x00000002,
  749. WGPUSType_RenderPassMaxDrawCount = 0x00000003,
  750. WGPUSType_SurfaceSourceMetalLayer = 0x00000004,
  751. WGPUSType_SurfaceSourceWindowsHWND = 0x00000005,
  752. WGPUSType_SurfaceSourceXlibWindow = 0x00000006,
  753. WGPUSType_SurfaceSourceWaylandSurface = 0x00000007,
  754. WGPUSType_SurfaceSourceAndroidNativeWindow = 0x00000008,
  755. WGPUSType_SurfaceSourceXCBWindow = 0x00000009,
  756. WGPUSType_SurfaceColorManagement = 0x0000000A,
  757. WGPUSType_RequestAdapterWebXROptions = 0x0000000B,
  758. WGPUSType_TextureComponentSwizzleDescriptor = 0x0000000C,
  759. WGPUSType_CompatibilityModeLimits = 0x00020000,
  760. WGPUSType_TextureBindingViewDimensionDescriptor = 0x00020001,
  761. WGPUSType_EmscriptenSurfaceSourceCanvasHTMLSelector = 0x00040000,
  762. WGPUSType_SurfaceDescriptorFromWindowsCoreWindow = 0x00050000,
  763. WGPUSType_ExternalTextureBindingEntry = 0x00050001,
  764. WGPUSType_ExternalTextureBindingLayout = 0x00050002,
  765. WGPUSType_SurfaceDescriptorFromWindowsUWPSwapChainPanel = 0x00050003,
  766. WGPUSType_DawnTextureInternalUsageDescriptor = 0x00050004,
  767. WGPUSType_DawnEncoderInternalUsageDescriptor = 0x00050005,
  768. WGPUSType_DawnInstanceDescriptor = 0x00050006,
  769. WGPUSType_DawnCacheDeviceDescriptor = 0x00050007,
  770. WGPUSType_DawnAdapterPropertiesPowerPreference = 0x00050008,
  771. WGPUSType_DawnBufferDescriptorErrorInfoFromWireClient = 0x00050009,
  772. WGPUSType_DawnTogglesDescriptor = 0x0005000A,
  773. WGPUSType_DawnShaderModuleSPIRVOptionsDescriptor = 0x0005000B,
  774. WGPUSType_RequestAdapterOptionsLUID = 0x0005000C,
  775. WGPUSType_RequestAdapterOptionsGetGLProc = 0x0005000D,
  776. WGPUSType_RequestAdapterOptionsD3D11Device = 0x0005000E,
  777. WGPUSType_DawnRenderPassColorAttachmentRenderToSingleSampled = 0x0005000F,
  778. WGPUSType_RenderPassPixelLocalStorage = 0x00050010,
  779. WGPUSType_PipelineLayoutPixelLocalStorage = 0x00050011,
  780. WGPUSType_BufferHostMappedPointer = 0x00050012,
  781. WGPUSType_AdapterPropertiesMemoryHeaps = 0x00050013,
  782. WGPUSType_AdapterPropertiesD3D = 0x00050014,
  783. WGPUSType_AdapterPropertiesVk = 0x00050015,
  784. WGPUSType_DawnWireWGSLControl = 0x00050016,
  785. WGPUSType_DawnWGSLBlocklist = 0x00050017,
  786. WGPUSType_DawnDrmFormatCapabilities = 0x00050018,
  787. WGPUSType_ShaderModuleCompilationOptions = 0x00050019,
  788. WGPUSType_ColorTargetStateExpandResolveTextureDawn = 0x0005001A,
  789. WGPUSType_RenderPassDescriptorExpandResolveRect = 0x0005001B,
  790. WGPUSType_SharedTextureMemoryVkDedicatedAllocationDescriptor = 0x0005001C,
  791. WGPUSType_SharedTextureMemoryAHardwareBufferDescriptor = 0x0005001D,
  792. WGPUSType_SharedTextureMemoryDmaBufDescriptor = 0x0005001E,
  793. WGPUSType_SharedTextureMemoryOpaqueFDDescriptor = 0x0005001F,
  794. WGPUSType_SharedTextureMemoryZirconHandleDescriptor = 0x00050020,
  795. WGPUSType_SharedTextureMemoryDXGISharedHandleDescriptor = 0x00050021,
  796. WGPUSType_SharedTextureMemoryD3D11Texture2DDescriptor = 0x00050022,
  797. WGPUSType_SharedTextureMemoryIOSurfaceDescriptor = 0x00050023,
  798. WGPUSType_SharedTextureMemoryEGLImageDescriptor = 0x00050024,
  799. WGPUSType_SharedTextureMemoryInitializedBeginState = 0x00050025,
  800. WGPUSType_SharedTextureMemoryInitializedEndState = 0x00050026,
  801. WGPUSType_SharedTextureMemoryVkImageLayoutBeginState = 0x00050027,
  802. WGPUSType_SharedTextureMemoryVkImageLayoutEndState = 0x00050028,
  803. WGPUSType_SharedTextureMemoryD3DSwapchainBeginState = 0x00050029,
  804. WGPUSType_SharedFenceVkSemaphoreOpaqueFDDescriptor = 0x0005002A,
  805. WGPUSType_SharedFenceVkSemaphoreOpaqueFDExportInfo = 0x0005002B,
  806. WGPUSType_SharedFenceSyncFDDescriptor = 0x0005002C,
  807. WGPUSType_SharedFenceSyncFDExportInfo = 0x0005002D,
  808. WGPUSType_SharedFenceVkSemaphoreZirconHandleDescriptor = 0x0005002E,
  809. WGPUSType_SharedFenceVkSemaphoreZirconHandleExportInfo = 0x0005002F,
  810. WGPUSType_SharedFenceDXGISharedHandleDescriptor = 0x00050030,
  811. WGPUSType_SharedFenceDXGISharedHandleExportInfo = 0x00050031,
  812. WGPUSType_SharedFenceMTLSharedEventDescriptor = 0x00050032,
  813. WGPUSType_SharedFenceMTLSharedEventExportInfo = 0x00050033,
  814. WGPUSType_SharedBufferMemoryD3D12ResourceDescriptor = 0x00050034,
  815. WGPUSType_StaticSamplerBindingLayout = 0x00050035,
  816. WGPUSType_YCbCrVkDescriptor = 0x00050036,
  817. WGPUSType_SharedTextureMemoryAHardwareBufferProperties = 0x00050037,
  818. WGPUSType_AHardwareBufferProperties = 0x00050038,
  819. WGPUSType_DawnTexelCopyBufferRowAlignmentLimits = 0x0005003A,
  820. WGPUSType_AdapterPropertiesSubgroupMatrixConfigs = 0x0005003B,
  821. WGPUSType_SharedFenceEGLSyncDescriptor = 0x0005003C,
  822. WGPUSType_SharedFenceEGLSyncExportInfo = 0x0005003D,
  823. WGPUSType_DawnInjectedInvalidSType = 0x0005003E,
  824. WGPUSType_DawnCompilationMessageUtf16 = 0x0005003F,
  825. WGPUSType_DawnFakeBufferOOMForTesting = 0x00050040,
  826. WGPUSType_SurfaceDescriptorFromWindowsWinUISwapChainPanel = 0x00050041,
  827. WGPUSType_DawnDeviceAllocatorControl = 0x00050042,
  828. WGPUSType_DawnHostMappedPointerLimits = 0x00050043,
  829. WGPUSType_RenderPassDescriptorResolveRect = 0x00050044,
  830. WGPUSType_RequestAdapterWebGPUBackendOptions = 0x00050045,
  831. WGPUSType_DawnFakeDeviceInitializeErrorForTesting = 0x00050046,
  832. WGPUSType_SharedTextureMemoryD3D11BeginState = 0x00050047,
  833. WGPUSType_DawnConsumeAdapterDescriptor = 0x00050048,
  834. WGPUSType_TexelBufferBindingEntry = 0x00050049,
  835. WGPUSType_TexelBufferBindingLayout = 0x0005004A,
  836. WGPUSType_SharedTextureMemoryMetalEndAccessState = 0x0005004B,
  837. WGPUSType_AdapterPropertiesWGPU = 0x0005004C,
  838. WGPUSType_SharedBufferMemoryD3D12SharedMemoryFileMappingHandleDescriptor = 0x0005004D,
  839. WGPUSType_SharedTextureMemoryD3D12ResourceDescriptor = 0x0005004E,
  840. WGPUSType_RequestAdapterOptionsAngleVirtualizationGroup = 0x0005004F,
  841. WGPUSType_ResourceTableLimits = 0x00050050,
  842. WGPUSType_PipelineLayoutResourceTable = 0x00050051,
  843. WGPUSType_Force32 = 0x7FFFFFFF
  844. } WGPUSType WGPU_ENUM_ATTRIBUTE;
  845. typedef enum WGPUSubgroupMatrixComponentType {
  846. WGPUSubgroupMatrixComponentType_F32 = 0x00000001,
  847. WGPUSubgroupMatrixComponentType_F16 = 0x00000002,
  848. WGPUSubgroupMatrixComponentType_U32 = 0x00000003,
  849. WGPUSubgroupMatrixComponentType_I32 = 0x00000004,
  850. WGPUSubgroupMatrixComponentType_U8 = 0x00000005,
  851. WGPUSubgroupMatrixComponentType_I8 = 0x00000006,
  852. WGPUSubgroupMatrixComponentType_Force32 = 0x7FFFFFFF
  853. } WGPUSubgroupMatrixComponentType WGPU_ENUM_ATTRIBUTE;
  854. typedef enum WGPUSurfaceGetCurrentTextureStatus {
  855. WGPUSurfaceGetCurrentTextureStatus_SuccessOptimal = 0x00000001,
  856. WGPUSurfaceGetCurrentTextureStatus_SuccessSuboptimal = 0x00000002,
  857. WGPUSurfaceGetCurrentTextureStatus_Timeout = 0x00000003,
  858. WGPUSurfaceGetCurrentTextureStatus_Outdated = 0x00000004,
  859. WGPUSurfaceGetCurrentTextureStatus_Lost = 0x00000005,
  860. WGPUSurfaceGetCurrentTextureStatus_Error = 0x00000006,
  861. WGPUSurfaceGetCurrentTextureStatus_Force32 = 0x7FFFFFFF
  862. } WGPUSurfaceGetCurrentTextureStatus WGPU_ENUM_ATTRIBUTE;
  863. typedef enum WGPUTexelBufferAccess {
  864. WGPUTexelBufferAccess_Undefined = 0x00000000,
  865. WGPUTexelBufferAccess_ReadOnly = 0x00000001,
  866. WGPUTexelBufferAccess_ReadWrite = 0x00000002,
  867. WGPUTexelBufferAccess_Force32 = 0x7FFFFFFF
  868. } WGPUTexelBufferAccess WGPU_ENUM_ATTRIBUTE;
  869. typedef enum WGPUTextureAspect {
  870. WGPUTextureAspect_Undefined = 0x00000000,
  871. WGPUTextureAspect_All = 0x00000001,
  872. WGPUTextureAspect_StencilOnly = 0x00000002,
  873. WGPUTextureAspect_DepthOnly = 0x00000003,
  874. WGPUTextureAspect_Plane0Only = 0x00050000,
  875. WGPUTextureAspect_Plane1Only = 0x00050001,
  876. WGPUTextureAspect_Plane2Only = 0x00050002,
  877. WGPUTextureAspect_Force32 = 0x7FFFFFFF
  878. } WGPUTextureAspect WGPU_ENUM_ATTRIBUTE;
  879. typedef enum WGPUTextureDimension {
  880. WGPUTextureDimension_Undefined = 0x00000000,
  881. WGPUTextureDimension_1D = 0x00000001,
  882. WGPUTextureDimension_2D = 0x00000002,
  883. WGPUTextureDimension_3D = 0x00000003,
  884. WGPUTextureDimension_Force32 = 0x7FFFFFFF
  885. } WGPUTextureDimension WGPU_ENUM_ATTRIBUTE;
  886. typedef enum WGPUTextureFormat {
  887. WGPUTextureFormat_Undefined = 0x00000000,
  888. WGPUTextureFormat_R8Unorm = 0x00000001,
  889. WGPUTextureFormat_R8Snorm = 0x00000002,
  890. WGPUTextureFormat_R8Uint = 0x00000003,
  891. WGPUTextureFormat_R8Sint = 0x00000004,
  892. WGPUTextureFormat_R16Unorm = 0x00000005,
  893. WGPUTextureFormat_R16Snorm = 0x00000006,
  894. WGPUTextureFormat_R16Uint = 0x00000007,
  895. WGPUTextureFormat_R16Sint = 0x00000008,
  896. WGPUTextureFormat_R16Float = 0x00000009,
  897. WGPUTextureFormat_RG8Unorm = 0x0000000A,
  898. WGPUTextureFormat_RG8Snorm = 0x0000000B,
  899. WGPUTextureFormat_RG8Uint = 0x0000000C,
  900. WGPUTextureFormat_RG8Sint = 0x0000000D,
  901. WGPUTextureFormat_R32Float = 0x0000000E,
  902. WGPUTextureFormat_R32Uint = 0x0000000F,
  903. WGPUTextureFormat_R32Sint = 0x00000010,
  904. WGPUTextureFormat_RG16Unorm = 0x00000011,
  905. WGPUTextureFormat_RG16Snorm = 0x00000012,
  906. WGPUTextureFormat_RG16Uint = 0x00000013,
  907. WGPUTextureFormat_RG16Sint = 0x00000014,
  908. WGPUTextureFormat_RG16Float = 0x00000015,
  909. WGPUTextureFormat_RGBA8Unorm = 0x00000016,
  910. WGPUTextureFormat_RGBA8UnormSrgb = 0x00000017,
  911. WGPUTextureFormat_RGBA8Snorm = 0x00000018,
  912. WGPUTextureFormat_RGBA8Uint = 0x00000019,
  913. WGPUTextureFormat_RGBA8Sint = 0x0000001A,
  914. WGPUTextureFormat_BGRA8Unorm = 0x0000001B,
  915. WGPUTextureFormat_BGRA8UnormSrgb = 0x0000001C,
  916. WGPUTextureFormat_RGB10A2Uint = 0x0000001D,
  917. WGPUTextureFormat_RGB10A2Unorm = 0x0000001E,
  918. WGPUTextureFormat_RG11B10Ufloat = 0x0000001F,
  919. WGPUTextureFormat_RGB9E5Ufloat = 0x00000020,
  920. WGPUTextureFormat_RG32Float = 0x00000021,
  921. WGPUTextureFormat_RG32Uint = 0x00000022,
  922. WGPUTextureFormat_RG32Sint = 0x00000023,
  923. WGPUTextureFormat_RGBA16Unorm = 0x00000024,
  924. WGPUTextureFormat_RGBA16Snorm = 0x00000025,
  925. WGPUTextureFormat_RGBA16Uint = 0x00000026,
  926. WGPUTextureFormat_RGBA16Sint = 0x00000027,
  927. WGPUTextureFormat_RGBA16Float = 0x00000028,
  928. WGPUTextureFormat_RGBA32Float = 0x00000029,
  929. WGPUTextureFormat_RGBA32Uint = 0x0000002A,
  930. WGPUTextureFormat_RGBA32Sint = 0x0000002B,
  931. WGPUTextureFormat_Stencil8 = 0x0000002C,
  932. WGPUTextureFormat_Depth16Unorm = 0x0000002D,
  933. WGPUTextureFormat_Depth24Plus = 0x0000002E,
  934. WGPUTextureFormat_Depth24PlusStencil8 = 0x0000002F,
  935. WGPUTextureFormat_Depth32Float = 0x00000030,
  936. WGPUTextureFormat_Depth32FloatStencil8 = 0x00000031,
  937. WGPUTextureFormat_BC1RGBAUnorm = 0x00000032,
  938. WGPUTextureFormat_BC1RGBAUnormSrgb = 0x00000033,
  939. WGPUTextureFormat_BC2RGBAUnorm = 0x00000034,
  940. WGPUTextureFormat_BC2RGBAUnormSrgb = 0x00000035,
  941. WGPUTextureFormat_BC3RGBAUnorm = 0x00000036,
  942. WGPUTextureFormat_BC3RGBAUnormSrgb = 0x00000037,
  943. WGPUTextureFormat_BC4RUnorm = 0x00000038,
  944. WGPUTextureFormat_BC4RSnorm = 0x00000039,
  945. WGPUTextureFormat_BC5RGUnorm = 0x0000003A,
  946. WGPUTextureFormat_BC5RGSnorm = 0x0000003B,
  947. WGPUTextureFormat_BC6HRGBUfloat = 0x0000003C,
  948. WGPUTextureFormat_BC6HRGBFloat = 0x0000003D,
  949. WGPUTextureFormat_BC7RGBAUnorm = 0x0000003E,
  950. WGPUTextureFormat_BC7RGBAUnormSrgb = 0x0000003F,
  951. WGPUTextureFormat_ETC2RGB8Unorm = 0x00000040,
  952. WGPUTextureFormat_ETC2RGB8UnormSrgb = 0x00000041,
  953. WGPUTextureFormat_ETC2RGB8A1Unorm = 0x00000042,
  954. WGPUTextureFormat_ETC2RGB8A1UnormSrgb = 0x00000043,
  955. WGPUTextureFormat_ETC2RGBA8Unorm = 0x00000044,
  956. WGPUTextureFormat_ETC2RGBA8UnormSrgb = 0x00000045,
  957. WGPUTextureFormat_EACR11Unorm = 0x00000046,
  958. WGPUTextureFormat_EACR11Snorm = 0x00000047,
  959. WGPUTextureFormat_EACRG11Unorm = 0x00000048,
  960. WGPUTextureFormat_EACRG11Snorm = 0x00000049,
  961. WGPUTextureFormat_ASTC4x4Unorm = 0x0000004A,
  962. WGPUTextureFormat_ASTC4x4UnormSrgb = 0x0000004B,
  963. WGPUTextureFormat_ASTC5x4Unorm = 0x0000004C,
  964. WGPUTextureFormat_ASTC5x4UnormSrgb = 0x0000004D,
  965. WGPUTextureFormat_ASTC5x5Unorm = 0x0000004E,
  966. WGPUTextureFormat_ASTC5x5UnormSrgb = 0x0000004F,
  967. WGPUTextureFormat_ASTC6x5Unorm = 0x00000050,
  968. WGPUTextureFormat_ASTC6x5UnormSrgb = 0x00000051,
  969. WGPUTextureFormat_ASTC6x6Unorm = 0x00000052,
  970. WGPUTextureFormat_ASTC6x6UnormSrgb = 0x00000053,
  971. WGPUTextureFormat_ASTC8x5Unorm = 0x00000054,
  972. WGPUTextureFormat_ASTC8x5UnormSrgb = 0x00000055,
  973. WGPUTextureFormat_ASTC8x6Unorm = 0x00000056,
  974. WGPUTextureFormat_ASTC8x6UnormSrgb = 0x00000057,
  975. WGPUTextureFormat_ASTC8x8Unorm = 0x00000058,
  976. WGPUTextureFormat_ASTC8x8UnormSrgb = 0x00000059,
  977. WGPUTextureFormat_ASTC10x5Unorm = 0x0000005A,
  978. WGPUTextureFormat_ASTC10x5UnormSrgb = 0x0000005B,
  979. WGPUTextureFormat_ASTC10x6Unorm = 0x0000005C,
  980. WGPUTextureFormat_ASTC10x6UnormSrgb = 0x0000005D,
  981. WGPUTextureFormat_ASTC10x8Unorm = 0x0000005E,
  982. WGPUTextureFormat_ASTC10x8UnormSrgb = 0x0000005F,
  983. WGPUTextureFormat_ASTC10x10Unorm = 0x00000060,
  984. WGPUTextureFormat_ASTC10x10UnormSrgb = 0x00000061,
  985. WGPUTextureFormat_ASTC12x10Unorm = 0x00000062,
  986. WGPUTextureFormat_ASTC12x10UnormSrgb = 0x00000063,
  987. WGPUTextureFormat_ASTC12x12Unorm = 0x00000064,
  988. WGPUTextureFormat_ASTC12x12UnormSrgb = 0x00000065,
  989. WGPUTextureFormat_R8BG8Biplanar420Unorm = 0x00050006,
  990. WGPUTextureFormat_R10X6BG10X6Biplanar420Unorm = 0x00050007,
  991. WGPUTextureFormat_R8BG8A8Triplanar420Unorm = 0x00050008,
  992. WGPUTextureFormat_R8BG8Biplanar422Unorm = 0x00050009,
  993. WGPUTextureFormat_R8BG8Biplanar444Unorm = 0x0005000A,
  994. WGPUTextureFormat_R10X6BG10X6Biplanar422Unorm = 0x0005000B,
  995. WGPUTextureFormat_R10X6BG10X6Biplanar444Unorm = 0x0005000C,
  996. WGPUTextureFormat_External = 0x0005000D,
  997. WGPUTextureFormat_Force32 = 0x7FFFFFFF
  998. } WGPUTextureFormat WGPU_ENUM_ATTRIBUTE;
  999. typedef enum WGPUTextureSampleType {
  1000. WGPUTextureSampleType_BindingNotUsed = 0x00000000,
  1001. WGPUTextureSampleType_Undefined = 0x00000001,
  1002. WGPUTextureSampleType_Float = 0x00000002,
  1003. WGPUTextureSampleType_UnfilterableFloat = 0x00000003,
  1004. WGPUTextureSampleType_Depth = 0x00000004,
  1005. WGPUTextureSampleType_Sint = 0x00000005,
  1006. WGPUTextureSampleType_Uint = 0x00000006,
  1007. WGPUTextureSampleType_Force32 = 0x7FFFFFFF
  1008. } WGPUTextureSampleType WGPU_ENUM_ATTRIBUTE;
  1009. typedef enum WGPUTextureViewDimension {
  1010. WGPUTextureViewDimension_Undefined = 0x00000000,
  1011. WGPUTextureViewDimension_1D = 0x00000001,
  1012. WGPUTextureViewDimension_2D = 0x00000002,
  1013. WGPUTextureViewDimension_2DArray = 0x00000003,
  1014. WGPUTextureViewDimension_Cube = 0x00000004,
  1015. WGPUTextureViewDimension_CubeArray = 0x00000005,
  1016. WGPUTextureViewDimension_3D = 0x00000006,
  1017. WGPUTextureViewDimension_Force32 = 0x7FFFFFFF
  1018. } WGPUTextureViewDimension WGPU_ENUM_ATTRIBUTE;
  1019. typedef enum WGPUToneMappingMode {
  1020. WGPUToneMappingMode_Standard = 0x00000001,
  1021. WGPUToneMappingMode_Extended = 0x00000002,
  1022. WGPUToneMappingMode_Force32 = 0x7FFFFFFF
  1023. } WGPUToneMappingMode WGPU_ENUM_ATTRIBUTE;
  1024. typedef enum WGPUVertexFormat {
  1025. WGPUVertexFormat_Uint8 = 0x00000001,
  1026. WGPUVertexFormat_Uint8x2 = 0x00000002,
  1027. WGPUVertexFormat_Uint8x4 = 0x00000003,
  1028. WGPUVertexFormat_Sint8 = 0x00000004,
  1029. WGPUVertexFormat_Sint8x2 = 0x00000005,
  1030. WGPUVertexFormat_Sint8x4 = 0x00000006,
  1031. WGPUVertexFormat_Unorm8 = 0x00000007,
  1032. WGPUVertexFormat_Unorm8x2 = 0x00000008,
  1033. WGPUVertexFormat_Unorm8x4 = 0x00000009,
  1034. WGPUVertexFormat_Snorm8 = 0x0000000A,
  1035. WGPUVertexFormat_Snorm8x2 = 0x0000000B,
  1036. WGPUVertexFormat_Snorm8x4 = 0x0000000C,
  1037. WGPUVertexFormat_Uint16 = 0x0000000D,
  1038. WGPUVertexFormat_Uint16x2 = 0x0000000E,
  1039. WGPUVertexFormat_Uint16x4 = 0x0000000F,
  1040. WGPUVertexFormat_Sint16 = 0x00000010,
  1041. WGPUVertexFormat_Sint16x2 = 0x00000011,
  1042. WGPUVertexFormat_Sint16x4 = 0x00000012,
  1043. WGPUVertexFormat_Unorm16 = 0x00000013,
  1044. WGPUVertexFormat_Unorm16x2 = 0x00000014,
  1045. WGPUVertexFormat_Unorm16x4 = 0x00000015,
  1046. WGPUVertexFormat_Snorm16 = 0x00000016,
  1047. WGPUVertexFormat_Snorm16x2 = 0x00000017,
  1048. WGPUVertexFormat_Snorm16x4 = 0x00000018,
  1049. WGPUVertexFormat_Float16 = 0x00000019,
  1050. WGPUVertexFormat_Float16x2 = 0x0000001A,
  1051. WGPUVertexFormat_Float16x4 = 0x0000001B,
  1052. WGPUVertexFormat_Float32 = 0x0000001C,
  1053. WGPUVertexFormat_Float32x2 = 0x0000001D,
  1054. WGPUVertexFormat_Float32x3 = 0x0000001E,
  1055. WGPUVertexFormat_Float32x4 = 0x0000001F,
  1056. WGPUVertexFormat_Uint32 = 0x00000020,
  1057. WGPUVertexFormat_Uint32x2 = 0x00000021,
  1058. WGPUVertexFormat_Uint32x3 = 0x00000022,
  1059. WGPUVertexFormat_Uint32x4 = 0x00000023,
  1060. WGPUVertexFormat_Sint32 = 0x00000024,
  1061. WGPUVertexFormat_Sint32x2 = 0x00000025,
  1062. WGPUVertexFormat_Sint32x3 = 0x00000026,
  1063. WGPUVertexFormat_Sint32x4 = 0x00000027,
  1064. WGPUVertexFormat_Unorm10_10_10_2 = 0x00000028,
  1065. WGPUVertexFormat_Unorm8x4BGRA = 0x00000029,
  1066. WGPUVertexFormat_Force32 = 0x7FFFFFFF
  1067. } WGPUVertexFormat WGPU_ENUM_ATTRIBUTE;
  1068. typedef enum WGPUVertexStepMode {
  1069. WGPUVertexStepMode_Undefined = 0x00000000,
  1070. WGPUVertexStepMode_Vertex = 0x00000001,
  1071. WGPUVertexStepMode_Instance = 0x00000002,
  1072. WGPUVertexStepMode_Force32 = 0x7FFFFFFF
  1073. } WGPUVertexStepMode WGPU_ENUM_ATTRIBUTE;
  1074. typedef enum WGPUWaitStatus {
  1075. WGPUWaitStatus_Success = 0x00000001,
  1076. WGPUWaitStatus_TimedOut = 0x00000002,
  1077. WGPUWaitStatus_Error = 0x00000003,
  1078. WGPUWaitStatus_Force32 = 0x7FFFFFFF
  1079. } WGPUWaitStatus WGPU_ENUM_ATTRIBUTE;
  1080. typedef enum WGPUWGSLLanguageFeatureName {
  1081. WGPUWGSLLanguageFeatureName_ReadonlyAndReadwriteStorageTextures = 0x00000001,
  1082. WGPUWGSLLanguageFeatureName_Packed4x8IntegerDotProduct = 0x00000002,
  1083. WGPUWGSLLanguageFeatureName_UnrestrictedPointerParameters = 0x00000003,
  1084. WGPUWGSLLanguageFeatureName_PointerCompositeAccess = 0x00000004,
  1085. WGPUWGSLLanguageFeatureName_UniformBufferStandardLayout = 0x00000005,
  1086. WGPUWGSLLanguageFeatureName_SubgroupId = 0x00000006,
  1087. WGPUWGSLLanguageFeatureName_SizedBindingArray = 0x00050007,
  1088. WGPUWGSLLanguageFeatureName_TexelBuffers = 0x00050008,
  1089. WGPUWGSLLanguageFeatureName_ChromiumPrint = 0x00050009,
  1090. WGPUWGSLLanguageFeatureName_FragmentDepth = 0x0005000A,
  1091. WGPUWGSLLanguageFeatureName_ImmediateAddressSpace = 0x0005000B,
  1092. WGPUWGSLLanguageFeatureName_SubgroupUniformity = 0x0005000C,
  1093. WGPUWGSLLanguageFeatureName_TextureAndSamplerLet = 0x0005000D,
  1094. WGPUWGSLLanguageFeatureName_BufferView = 0x0005000E,
  1095. WGPUWGSLLanguageFeatureName_ChromiumTestingUnimplemented = 0x00050000,
  1096. WGPUWGSLLanguageFeatureName_ChromiumTestingUnsafeExperimental = 0x00050001,
  1097. WGPUWGSLLanguageFeatureName_ChromiumTestingExperimental = 0x00050002,
  1098. WGPUWGSLLanguageFeatureName_ChromiumTestingShippedWithKillswitch = 0x00050003,
  1099. WGPUWGSLLanguageFeatureName_ChromiumTestingShipped = 0x00050004,
  1100. WGPUWGSLLanguageFeatureName_Force32 = 0x7FFFFFFF
  1101. } WGPUWGSLLanguageFeatureName WGPU_ENUM_ATTRIBUTE;
  1102. typedef WGPUFlags WGPUBufferUsage;
  1103. static const WGPUBufferUsage WGPUBufferUsage_None = 0x0000000000000000;
  1104. static const WGPUBufferUsage WGPUBufferUsage_MapRead = 0x0000000000000001;
  1105. static const WGPUBufferUsage WGPUBufferUsage_MapWrite = 0x0000000000000002;
  1106. static const WGPUBufferUsage WGPUBufferUsage_CopySrc = 0x0000000000000004;
  1107. static const WGPUBufferUsage WGPUBufferUsage_CopyDst = 0x0000000000000008;
  1108. static const WGPUBufferUsage WGPUBufferUsage_Index = 0x0000000000000010;
  1109. static const WGPUBufferUsage WGPUBufferUsage_Vertex = 0x0000000000000020;
  1110. static const WGPUBufferUsage WGPUBufferUsage_Uniform = 0x0000000000000040;
  1111. static const WGPUBufferUsage WGPUBufferUsage_Storage = 0x0000000000000080;
  1112. static const WGPUBufferUsage WGPUBufferUsage_Indirect = 0x0000000000000100;
  1113. static const WGPUBufferUsage WGPUBufferUsage_QueryResolve = 0x0000000000000200;
  1114. static const WGPUBufferUsage WGPUBufferUsage_TexelBuffer = 0x0000000000000400;
  1115. typedef WGPUFlags WGPUColorWriteMask;
  1116. static const WGPUColorWriteMask WGPUColorWriteMask_None = 0x0000000000000000;
  1117. static const WGPUColorWriteMask WGPUColorWriteMask_Red = 0x0000000000000001;
  1118. static const WGPUColorWriteMask WGPUColorWriteMask_Green = 0x0000000000000002;
  1119. static const WGPUColorWriteMask WGPUColorWriteMask_Blue = 0x0000000000000004;
  1120. static const WGPUColorWriteMask WGPUColorWriteMask_Alpha = 0x0000000000000008;
  1121. static const WGPUColorWriteMask WGPUColorWriteMask_All = 0x000000000000000F;
  1122. typedef WGPUFlags WGPUHeapProperty;
  1123. static const WGPUHeapProperty WGPUHeapProperty_None = 0x0000000000000000;
  1124. static const WGPUHeapProperty WGPUHeapProperty_DeviceLocal = 0x0000000000000001;
  1125. static const WGPUHeapProperty WGPUHeapProperty_HostVisible = 0x0000000000000002;
  1126. static const WGPUHeapProperty WGPUHeapProperty_HostCoherent = 0x0000000000000004;
  1127. static const WGPUHeapProperty WGPUHeapProperty_HostUncached = 0x0000000000000008;
  1128. static const WGPUHeapProperty WGPUHeapProperty_HostCached = 0x0000000000000010;
  1129. typedef WGPUFlags WGPUMapMode;
  1130. static const WGPUMapMode WGPUMapMode_None = 0x0000000000000000;
  1131. static const WGPUMapMode WGPUMapMode_Read = 0x0000000000000001;
  1132. static const WGPUMapMode WGPUMapMode_Write = 0x0000000000000002;
  1133. typedef WGPUFlags WGPUShaderStage;
  1134. static const WGPUShaderStage WGPUShaderStage_None = 0x0000000000000000;
  1135. static const WGPUShaderStage WGPUShaderStage_Vertex = 0x0000000000000001;
  1136. static const WGPUShaderStage WGPUShaderStage_Fragment = 0x0000000000000002;
  1137. static const WGPUShaderStage WGPUShaderStage_Compute = 0x0000000000000004;
  1138. typedef WGPUFlags WGPUTextureUsage;
  1139. static const WGPUTextureUsage WGPUTextureUsage_None = 0x0000000000000000;
  1140. static const WGPUTextureUsage WGPUTextureUsage_CopySrc = 0x0000000000000001;
  1141. static const WGPUTextureUsage WGPUTextureUsage_CopyDst = 0x0000000000000002;
  1142. static const WGPUTextureUsage WGPUTextureUsage_TextureBinding = 0x0000000000000004;
  1143. static const WGPUTextureUsage WGPUTextureUsage_StorageBinding = 0x0000000000000008;
  1144. static const WGPUTextureUsage WGPUTextureUsage_RenderAttachment = 0x0000000000000010;
  1145. static const WGPUTextureUsage WGPUTextureUsage_TransientAttachment = 0x0000000000000020;
  1146. static const WGPUTextureUsage WGPUTextureUsage_StorageAttachment = 0x0000000000000040;
  1147. typedef void (*WGPUCallback)(void * userdata) WGPU_FUNCTION_ATTRIBUTE;
  1148. typedef size_t (*WGPUDawnLoadCacheDataFunction)(void const * key, size_t keySize, void * value, size_t valueSize, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
  1149. typedef void (*WGPUDawnStoreCacheDataFunction)(void const * key, size_t keySize, void const * value, size_t valueSize, void * userdata) WGPU_FUNCTION_ATTRIBUTE;
  1150. typedef void (*WGPUProc)(void) WGPU_FUNCTION_ATTRIBUTE;
  1151. // Callback function pointers
  1152. typedef void (*WGPUBufferMapCallback)(WGPUMapAsyncStatus status, WGPUStringView message, WGPU_NULLABLE void* userdata1, WGPU_NULLABLE void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
  1153. typedef void (*WGPUCompilationInfoCallback)(WGPUCompilationInfoRequestStatus status, struct WGPUCompilationInfo const * compilationInfo, WGPU_NULLABLE void* userdata1, WGPU_NULLABLE void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
  1154. typedef void (*WGPUCreateComputePipelineAsyncCallback)(WGPUCreatePipelineAsyncStatus status, WGPUComputePipeline pipeline, WGPUStringView message, WGPU_NULLABLE void* userdata1, WGPU_NULLABLE void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
  1155. typedef void (*WGPUCreateRenderPipelineAsyncCallback)(WGPUCreatePipelineAsyncStatus status, WGPURenderPipeline pipeline, WGPUStringView message, WGPU_NULLABLE void* userdata1, WGPU_NULLABLE void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
  1156. typedef void (*WGPUDeviceLostCallback)(WGPUDevice const * device, WGPUDeviceLostReason reason, WGPUStringView message, WGPU_NULLABLE void* userdata1, WGPU_NULLABLE void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
  1157. typedef void (*WGPULoggingCallback)(WGPULoggingType type, WGPUStringView message, WGPU_NULLABLE void* userdata1, WGPU_NULLABLE void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
  1158. typedef void (*WGPUPopErrorScopeCallback)(WGPUPopErrorScopeStatus status, WGPUErrorType type, WGPUStringView message, WGPU_NULLABLE void* userdata1, WGPU_NULLABLE void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
  1159. typedef void (*WGPUQueueWorkDoneCallback)(WGPUQueueWorkDoneStatus status, WGPUStringView message, WGPU_NULLABLE void* userdata1, WGPU_NULLABLE void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
  1160. typedef void (*WGPURequestAdapterCallback)(WGPURequestAdapterStatus status, WGPUAdapter adapter, WGPUStringView message, WGPU_NULLABLE void* userdata1, WGPU_NULLABLE void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
  1161. typedef void (*WGPURequestDeviceCallback)(WGPURequestDeviceStatus status, WGPUDevice device, WGPUStringView message, WGPU_NULLABLE void* userdata1, WGPU_NULLABLE void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
  1162. typedef void (*WGPUUncapturedErrorCallback)(WGPUDevice const * device, WGPUErrorType type, WGPUStringView message, WGPU_NULLABLE void* userdata1, WGPU_NULLABLE void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
  1163. typedef struct WGPUChainedStruct {
  1164. struct WGPUChainedStruct * next;
  1165. WGPUSType sType;
  1166. } WGPUChainedStruct WGPU_STRUCTURE_ATTRIBUTE;
  1167. typedef struct WGPUBufferMapCallbackInfo {
  1168. WGPUChainedStruct * nextInChain;
  1169. WGPUCallbackMode mode;
  1170. WGPUBufferMapCallback callback;
  1171. WGPU_NULLABLE void* userdata1;
  1172. WGPU_NULLABLE void* userdata2;
  1173. } WGPUBufferMapCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
  1174. #define WGPU_BUFFER_MAP_CALLBACK_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBufferMapCallbackInfo, { \
  1175. /*.nextInChain=*/NULL _wgpu_COMMA \
  1176. /*.mode=*/_wgpu_ENUM_ZERO_INIT(WGPUCallbackMode) _wgpu_COMMA \
  1177. /*.callback=*/NULL _wgpu_COMMA \
  1178. /*.userdata1=*/NULL _wgpu_COMMA \
  1179. /*.userdata2=*/NULL _wgpu_COMMA \
  1180. })
  1181. typedef struct WGPUCompilationInfoCallbackInfo {
  1182. WGPUChainedStruct * nextInChain;
  1183. WGPUCallbackMode mode;
  1184. WGPUCompilationInfoCallback callback;
  1185. WGPU_NULLABLE void* userdata1;
  1186. WGPU_NULLABLE void* userdata2;
  1187. } WGPUCompilationInfoCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
  1188. #define WGPU_COMPILATION_INFO_CALLBACK_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUCompilationInfoCallbackInfo, { \
  1189. /*.nextInChain=*/NULL _wgpu_COMMA \
  1190. /*.mode=*/_wgpu_ENUM_ZERO_INIT(WGPUCallbackMode) _wgpu_COMMA \
  1191. /*.callback=*/NULL _wgpu_COMMA \
  1192. /*.userdata1=*/NULL _wgpu_COMMA \
  1193. /*.userdata2=*/NULL _wgpu_COMMA \
  1194. })
  1195. typedef struct WGPUCreateComputePipelineAsyncCallbackInfo {
  1196. WGPUChainedStruct * nextInChain;
  1197. WGPUCallbackMode mode;
  1198. WGPUCreateComputePipelineAsyncCallback callback;
  1199. WGPU_NULLABLE void* userdata1;
  1200. WGPU_NULLABLE void* userdata2;
  1201. } WGPUCreateComputePipelineAsyncCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
  1202. #define WGPU_CREATE_COMPUTE_PIPELINE_ASYNC_CALLBACK_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUCreateComputePipelineAsyncCallbackInfo, { \
  1203. /*.nextInChain=*/NULL _wgpu_COMMA \
  1204. /*.mode=*/_wgpu_ENUM_ZERO_INIT(WGPUCallbackMode) _wgpu_COMMA \
  1205. /*.callback=*/NULL _wgpu_COMMA \
  1206. /*.userdata1=*/NULL _wgpu_COMMA \
  1207. /*.userdata2=*/NULL _wgpu_COMMA \
  1208. })
  1209. typedef struct WGPUCreateRenderPipelineAsyncCallbackInfo {
  1210. WGPUChainedStruct * nextInChain;
  1211. WGPUCallbackMode mode;
  1212. WGPUCreateRenderPipelineAsyncCallback callback;
  1213. WGPU_NULLABLE void* userdata1;
  1214. WGPU_NULLABLE void* userdata2;
  1215. } WGPUCreateRenderPipelineAsyncCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
  1216. #define WGPU_CREATE_RENDER_PIPELINE_ASYNC_CALLBACK_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUCreateRenderPipelineAsyncCallbackInfo, { \
  1217. /*.nextInChain=*/NULL _wgpu_COMMA \
  1218. /*.mode=*/_wgpu_ENUM_ZERO_INIT(WGPUCallbackMode) _wgpu_COMMA \
  1219. /*.callback=*/NULL _wgpu_COMMA \
  1220. /*.userdata1=*/NULL _wgpu_COMMA \
  1221. /*.userdata2=*/NULL _wgpu_COMMA \
  1222. })
  1223. typedef struct WGPUDeviceLostCallbackInfo {
  1224. WGPUChainedStruct * nextInChain;
  1225. WGPUCallbackMode mode;
  1226. WGPUDeviceLostCallback callback;
  1227. WGPU_NULLABLE void* userdata1;
  1228. WGPU_NULLABLE void* userdata2;
  1229. } WGPUDeviceLostCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
  1230. #define WGPU_DEVICE_LOST_CALLBACK_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDeviceLostCallbackInfo, { \
  1231. /*.nextInChain=*/NULL _wgpu_COMMA \
  1232. /*.mode=*/_wgpu_ENUM_ZERO_INIT(WGPUCallbackMode) _wgpu_COMMA \
  1233. /*.callback=*/NULL _wgpu_COMMA \
  1234. /*.userdata1=*/NULL _wgpu_COMMA \
  1235. /*.userdata2=*/NULL _wgpu_COMMA \
  1236. })
  1237. typedef struct WGPULoggingCallbackInfo {
  1238. WGPUChainedStruct * nextInChain;
  1239. WGPULoggingCallback callback;
  1240. WGPU_NULLABLE void* userdata1;
  1241. WGPU_NULLABLE void* userdata2;
  1242. } WGPULoggingCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
  1243. #define WGPU_LOGGING_CALLBACK_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPULoggingCallbackInfo, { \
  1244. /*.nextInChain=*/NULL _wgpu_COMMA \
  1245. /*.callback=*/NULL _wgpu_COMMA \
  1246. /*.userdata1=*/NULL _wgpu_COMMA \
  1247. /*.userdata2=*/NULL _wgpu_COMMA \
  1248. })
  1249. typedef struct WGPUPopErrorScopeCallbackInfo {
  1250. WGPUChainedStruct * nextInChain;
  1251. WGPUCallbackMode mode;
  1252. WGPUPopErrorScopeCallback callback;
  1253. WGPU_NULLABLE void* userdata1;
  1254. WGPU_NULLABLE void* userdata2;
  1255. } WGPUPopErrorScopeCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
  1256. #define WGPU_POP_ERROR_SCOPE_CALLBACK_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUPopErrorScopeCallbackInfo, { \
  1257. /*.nextInChain=*/NULL _wgpu_COMMA \
  1258. /*.mode=*/_wgpu_ENUM_ZERO_INIT(WGPUCallbackMode) _wgpu_COMMA \
  1259. /*.callback=*/NULL _wgpu_COMMA \
  1260. /*.userdata1=*/NULL _wgpu_COMMA \
  1261. /*.userdata2=*/NULL _wgpu_COMMA \
  1262. })
  1263. typedef struct WGPUQueueWorkDoneCallbackInfo {
  1264. WGPUChainedStruct * nextInChain;
  1265. WGPUCallbackMode mode;
  1266. WGPUQueueWorkDoneCallback callback;
  1267. WGPU_NULLABLE void* userdata1;
  1268. WGPU_NULLABLE void* userdata2;
  1269. } WGPUQueueWorkDoneCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
  1270. #define WGPU_QUEUE_WORK_DONE_CALLBACK_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUQueueWorkDoneCallbackInfo, { \
  1271. /*.nextInChain=*/NULL _wgpu_COMMA \
  1272. /*.mode=*/_wgpu_ENUM_ZERO_INIT(WGPUCallbackMode) _wgpu_COMMA \
  1273. /*.callback=*/NULL _wgpu_COMMA \
  1274. /*.userdata1=*/NULL _wgpu_COMMA \
  1275. /*.userdata2=*/NULL _wgpu_COMMA \
  1276. })
  1277. typedef struct WGPURequestAdapterCallbackInfo {
  1278. WGPUChainedStruct * nextInChain;
  1279. WGPUCallbackMode mode;
  1280. WGPURequestAdapterCallback callback;
  1281. WGPU_NULLABLE void* userdata1;
  1282. WGPU_NULLABLE void* userdata2;
  1283. } WGPURequestAdapterCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
  1284. #define WGPU_REQUEST_ADAPTER_CALLBACK_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPURequestAdapterCallbackInfo, { \
  1285. /*.nextInChain=*/NULL _wgpu_COMMA \
  1286. /*.mode=*/_wgpu_ENUM_ZERO_INIT(WGPUCallbackMode) _wgpu_COMMA \
  1287. /*.callback=*/NULL _wgpu_COMMA \
  1288. /*.userdata1=*/NULL _wgpu_COMMA \
  1289. /*.userdata2=*/NULL _wgpu_COMMA \
  1290. })
  1291. typedef struct WGPURequestDeviceCallbackInfo {
  1292. WGPUChainedStruct * nextInChain;
  1293. WGPUCallbackMode mode;
  1294. WGPURequestDeviceCallback callback;
  1295. WGPU_NULLABLE void* userdata1;
  1296. WGPU_NULLABLE void* userdata2;
  1297. } WGPURequestDeviceCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
  1298. #define WGPU_REQUEST_DEVICE_CALLBACK_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPURequestDeviceCallbackInfo, { \
  1299. /*.nextInChain=*/NULL _wgpu_COMMA \
  1300. /*.mode=*/_wgpu_ENUM_ZERO_INIT(WGPUCallbackMode) _wgpu_COMMA \
  1301. /*.callback=*/NULL _wgpu_COMMA \
  1302. /*.userdata1=*/NULL _wgpu_COMMA \
  1303. /*.userdata2=*/NULL _wgpu_COMMA \
  1304. })
  1305. typedef struct WGPUUncapturedErrorCallbackInfo {
  1306. WGPUChainedStruct * nextInChain;
  1307. WGPUUncapturedErrorCallback callback;
  1308. WGPU_NULLABLE void* userdata1;
  1309. WGPU_NULLABLE void* userdata2;
  1310. } WGPUUncapturedErrorCallbackInfo WGPU_STRUCTURE_ATTRIBUTE;
  1311. #define WGPU_UNCAPTURED_ERROR_CALLBACK_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUUncapturedErrorCallbackInfo, { \
  1312. /*.nextInChain=*/NULL _wgpu_COMMA \
  1313. /*.callback=*/NULL _wgpu_COMMA \
  1314. /*.userdata1=*/NULL _wgpu_COMMA \
  1315. /*.userdata2=*/NULL _wgpu_COMMA \
  1316. })
  1317. // Can be chained in WGPUAdapterInfo
  1318. typedef struct WGPUAdapterPropertiesD3D {
  1319. WGPUChainedStruct chain;
  1320. uint32_t shaderModel;
  1321. } WGPUAdapterPropertiesD3D WGPU_STRUCTURE_ATTRIBUTE;
  1322. #define WGPU_ADAPTER_PROPERTIES_D3D_INIT _wgpu_MAKE_INIT_STRUCT(WGPUAdapterPropertiesD3D, { \
  1323. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1324. /*.next=*/NULL _wgpu_COMMA \
  1325. /*.sType=*/WGPUSType_AdapterPropertiesD3D _wgpu_COMMA \
  1326. }) _wgpu_COMMA \
  1327. /*.shaderModel=*/0 _wgpu_COMMA \
  1328. })
  1329. // Can be chained in WGPUAdapterInfo
  1330. typedef struct WGPUAdapterPropertiesVk {
  1331. WGPUChainedStruct chain;
  1332. uint32_t driverVersion;
  1333. } WGPUAdapterPropertiesVk WGPU_STRUCTURE_ATTRIBUTE;
  1334. #define WGPU_ADAPTER_PROPERTIES_VK_INIT _wgpu_MAKE_INIT_STRUCT(WGPUAdapterPropertiesVk, { \
  1335. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1336. /*.next=*/NULL _wgpu_COMMA \
  1337. /*.sType=*/WGPUSType_AdapterPropertiesVk _wgpu_COMMA \
  1338. }) _wgpu_COMMA \
  1339. /*.driverVersion=*/0 _wgpu_COMMA \
  1340. })
  1341. // Can be chained in WGPUAdapterInfo
  1342. typedef struct WGPUAdapterPropertiesWGPU {
  1343. WGPUChainedStruct chain;
  1344. WGPUBackendType backendType;
  1345. } WGPUAdapterPropertiesWGPU WGPU_STRUCTURE_ATTRIBUTE;
  1346. #define WGPU_ADAPTER_PROPERTIES_WGPU_INIT _wgpu_MAKE_INIT_STRUCT(WGPUAdapterPropertiesWGPU, { \
  1347. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1348. /*.next=*/NULL _wgpu_COMMA \
  1349. /*.sType=*/WGPUSType_AdapterPropertiesWGPU _wgpu_COMMA \
  1350. }) _wgpu_COMMA \
  1351. /*.backendType=*/WGPUBackendType_Undefined _wgpu_COMMA \
  1352. })
  1353. typedef struct WGPUBindingResource {
  1354. WGPUChainedStruct * nextInChain;
  1355. WGPU_NULLABLE WGPUBuffer buffer;
  1356. uint64_t offset;
  1357. uint64_t size;
  1358. WGPU_NULLABLE WGPUSampler sampler;
  1359. WGPU_NULLABLE WGPUTextureView textureView;
  1360. } WGPUBindingResource WGPU_STRUCTURE_ATTRIBUTE;
  1361. #define WGPU_BINDING_RESOURCE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBindingResource, { \
  1362. /*.nextInChain=*/NULL _wgpu_COMMA \
  1363. /*.buffer=*/NULL _wgpu_COMMA \
  1364. /*.offset=*/0 _wgpu_COMMA \
  1365. /*.size=*/WGPU_WHOLE_SIZE _wgpu_COMMA \
  1366. /*.sampler=*/NULL _wgpu_COMMA \
  1367. /*.textureView=*/NULL _wgpu_COMMA \
  1368. })
  1369. typedef struct WGPUBlendComponent {
  1370. WGPUBlendOperation operation;
  1371. WGPUBlendFactor srcFactor;
  1372. WGPUBlendFactor dstFactor;
  1373. } WGPUBlendComponent WGPU_STRUCTURE_ATTRIBUTE;
  1374. #define WGPU_BLEND_COMPONENT_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBlendComponent, { \
  1375. /*.operation=*/WGPUBlendOperation_Undefined _wgpu_COMMA \
  1376. /*.srcFactor=*/WGPUBlendFactor_Undefined _wgpu_COMMA \
  1377. /*.dstFactor=*/WGPUBlendFactor_Undefined _wgpu_COMMA \
  1378. })
  1379. typedef struct WGPUBufferBindingLayout {
  1380. WGPUChainedStruct * nextInChain;
  1381. WGPUBufferBindingType type;
  1382. WGPUBool hasDynamicOffset;
  1383. uint64_t minBindingSize;
  1384. } WGPUBufferBindingLayout WGPU_STRUCTURE_ATTRIBUTE;
  1385. #define WGPU_BUFFER_BINDING_LAYOUT_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBufferBindingLayout, { \
  1386. /*.nextInChain=*/NULL _wgpu_COMMA \
  1387. /*.type=*/WGPUBufferBindingType_Undefined _wgpu_COMMA \
  1388. /*.hasDynamicOffset=*/WGPU_FALSE _wgpu_COMMA \
  1389. /*.minBindingSize=*/0 _wgpu_COMMA \
  1390. })
  1391. // Can be chained in WGPUBufferDescriptor
  1392. typedef struct WGPUBufferHostMappedPointer {
  1393. WGPUChainedStruct chain;
  1394. void * pointer;
  1395. WGPUCallback disposeCallback;
  1396. void * userdata;
  1397. } WGPUBufferHostMappedPointer WGPU_STRUCTURE_ATTRIBUTE;
  1398. #define WGPU_BUFFER_HOST_MAPPED_POINTER_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBufferHostMappedPointer, { \
  1399. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1400. /*.next=*/NULL _wgpu_COMMA \
  1401. /*.sType=*/WGPUSType_BufferHostMappedPointer _wgpu_COMMA \
  1402. }) _wgpu_COMMA \
  1403. /*.pointer=*/NULL _wgpu_COMMA \
  1404. /*.disposeCallback=*/NULL _wgpu_COMMA \
  1405. /*.userdata=*/NULL _wgpu_COMMA \
  1406. })
  1407. typedef struct WGPUColor {
  1408. double r;
  1409. double g;
  1410. double b;
  1411. double a;
  1412. } WGPUColor WGPU_STRUCTURE_ATTRIBUTE;
  1413. #define WGPU_COLOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUColor, { \
  1414. /*.r=*/0. _wgpu_COMMA \
  1415. /*.g=*/0. _wgpu_COMMA \
  1416. /*.b=*/0. _wgpu_COMMA \
  1417. /*.a=*/0. _wgpu_COMMA \
  1418. })
  1419. // Can be chained in WGPUColorTargetState
  1420. typedef struct WGPUColorTargetStateExpandResolveTextureDawn {
  1421. WGPUChainedStruct chain;
  1422. WGPUBool enabled;
  1423. } WGPUColorTargetStateExpandResolveTextureDawn WGPU_STRUCTURE_ATTRIBUTE;
  1424. #define WGPU_COLOR_TARGET_STATE_EXPAND_RESOLVE_TEXTURE_DAWN_INIT _wgpu_MAKE_INIT_STRUCT(WGPUColorTargetStateExpandResolveTextureDawn, { \
  1425. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1426. /*.next=*/NULL _wgpu_COMMA \
  1427. /*.sType=*/WGPUSType_ColorTargetStateExpandResolveTextureDawn _wgpu_COMMA \
  1428. }) _wgpu_COMMA \
  1429. /*.enabled=*/WGPU_FALSE _wgpu_COMMA \
  1430. })
  1431. typedef struct WGPUCommandBufferDescriptor {
  1432. WGPUChainedStruct * nextInChain;
  1433. WGPUStringView label;
  1434. } WGPUCommandBufferDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  1435. #define WGPU_COMMAND_BUFFER_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUCommandBufferDescriptor, { \
  1436. /*.nextInChain=*/NULL _wgpu_COMMA \
  1437. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  1438. })
  1439. // Can be chained in WGPULimits
  1440. typedef struct WGPUCompatibilityModeLimits {
  1441. WGPUChainedStruct chain;
  1442. uint32_t maxStorageBuffersInVertexStage;
  1443. uint32_t maxStorageTexturesInVertexStage;
  1444. uint32_t maxStorageBuffersInFragmentStage;
  1445. uint32_t maxStorageTexturesInFragmentStage;
  1446. } WGPUCompatibilityModeLimits WGPU_STRUCTURE_ATTRIBUTE;
  1447. #define WGPU_COMPATIBILITY_MODE_LIMITS_INIT _wgpu_MAKE_INIT_STRUCT(WGPUCompatibilityModeLimits, { \
  1448. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1449. /*.next=*/NULL _wgpu_COMMA \
  1450. /*.sType=*/WGPUSType_CompatibilityModeLimits _wgpu_COMMA \
  1451. }) _wgpu_COMMA \
  1452. /*.maxStorageBuffersInVertexStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  1453. /*.maxStorageTexturesInVertexStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  1454. /*.maxStorageBuffersInFragmentStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  1455. /*.maxStorageTexturesInFragmentStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  1456. })
  1457. typedef struct WGPUConstantEntry {
  1458. WGPUChainedStruct * nextInChain;
  1459. WGPUStringView key;
  1460. double value;
  1461. } WGPUConstantEntry WGPU_STRUCTURE_ATTRIBUTE;
  1462. #define WGPU_CONSTANT_ENTRY_INIT _wgpu_MAKE_INIT_STRUCT(WGPUConstantEntry, { \
  1463. /*.nextInChain=*/NULL _wgpu_COMMA \
  1464. /*.key=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  1465. /*.value=*/0. _wgpu_COMMA \
  1466. })
  1467. typedef struct WGPUCopyTextureForBrowserOptions {
  1468. WGPUChainedStruct * nextInChain;
  1469. WGPUBool flipY;
  1470. WGPUBool needsColorSpaceConversion;
  1471. WGPUAlphaMode srcAlphaMode;
  1472. WGPU_NULLABLE float const * srcTransferFunctionParameters;
  1473. WGPU_NULLABLE float const * conversionMatrix;
  1474. WGPU_NULLABLE float const * dstTransferFunctionParameters;
  1475. WGPUAlphaMode dstAlphaMode;
  1476. WGPUBool internalUsage;
  1477. } WGPUCopyTextureForBrowserOptions WGPU_STRUCTURE_ATTRIBUTE;
  1478. #define WGPU_COPY_TEXTURE_FOR_BROWSER_OPTIONS_INIT _wgpu_MAKE_INIT_STRUCT(WGPUCopyTextureForBrowserOptions, { \
  1479. /*.nextInChain=*/NULL _wgpu_COMMA \
  1480. /*.flipY=*/WGPU_FALSE _wgpu_COMMA \
  1481. /*.needsColorSpaceConversion=*/WGPU_FALSE _wgpu_COMMA \
  1482. /*.srcAlphaMode=*/WGPUAlphaMode_Unpremultiplied _wgpu_COMMA \
  1483. /*.srcTransferFunctionParameters=*/NULL _wgpu_COMMA \
  1484. /*.conversionMatrix=*/NULL _wgpu_COMMA \
  1485. /*.dstTransferFunctionParameters=*/NULL _wgpu_COMMA \
  1486. /*.dstAlphaMode=*/WGPUAlphaMode_Unpremultiplied _wgpu_COMMA \
  1487. /*.internalUsage=*/WGPU_FALSE _wgpu_COMMA \
  1488. })
  1489. // Can be chained in WGPUAdapterInfo
  1490. typedef struct WGPUDawnAdapterPropertiesPowerPreference {
  1491. WGPUChainedStruct chain;
  1492. WGPUPowerPreference powerPreference;
  1493. } WGPUDawnAdapterPropertiesPowerPreference WGPU_STRUCTURE_ATTRIBUTE;
  1494. #define WGPU_DAWN_ADAPTER_PROPERTIES_POWER_PREFERENCE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnAdapterPropertiesPowerPreference, { \
  1495. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1496. /*.next=*/NULL _wgpu_COMMA \
  1497. /*.sType=*/WGPUSType_DawnAdapterPropertiesPowerPreference _wgpu_COMMA \
  1498. }) _wgpu_COMMA \
  1499. /*.powerPreference=*/WGPUPowerPreference_Undefined _wgpu_COMMA \
  1500. })
  1501. // Can be chained in WGPUBufferDescriptor
  1502. typedef struct WGPUDawnBufferDescriptorErrorInfoFromWireClient {
  1503. WGPUChainedStruct chain;
  1504. WGPUBool outOfMemory;
  1505. } WGPUDawnBufferDescriptorErrorInfoFromWireClient WGPU_STRUCTURE_ATTRIBUTE;
  1506. #define WGPU_DAWN_BUFFER_DESCRIPTOR_ERROR_INFO_FROM_WIRE_CLIENT_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnBufferDescriptorErrorInfoFromWireClient, { \
  1507. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1508. /*.next=*/NULL _wgpu_COMMA \
  1509. /*.sType=*/WGPUSType_DawnBufferDescriptorErrorInfoFromWireClient _wgpu_COMMA \
  1510. }) _wgpu_COMMA \
  1511. /*.outOfMemory=*/WGPU_FALSE _wgpu_COMMA \
  1512. })
  1513. // Can be chained in WGPUDeviceDescriptor
  1514. typedef struct WGPUDawnCacheDeviceDescriptor {
  1515. WGPUChainedStruct chain;
  1516. WGPUStringView isolationKey;
  1517. WGPUDawnLoadCacheDataFunction loadDataFunction;
  1518. WGPUDawnStoreCacheDataFunction storeDataFunction;
  1519. void * functionUserdata;
  1520. } WGPUDawnCacheDeviceDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  1521. #define WGPU_DAWN_CACHE_DEVICE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnCacheDeviceDescriptor, { \
  1522. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1523. /*.next=*/NULL _wgpu_COMMA \
  1524. /*.sType=*/WGPUSType_DawnCacheDeviceDescriptor _wgpu_COMMA \
  1525. }) _wgpu_COMMA \
  1526. /*.isolationKey=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  1527. /*.loadDataFunction=*/NULL _wgpu_COMMA \
  1528. /*.storeDataFunction=*/NULL _wgpu_COMMA \
  1529. /*.functionUserdata=*/nullptr _wgpu_COMMA \
  1530. })
  1531. // Can be chained in WGPUCompilationMessage
  1532. typedef struct WGPUDawnCompilationMessageUtf16 {
  1533. WGPUChainedStruct chain;
  1534. uint64_t linePos;
  1535. uint64_t offset;
  1536. uint64_t length;
  1537. } WGPUDawnCompilationMessageUtf16 WGPU_STRUCTURE_ATTRIBUTE;
  1538. #define WGPU_DAWN_COMPILATION_MESSAGE_UTF16_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnCompilationMessageUtf16, { \
  1539. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1540. /*.next=*/NULL _wgpu_COMMA \
  1541. /*.sType=*/WGPUSType_DawnCompilationMessageUtf16 _wgpu_COMMA \
  1542. }) _wgpu_COMMA \
  1543. /*.linePos=*/0 _wgpu_COMMA \
  1544. /*.offset=*/0 _wgpu_COMMA \
  1545. /*.length=*/0 _wgpu_COMMA \
  1546. })
  1547. // Can be chained in WGPUDeviceDescriptor
  1548. typedef struct WGPUDawnConsumeAdapterDescriptor {
  1549. WGPUChainedStruct chain;
  1550. WGPUBool consumeAdapter;
  1551. } WGPUDawnConsumeAdapterDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  1552. #define WGPU_DAWN_CONSUME_ADAPTER_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnConsumeAdapterDescriptor, { \
  1553. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1554. /*.next=*/NULL _wgpu_COMMA \
  1555. /*.sType=*/WGPUSType_DawnConsumeAdapterDescriptor _wgpu_COMMA \
  1556. }) _wgpu_COMMA \
  1557. /*.consumeAdapter=*/WGPU_FALSE _wgpu_COMMA \
  1558. })
  1559. // Can be chained in WGPUDeviceDescriptor
  1560. typedef struct WGPUDawnDeviceAllocatorControl {
  1561. WGPUChainedStruct chain;
  1562. size_t allocatorHeapBlockSize;
  1563. } WGPUDawnDeviceAllocatorControl WGPU_STRUCTURE_ATTRIBUTE;
  1564. #define WGPU_DAWN_DEVICE_ALLOCATOR_CONTROL_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnDeviceAllocatorControl, { \
  1565. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1566. /*.next=*/NULL _wgpu_COMMA \
  1567. /*.sType=*/WGPUSType_DawnDeviceAllocatorControl _wgpu_COMMA \
  1568. }) _wgpu_COMMA \
  1569. /*.allocatorHeapBlockSize=*/0 _wgpu_COMMA \
  1570. })
  1571. typedef struct WGPUDawnDrmFormatProperties {
  1572. uint64_t modifier;
  1573. uint32_t modifierPlaneCount;
  1574. } WGPUDawnDrmFormatProperties WGPU_STRUCTURE_ATTRIBUTE;
  1575. #define WGPU_DAWN_DRM_FORMAT_PROPERTIES_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnDrmFormatProperties, { \
  1576. /*.modifier=*/0 _wgpu_COMMA \
  1577. /*.modifierPlaneCount=*/0 _wgpu_COMMA \
  1578. })
  1579. // Can be chained in WGPUCommandEncoderDescriptor
  1580. typedef struct WGPUDawnEncoderInternalUsageDescriptor {
  1581. WGPUChainedStruct chain;
  1582. WGPUBool useInternalUsages;
  1583. } WGPUDawnEncoderInternalUsageDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  1584. #define WGPU_DAWN_ENCODER_INTERNAL_USAGE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnEncoderInternalUsageDescriptor, { \
  1585. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1586. /*.next=*/NULL _wgpu_COMMA \
  1587. /*.sType=*/WGPUSType_DawnEncoderInternalUsageDescriptor _wgpu_COMMA \
  1588. }) _wgpu_COMMA \
  1589. /*.useInternalUsages=*/WGPU_FALSE _wgpu_COMMA \
  1590. })
  1591. // Can be chained in WGPUBufferDescriptor
  1592. typedef struct WGPUDawnFakeBufferOOMForTesting {
  1593. WGPUChainedStruct chain;
  1594. WGPUBool fakeOOMAtWireClientMap;
  1595. WGPUBool fakeOOMAtNativeMap;
  1596. WGPUBool fakeOOMAtDevice;
  1597. } WGPUDawnFakeBufferOOMForTesting WGPU_STRUCTURE_ATTRIBUTE;
  1598. #define WGPU_DAWN_FAKE_BUFFER_OOM_FOR_TESTING_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnFakeBufferOOMForTesting, { \
  1599. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1600. /*.next=*/NULL _wgpu_COMMA \
  1601. /*.sType=*/WGPUSType_DawnFakeBufferOOMForTesting _wgpu_COMMA \
  1602. }) _wgpu_COMMA \
  1603. /*.fakeOOMAtWireClientMap=*/WGPU_FALSE _wgpu_COMMA \
  1604. /*.fakeOOMAtNativeMap=*/WGPU_FALSE _wgpu_COMMA \
  1605. /*.fakeOOMAtDevice=*/WGPU_FALSE _wgpu_COMMA \
  1606. })
  1607. // Can be chained in WGPUDeviceDescriptor
  1608. typedef struct WGPUDawnFakeDeviceInitializeErrorForTesting {
  1609. WGPUChainedStruct chain;
  1610. } WGPUDawnFakeDeviceInitializeErrorForTesting WGPU_STRUCTURE_ATTRIBUTE;
  1611. #define WGPU_DAWN_FAKE_DEVICE_INITIALIZE_ERROR_FOR_TESTING_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnFakeDeviceInitializeErrorForTesting, { \
  1612. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1613. /*.next=*/NULL _wgpu_COMMA \
  1614. /*.sType=*/WGPUSType_DawnFakeDeviceInitializeErrorForTesting _wgpu_COMMA \
  1615. }) _wgpu_COMMA \
  1616. })
  1617. // Can be chained in WGPULimits
  1618. typedef struct WGPUDawnHostMappedPointerLimits {
  1619. WGPUChainedStruct chain;
  1620. uint32_t hostMappedPointerAlignment;
  1621. } WGPUDawnHostMappedPointerLimits WGPU_STRUCTURE_ATTRIBUTE;
  1622. #define WGPU_DAWN_HOST_MAPPED_POINTER_LIMITS_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnHostMappedPointerLimits, { \
  1623. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1624. /*.next=*/NULL _wgpu_COMMA \
  1625. /*.sType=*/WGPUSType_DawnHostMappedPointerLimits _wgpu_COMMA \
  1626. }) _wgpu_COMMA \
  1627. /*.hostMappedPointerAlignment=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  1628. })
  1629. typedef struct WGPUDawnInjectedInvalidSType {
  1630. WGPUChainedStruct chain;
  1631. WGPUSType invalidSType;
  1632. } WGPUDawnInjectedInvalidSType WGPU_STRUCTURE_ATTRIBUTE;
  1633. #define WGPU_DAWN_INJECTED_INVALID_S_TYPE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnInjectedInvalidSType, { \
  1634. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1635. /*.next=*/NULL _wgpu_COMMA \
  1636. /*.sType=*/WGPUSType_DawnInjectedInvalidSType _wgpu_COMMA \
  1637. }) _wgpu_COMMA \
  1638. /*.invalidSType=*/_wgpu_ENUM_ZERO_INIT(WGPUSType) _wgpu_COMMA \
  1639. })
  1640. // Can be chained in WGPURenderPassColorAttachment
  1641. typedef struct WGPUDawnRenderPassColorAttachmentRenderToSingleSampled {
  1642. WGPUChainedStruct chain;
  1643. uint32_t implicitSampleCount;
  1644. } WGPUDawnRenderPassColorAttachmentRenderToSingleSampled WGPU_STRUCTURE_ATTRIBUTE;
  1645. #define WGPU_DAWN_RENDER_PASS_COLOR_ATTACHMENT_RENDER_TO_SINGLE_SAMPLED_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnRenderPassColorAttachmentRenderToSingleSampled, { \
  1646. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1647. /*.next=*/NULL _wgpu_COMMA \
  1648. /*.sType=*/WGPUSType_DawnRenderPassColorAttachmentRenderToSingleSampled _wgpu_COMMA \
  1649. }) _wgpu_COMMA \
  1650. /*.implicitSampleCount=*/1 _wgpu_COMMA \
  1651. })
  1652. // Can be chained in WGPUShaderModuleDescriptor
  1653. typedef struct WGPUDawnShaderModuleSPIRVOptionsDescriptor {
  1654. WGPUChainedStruct chain;
  1655. WGPUBool allowNonUniformDerivatives;
  1656. } WGPUDawnShaderModuleSPIRVOptionsDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  1657. #define WGPU_DAWN_SHADER_MODULE_SPIRV_OPTIONS_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnShaderModuleSPIRVOptionsDescriptor, { \
  1658. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1659. /*.next=*/NULL _wgpu_COMMA \
  1660. /*.sType=*/WGPUSType_DawnShaderModuleSPIRVOptionsDescriptor _wgpu_COMMA \
  1661. }) _wgpu_COMMA \
  1662. /*.allowNonUniformDerivatives=*/WGPU_FALSE _wgpu_COMMA \
  1663. })
  1664. // Can be chained in WGPULimits
  1665. typedef struct WGPUDawnTexelCopyBufferRowAlignmentLimits {
  1666. WGPUChainedStruct chain;
  1667. uint32_t minTexelCopyBufferRowAlignment;
  1668. } WGPUDawnTexelCopyBufferRowAlignmentLimits WGPU_STRUCTURE_ATTRIBUTE;
  1669. #define WGPU_DAWN_TEXEL_COPY_BUFFER_ROW_ALIGNMENT_LIMITS_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnTexelCopyBufferRowAlignmentLimits, { \
  1670. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1671. /*.next=*/NULL _wgpu_COMMA \
  1672. /*.sType=*/WGPUSType_DawnTexelCopyBufferRowAlignmentLimits _wgpu_COMMA \
  1673. }) _wgpu_COMMA \
  1674. /*.minTexelCopyBufferRowAlignment=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  1675. })
  1676. // Can be chained in WGPUTextureDescriptor
  1677. typedef struct WGPUDawnTextureInternalUsageDescriptor {
  1678. WGPUChainedStruct chain;
  1679. WGPUTextureUsage internalUsage;
  1680. } WGPUDawnTextureInternalUsageDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  1681. #define WGPU_DAWN_TEXTURE_INTERNAL_USAGE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnTextureInternalUsageDescriptor, { \
  1682. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1683. /*.next=*/NULL _wgpu_COMMA \
  1684. /*.sType=*/WGPUSType_DawnTextureInternalUsageDescriptor _wgpu_COMMA \
  1685. }) _wgpu_COMMA \
  1686. /*.internalUsage=*/WGPUTextureUsage_None _wgpu_COMMA \
  1687. })
  1688. // Can be chained in WGPUInstanceDescriptor
  1689. // Can be chained in WGPURequestAdapterOptions
  1690. // Can be chained in WGPUDeviceDescriptor
  1691. typedef struct WGPUDawnTogglesDescriptor {
  1692. WGPUChainedStruct chain;
  1693. size_t enabledToggleCount;
  1694. const char* const * enabledToggles;
  1695. size_t disabledToggleCount;
  1696. const char* const * disabledToggles;
  1697. } WGPUDawnTogglesDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  1698. #define WGPU_DAWN_TOGGLES_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnTogglesDescriptor, { \
  1699. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1700. /*.next=*/NULL _wgpu_COMMA \
  1701. /*.sType=*/WGPUSType_DawnTogglesDescriptor _wgpu_COMMA \
  1702. }) _wgpu_COMMA \
  1703. /*.enabledToggleCount=*/0 _wgpu_COMMA \
  1704. /*.enabledToggles=*/NULL _wgpu_COMMA \
  1705. /*.disabledToggleCount=*/0 _wgpu_COMMA \
  1706. /*.disabledToggles=*/NULL _wgpu_COMMA \
  1707. })
  1708. // Can be chained in WGPUInstanceDescriptor
  1709. typedef struct WGPUDawnWGSLBlocklist {
  1710. WGPUChainedStruct chain;
  1711. size_t blocklistedFeatureCount;
  1712. const char* const * blocklistedFeatures;
  1713. } WGPUDawnWGSLBlocklist WGPU_STRUCTURE_ATTRIBUTE;
  1714. #define WGPU_DAWN_WGSL_BLOCKLIST_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnWGSLBlocklist, { \
  1715. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1716. /*.next=*/NULL _wgpu_COMMA \
  1717. /*.sType=*/WGPUSType_DawnWGSLBlocklist _wgpu_COMMA \
  1718. }) _wgpu_COMMA \
  1719. /*.blocklistedFeatureCount=*/0 _wgpu_COMMA \
  1720. /*.blocklistedFeatures=*/NULL _wgpu_COMMA \
  1721. })
  1722. // Can be chained in WGPUInstanceDescriptor
  1723. typedef struct WGPUDawnWireWGSLControl {
  1724. WGPUChainedStruct chain;
  1725. WGPUBool enableExperimental;
  1726. WGPUBool enableUnsafe;
  1727. WGPUBool enableTesting;
  1728. } WGPUDawnWireWGSLControl WGPU_STRUCTURE_ATTRIBUTE;
  1729. #define WGPU_DAWN_WIRE_WGSL_CONTROL_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnWireWGSLControl, { \
  1730. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1731. /*.next=*/NULL _wgpu_COMMA \
  1732. /*.sType=*/WGPUSType_DawnWireWGSLControl _wgpu_COMMA \
  1733. }) _wgpu_COMMA \
  1734. /*.enableExperimental=*/WGPU_FALSE _wgpu_COMMA \
  1735. /*.enableUnsafe=*/WGPU_FALSE _wgpu_COMMA \
  1736. /*.enableTesting=*/WGPU_FALSE _wgpu_COMMA \
  1737. })
  1738. // Can be chained in WGPUSurfaceDescriptor
  1739. typedef struct WGPUEmscriptenSurfaceSourceCanvasHTMLSelector {
  1740. WGPUChainedStruct chain;
  1741. WGPUStringView selector;
  1742. } WGPUEmscriptenSurfaceSourceCanvasHTMLSelector WGPU_STRUCTURE_ATTRIBUTE;
  1743. #define WGPU_EMSCRIPTEN_SURFACE_SOURCE_CANVAS_HTML_SELECTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUEmscriptenSurfaceSourceCanvasHTMLSelector, { \
  1744. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1745. /*.next=*/NULL _wgpu_COMMA \
  1746. /*.sType=*/WGPUSType_EmscriptenSurfaceSourceCanvasHTMLSelector _wgpu_COMMA \
  1747. }) _wgpu_COMMA \
  1748. /*.selector=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  1749. })
  1750. typedef struct WGPUExtent2D {
  1751. uint32_t width;
  1752. uint32_t height;
  1753. } WGPUExtent2D WGPU_STRUCTURE_ATTRIBUTE;
  1754. #define WGPU_EXTENT_2D_INIT _wgpu_MAKE_INIT_STRUCT(WGPUExtent2D, { \
  1755. /*.width=*/0 _wgpu_COMMA \
  1756. /*.height=*/0 _wgpu_COMMA \
  1757. })
  1758. typedef struct WGPUExtent3D {
  1759. uint32_t width;
  1760. uint32_t height;
  1761. uint32_t depthOrArrayLayers;
  1762. } WGPUExtent3D WGPU_STRUCTURE_ATTRIBUTE;
  1763. #define WGPU_EXTENT_3D_INIT _wgpu_MAKE_INIT_STRUCT(WGPUExtent3D, { \
  1764. /*.width=*/0 _wgpu_COMMA \
  1765. /*.height=*/1 _wgpu_COMMA \
  1766. /*.depthOrArrayLayers=*/1 _wgpu_COMMA \
  1767. })
  1768. // Can be chained in WGPUBindGroupEntry
  1769. typedef struct WGPUExternalTextureBindingEntry {
  1770. WGPUChainedStruct chain;
  1771. WGPUExternalTexture externalTexture;
  1772. } WGPUExternalTextureBindingEntry WGPU_STRUCTURE_ATTRIBUTE;
  1773. #define WGPU_EXTERNAL_TEXTURE_BINDING_ENTRY_INIT _wgpu_MAKE_INIT_STRUCT(WGPUExternalTextureBindingEntry, { \
  1774. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1775. /*.next=*/NULL _wgpu_COMMA \
  1776. /*.sType=*/WGPUSType_ExternalTextureBindingEntry _wgpu_COMMA \
  1777. }) _wgpu_COMMA \
  1778. /*.externalTexture=*/NULL _wgpu_COMMA \
  1779. })
  1780. // Can be chained in WGPUBindGroupLayoutEntry
  1781. typedef struct WGPUExternalTextureBindingLayout {
  1782. WGPUChainedStruct chain;
  1783. } WGPUExternalTextureBindingLayout WGPU_STRUCTURE_ATTRIBUTE;
  1784. #define WGPU_EXTERNAL_TEXTURE_BINDING_LAYOUT_INIT _wgpu_MAKE_INIT_STRUCT(WGPUExternalTextureBindingLayout, { \
  1785. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1786. /*.next=*/NULL _wgpu_COMMA \
  1787. /*.sType=*/WGPUSType_ExternalTextureBindingLayout _wgpu_COMMA \
  1788. }) _wgpu_COMMA \
  1789. })
  1790. typedef struct WGPUFuture {
  1791. uint64_t id;
  1792. } WGPUFuture WGPU_STRUCTURE_ATTRIBUTE;
  1793. #define WGPU_FUTURE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUFuture, { \
  1794. /*.id=*/0 _wgpu_COMMA \
  1795. })
  1796. typedef struct WGPUInstanceLimits {
  1797. WGPUChainedStruct * nextInChain;
  1798. size_t timedWaitAnyMaxCount;
  1799. } WGPUInstanceLimits WGPU_STRUCTURE_ATTRIBUTE;
  1800. #define WGPU_INSTANCE_LIMITS_INIT _wgpu_MAKE_INIT_STRUCT(WGPUInstanceLimits, { \
  1801. /*.nextInChain=*/NULL _wgpu_COMMA \
  1802. /*.timedWaitAnyMaxCount=*/0 _wgpu_COMMA \
  1803. })
  1804. typedef struct WGPUINTERNAL_HAVE_EMDAWNWEBGPU_HEADER {
  1805. WGPUBool unused;
  1806. } WGPUINTERNAL_HAVE_EMDAWNWEBGPU_HEADER WGPU_STRUCTURE_ATTRIBUTE;
  1807. #define WGPU_INTERNAL_HAVE_EMDAWNWEBGPU_HEADER_INIT _wgpu_MAKE_INIT_STRUCT(WGPUINTERNAL_HAVE_EMDAWNWEBGPU_HEADER, { \
  1808. /*.unused=*/WGPU_FALSE _wgpu_COMMA \
  1809. })
  1810. typedef struct WGPUMemoryHeapInfo {
  1811. WGPUHeapProperty properties;
  1812. uint64_t size;
  1813. } WGPUMemoryHeapInfo WGPU_STRUCTURE_ATTRIBUTE;
  1814. #define WGPU_MEMORY_HEAP_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUMemoryHeapInfo, { \
  1815. /*.properties=*/WGPUHeapProperty_None _wgpu_COMMA \
  1816. /*.size=*/0 _wgpu_COMMA \
  1817. })
  1818. typedef struct WGPUMultisampleState {
  1819. WGPUChainedStruct * nextInChain;
  1820. uint32_t count;
  1821. uint32_t mask;
  1822. WGPUBool alphaToCoverageEnabled;
  1823. } WGPUMultisampleState WGPU_STRUCTURE_ATTRIBUTE;
  1824. #define WGPU_MULTISAMPLE_STATE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUMultisampleState, { \
  1825. /*.nextInChain=*/NULL _wgpu_COMMA \
  1826. /*.count=*/1 _wgpu_COMMA \
  1827. /*.mask=*/0xFFFFFFFF _wgpu_COMMA \
  1828. /*.alphaToCoverageEnabled=*/WGPU_FALSE _wgpu_COMMA \
  1829. })
  1830. typedef struct WGPUOrigin2D {
  1831. uint32_t x;
  1832. uint32_t y;
  1833. } WGPUOrigin2D WGPU_STRUCTURE_ATTRIBUTE;
  1834. #define WGPU_ORIGIN_2D_INIT _wgpu_MAKE_INIT_STRUCT(WGPUOrigin2D, { \
  1835. /*.x=*/0 _wgpu_COMMA \
  1836. /*.y=*/0 _wgpu_COMMA \
  1837. })
  1838. typedef struct WGPUOrigin3D {
  1839. uint32_t x;
  1840. uint32_t y;
  1841. uint32_t z;
  1842. } WGPUOrigin3D WGPU_STRUCTURE_ATTRIBUTE;
  1843. #define WGPU_ORIGIN_3D_INIT _wgpu_MAKE_INIT_STRUCT(WGPUOrigin3D, { \
  1844. /*.x=*/0 _wgpu_COMMA \
  1845. /*.y=*/0 _wgpu_COMMA \
  1846. /*.z=*/0 _wgpu_COMMA \
  1847. })
  1848. typedef struct WGPUPassTimestampWrites {
  1849. WGPUChainedStruct * nextInChain;
  1850. WGPUQuerySet querySet;
  1851. uint32_t beginningOfPassWriteIndex;
  1852. uint32_t endOfPassWriteIndex;
  1853. } WGPUPassTimestampWrites WGPU_STRUCTURE_ATTRIBUTE;
  1854. #define WGPU_PASS_TIMESTAMP_WRITES_INIT _wgpu_MAKE_INIT_STRUCT(WGPUPassTimestampWrites, { \
  1855. /*.nextInChain=*/NULL _wgpu_COMMA \
  1856. /*.querySet=*/NULL _wgpu_COMMA \
  1857. /*.beginningOfPassWriteIndex=*/WGPU_QUERY_SET_INDEX_UNDEFINED _wgpu_COMMA \
  1858. /*.endOfPassWriteIndex=*/WGPU_QUERY_SET_INDEX_UNDEFINED _wgpu_COMMA \
  1859. })
  1860. // Can be chained in WGPUPipelineLayoutDescriptor
  1861. typedef struct WGPUPipelineLayoutResourceTable {
  1862. WGPUChainedStruct chain;
  1863. WGPUBool usesResourceTable;
  1864. } WGPUPipelineLayoutResourceTable WGPU_STRUCTURE_ATTRIBUTE;
  1865. #define WGPU_PIPELINE_LAYOUT_RESOURCE_TABLE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUPipelineLayoutResourceTable, { \
  1866. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1867. /*.next=*/NULL _wgpu_COMMA \
  1868. /*.sType=*/WGPUSType_PipelineLayoutResourceTable _wgpu_COMMA \
  1869. }) _wgpu_COMMA \
  1870. /*.usesResourceTable=*/WGPU_FALSE _wgpu_COMMA \
  1871. })
  1872. typedef struct WGPUPipelineLayoutStorageAttachment {
  1873. WGPUChainedStruct * nextInChain;
  1874. uint64_t offset;
  1875. WGPUTextureFormat format;
  1876. } WGPUPipelineLayoutStorageAttachment WGPU_STRUCTURE_ATTRIBUTE;
  1877. #define WGPU_PIPELINE_LAYOUT_STORAGE_ATTACHMENT_INIT _wgpu_MAKE_INIT_STRUCT(WGPUPipelineLayoutStorageAttachment, { \
  1878. /*.nextInChain=*/NULL _wgpu_COMMA \
  1879. /*.offset=*/0 _wgpu_COMMA \
  1880. /*.format=*/WGPUTextureFormat_Undefined _wgpu_COMMA \
  1881. })
  1882. typedef struct WGPUPrimitiveState {
  1883. WGPUChainedStruct * nextInChain;
  1884. WGPUPrimitiveTopology topology;
  1885. WGPUIndexFormat stripIndexFormat;
  1886. WGPUFrontFace frontFace;
  1887. WGPUCullMode cullMode;
  1888. WGPUBool unclippedDepth;
  1889. } WGPUPrimitiveState WGPU_STRUCTURE_ATTRIBUTE;
  1890. #define WGPU_PRIMITIVE_STATE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUPrimitiveState, { \
  1891. /*.nextInChain=*/NULL _wgpu_COMMA \
  1892. /*.topology=*/WGPUPrimitiveTopology_Undefined _wgpu_COMMA \
  1893. /*.stripIndexFormat=*/WGPUIndexFormat_Undefined _wgpu_COMMA \
  1894. /*.frontFace=*/WGPUFrontFace_Undefined _wgpu_COMMA \
  1895. /*.cullMode=*/WGPUCullMode_Undefined _wgpu_COMMA \
  1896. /*.unclippedDepth=*/WGPU_FALSE _wgpu_COMMA \
  1897. })
  1898. typedef struct WGPUQuerySetDescriptor {
  1899. WGPUChainedStruct * nextInChain;
  1900. WGPUStringView label;
  1901. WGPUQueryType type;
  1902. uint32_t count;
  1903. } WGPUQuerySetDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  1904. #define WGPU_QUERY_SET_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUQuerySetDescriptor, { \
  1905. /*.nextInChain=*/NULL _wgpu_COMMA \
  1906. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  1907. /*.type=*/_wgpu_ENUM_ZERO_INIT(WGPUQueryType) _wgpu_COMMA \
  1908. /*.count=*/0 _wgpu_COMMA \
  1909. })
  1910. typedef struct WGPUQueueDescriptor {
  1911. WGPUChainedStruct * nextInChain;
  1912. WGPUStringView label;
  1913. } WGPUQueueDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  1914. #define WGPU_QUEUE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUQueueDescriptor, { \
  1915. /*.nextInChain=*/NULL _wgpu_COMMA \
  1916. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  1917. })
  1918. typedef struct WGPURenderBundleDescriptor {
  1919. WGPUChainedStruct * nextInChain;
  1920. WGPUStringView label;
  1921. } WGPURenderBundleDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  1922. #define WGPU_RENDER_BUNDLE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPURenderBundleDescriptor, { \
  1923. /*.nextInChain=*/NULL _wgpu_COMMA \
  1924. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  1925. })
  1926. typedef struct WGPURenderBundleEncoderDescriptor {
  1927. WGPUChainedStruct * nextInChain;
  1928. WGPUStringView label;
  1929. size_t colorFormatCount;
  1930. WGPUTextureFormat const * colorFormats;
  1931. WGPUTextureFormat depthStencilFormat;
  1932. uint32_t sampleCount;
  1933. WGPUBool depthReadOnly;
  1934. WGPUBool stencilReadOnly;
  1935. } WGPURenderBundleEncoderDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  1936. #define WGPU_RENDER_BUNDLE_ENCODER_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPURenderBundleEncoderDescriptor, { \
  1937. /*.nextInChain=*/NULL _wgpu_COMMA \
  1938. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  1939. /*.colorFormatCount=*/0 _wgpu_COMMA \
  1940. /*.colorFormats=*/NULL _wgpu_COMMA \
  1941. /*.depthStencilFormat=*/WGPUTextureFormat_Undefined _wgpu_COMMA \
  1942. /*.sampleCount=*/1 _wgpu_COMMA \
  1943. /*.depthReadOnly=*/WGPU_FALSE _wgpu_COMMA \
  1944. /*.stencilReadOnly=*/WGPU_FALSE _wgpu_COMMA \
  1945. })
  1946. typedef struct WGPURenderPassDepthStencilAttachment {
  1947. WGPUChainedStruct * nextInChain;
  1948. WGPUTextureView view;
  1949. WGPULoadOp depthLoadOp;
  1950. WGPUStoreOp depthStoreOp;
  1951. float depthClearValue;
  1952. WGPUBool depthReadOnly;
  1953. WGPULoadOp stencilLoadOp;
  1954. WGPUStoreOp stencilStoreOp;
  1955. uint32_t stencilClearValue;
  1956. WGPUBool stencilReadOnly;
  1957. } WGPURenderPassDepthStencilAttachment WGPU_STRUCTURE_ATTRIBUTE;
  1958. #define WGPU_RENDER_PASS_DEPTH_STENCIL_ATTACHMENT_INIT _wgpu_MAKE_INIT_STRUCT(WGPURenderPassDepthStencilAttachment, { \
  1959. /*.nextInChain=*/NULL _wgpu_COMMA \
  1960. /*.view=*/NULL _wgpu_COMMA \
  1961. /*.depthLoadOp=*/WGPULoadOp_Undefined _wgpu_COMMA \
  1962. /*.depthStoreOp=*/WGPUStoreOp_Undefined _wgpu_COMMA \
  1963. /*.depthClearValue=*/WGPU_DEPTH_CLEAR_VALUE_UNDEFINED _wgpu_COMMA \
  1964. /*.depthReadOnly=*/WGPU_FALSE _wgpu_COMMA \
  1965. /*.stencilLoadOp=*/WGPULoadOp_Undefined _wgpu_COMMA \
  1966. /*.stencilStoreOp=*/WGPUStoreOp_Undefined _wgpu_COMMA \
  1967. /*.stencilClearValue=*/0 _wgpu_COMMA \
  1968. /*.stencilReadOnly=*/WGPU_FALSE _wgpu_COMMA \
  1969. })
  1970. // Can be chained in WGPURenderPassDescriptor
  1971. typedef struct WGPURenderPassDescriptorExpandResolveRect {
  1972. WGPUChainedStruct chain;
  1973. uint32_t x;
  1974. uint32_t y;
  1975. uint32_t width;
  1976. uint32_t height;
  1977. } WGPURenderPassDescriptorExpandResolveRect WGPU_STRUCTURE_ATTRIBUTE;
  1978. #define WGPU_RENDER_PASS_DESCRIPTOR_EXPAND_RESOLVE_RECT_INIT _wgpu_MAKE_INIT_STRUCT(WGPURenderPassDescriptorExpandResolveRect, { \
  1979. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  1980. /*.next=*/NULL _wgpu_COMMA \
  1981. /*.sType=*/WGPUSType_RenderPassDescriptorExpandResolveRect _wgpu_COMMA \
  1982. }) _wgpu_COMMA \
  1983. /*.x=*/0 _wgpu_COMMA \
  1984. /*.y=*/0 _wgpu_COMMA \
  1985. /*.width=*/0 _wgpu_COMMA \
  1986. /*.height=*/0 _wgpu_COMMA \
  1987. })
  1988. // Can be chained in WGPURenderPassDescriptor
  1989. typedef struct WGPURenderPassDescriptorResolveRect {
  1990. WGPUChainedStruct chain;
  1991. uint32_t colorOffsetX;
  1992. uint32_t colorOffsetY;
  1993. uint32_t resolveOffsetX;
  1994. uint32_t resolveOffsetY;
  1995. uint32_t width;
  1996. uint32_t height;
  1997. } WGPURenderPassDescriptorResolveRect WGPU_STRUCTURE_ATTRIBUTE;
  1998. #define WGPU_RENDER_PASS_DESCRIPTOR_RESOLVE_RECT_INIT _wgpu_MAKE_INIT_STRUCT(WGPURenderPassDescriptorResolveRect, { \
  1999. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2000. /*.next=*/NULL _wgpu_COMMA \
  2001. /*.sType=*/WGPUSType_RenderPassDescriptorResolveRect _wgpu_COMMA \
  2002. }) _wgpu_COMMA \
  2003. /*.colorOffsetX=*/0 _wgpu_COMMA \
  2004. /*.colorOffsetY=*/0 _wgpu_COMMA \
  2005. /*.resolveOffsetX=*/0 _wgpu_COMMA \
  2006. /*.resolveOffsetY=*/0 _wgpu_COMMA \
  2007. /*.width=*/0 _wgpu_COMMA \
  2008. /*.height=*/0 _wgpu_COMMA \
  2009. })
  2010. // Can be chained in WGPURenderPassDescriptor
  2011. typedef struct WGPURenderPassMaxDrawCount {
  2012. WGPUChainedStruct chain;
  2013. uint64_t maxDrawCount;
  2014. } WGPURenderPassMaxDrawCount WGPU_STRUCTURE_ATTRIBUTE;
  2015. #define WGPU_RENDER_PASS_MAX_DRAW_COUNT_INIT _wgpu_MAKE_INIT_STRUCT(WGPURenderPassMaxDrawCount, { \
  2016. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2017. /*.next=*/NULL _wgpu_COMMA \
  2018. /*.sType=*/WGPUSType_RenderPassMaxDrawCount _wgpu_COMMA \
  2019. }) _wgpu_COMMA \
  2020. /*.maxDrawCount=*/50000000 _wgpu_COMMA \
  2021. })
  2022. // Can be chained in WGPURequestAdapterOptions
  2023. typedef struct WGPURequestAdapterWebGPUBackendOptions {
  2024. WGPUChainedStruct chain;
  2025. } WGPURequestAdapterWebGPUBackendOptions WGPU_STRUCTURE_ATTRIBUTE;
  2026. #define WGPU_REQUEST_ADAPTER_WEBGPU_BACKEND_OPTIONS_INIT _wgpu_MAKE_INIT_STRUCT(WGPURequestAdapterWebGPUBackendOptions, { \
  2027. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2028. /*.next=*/NULL _wgpu_COMMA \
  2029. /*.sType=*/WGPUSType_RequestAdapterWebGPUBackendOptions _wgpu_COMMA \
  2030. }) _wgpu_COMMA \
  2031. })
  2032. // Can be chained in WGPURequestAdapterOptions
  2033. typedef struct WGPURequestAdapterWebXROptions {
  2034. WGPUChainedStruct chain;
  2035. WGPUBool xrCompatible;
  2036. } WGPURequestAdapterWebXROptions WGPU_STRUCTURE_ATTRIBUTE;
  2037. #define WGPU_REQUEST_ADAPTER_WEBXR_OPTIONS_INIT _wgpu_MAKE_INIT_STRUCT(WGPURequestAdapterWebXROptions, { \
  2038. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2039. /*.next=*/NULL _wgpu_COMMA \
  2040. /*.sType=*/WGPUSType_RequestAdapterWebXROptions _wgpu_COMMA \
  2041. }) _wgpu_COMMA \
  2042. /*.xrCompatible=*/WGPU_FALSE _wgpu_COMMA \
  2043. })
  2044. typedef struct WGPUResourceTableDescriptor {
  2045. WGPUChainedStruct * nextInChain;
  2046. WGPUStringView label;
  2047. uint32_t size;
  2048. } WGPUResourceTableDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2049. #define WGPU_RESOURCE_TABLE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUResourceTableDescriptor, { \
  2050. /*.nextInChain=*/NULL _wgpu_COMMA \
  2051. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  2052. /*.size=*/0 _wgpu_COMMA \
  2053. })
  2054. // Can be chained in WGPULimits
  2055. typedef struct WGPUResourceTableLimits {
  2056. WGPUChainedStruct chain;
  2057. uint32_t maxResourceTableSize;
  2058. } WGPUResourceTableLimits WGPU_STRUCTURE_ATTRIBUTE;
  2059. #define WGPU_RESOURCE_TABLE_LIMITS_INIT _wgpu_MAKE_INIT_STRUCT(WGPUResourceTableLimits, { \
  2060. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2061. /*.next=*/NULL _wgpu_COMMA \
  2062. /*.sType=*/WGPUSType_ResourceTableLimits _wgpu_COMMA \
  2063. }) _wgpu_COMMA \
  2064. /*.maxResourceTableSize=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  2065. })
  2066. typedef struct WGPUSamplerBindingLayout {
  2067. WGPUChainedStruct * nextInChain;
  2068. WGPUSamplerBindingType type;
  2069. } WGPUSamplerBindingLayout WGPU_STRUCTURE_ATTRIBUTE;
  2070. #define WGPU_SAMPLER_BINDING_LAYOUT_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSamplerBindingLayout, { \
  2071. /*.nextInChain=*/NULL _wgpu_COMMA \
  2072. /*.type=*/WGPUSamplerBindingType_Undefined _wgpu_COMMA \
  2073. })
  2074. // Can be chained in WGPUShaderModuleDescriptor
  2075. typedef struct WGPUShaderModuleCompilationOptions {
  2076. WGPUChainedStruct chain;
  2077. WGPUBool strictMath;
  2078. } WGPUShaderModuleCompilationOptions WGPU_STRUCTURE_ATTRIBUTE;
  2079. #define WGPU_SHADER_MODULE_COMPILATION_OPTIONS_INIT _wgpu_MAKE_INIT_STRUCT(WGPUShaderModuleCompilationOptions, { \
  2080. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2081. /*.next=*/NULL _wgpu_COMMA \
  2082. /*.sType=*/WGPUSType_ShaderModuleCompilationOptions _wgpu_COMMA \
  2083. }) _wgpu_COMMA \
  2084. /*.strictMath=*/WGPU_FALSE _wgpu_COMMA \
  2085. })
  2086. // Can be chained in WGPUShaderModuleDescriptor
  2087. typedef struct WGPUShaderSourceSPIRV {
  2088. WGPUChainedStruct chain;
  2089. uint32_t codeSize;
  2090. uint32_t const * code;
  2091. } WGPUShaderSourceSPIRV WGPU_STRUCTURE_ATTRIBUTE;
  2092. #define WGPU_SHADER_SOURCE_SPIRV_INIT _wgpu_MAKE_INIT_STRUCT(WGPUShaderSourceSPIRV, { \
  2093. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2094. /*.next=*/NULL _wgpu_COMMA \
  2095. /*.sType=*/WGPUSType_ShaderSourceSPIRV _wgpu_COMMA \
  2096. }) _wgpu_COMMA \
  2097. /*.codeSize=*/0 _wgpu_COMMA \
  2098. /*.code=*/NULL _wgpu_COMMA \
  2099. })
  2100. // Can be chained in WGPUShaderModuleDescriptor
  2101. typedef struct WGPUShaderSourceWGSL {
  2102. WGPUChainedStruct chain;
  2103. WGPUStringView code;
  2104. } WGPUShaderSourceWGSL WGPU_STRUCTURE_ATTRIBUTE;
  2105. #define WGPU_SHADER_SOURCE_WGSL_INIT _wgpu_MAKE_INIT_STRUCT(WGPUShaderSourceWGSL, { \
  2106. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2107. /*.next=*/NULL _wgpu_COMMA \
  2108. /*.sType=*/WGPUSType_ShaderSourceWGSL _wgpu_COMMA \
  2109. }) _wgpu_COMMA \
  2110. /*.code=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  2111. })
  2112. typedef struct WGPUSharedBufferMemoryBeginAccessDescriptor {
  2113. WGPUChainedStruct * nextInChain;
  2114. WGPUBool initialized;
  2115. size_t fenceCount;
  2116. WGPUSharedFence const * fences;
  2117. uint64_t const * signaledValues;
  2118. } WGPUSharedBufferMemoryBeginAccessDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2119. #define WGPU_SHARED_BUFFER_MEMORY_BEGIN_ACCESS_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedBufferMemoryBeginAccessDescriptor, { \
  2120. /*.nextInChain=*/NULL _wgpu_COMMA \
  2121. /*.initialized=*/WGPU_FALSE _wgpu_COMMA \
  2122. /*.fenceCount=*/0 _wgpu_COMMA \
  2123. /*.fences=*/NULL _wgpu_COMMA \
  2124. /*.signaledValues=*/NULL _wgpu_COMMA \
  2125. })
  2126. typedef struct WGPUSharedBufferMemoryDescriptor {
  2127. WGPUChainedStruct * nextInChain;
  2128. WGPUStringView label;
  2129. } WGPUSharedBufferMemoryDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2130. #define WGPU_SHARED_BUFFER_MEMORY_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedBufferMemoryDescriptor, { \
  2131. /*.nextInChain=*/NULL _wgpu_COMMA \
  2132. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  2133. })
  2134. typedef struct WGPUSharedBufferMemoryEndAccessState {
  2135. WGPUChainedStruct * nextInChain;
  2136. WGPUBool initialized;
  2137. size_t fenceCount;
  2138. WGPUSharedFence const * fences;
  2139. uint64_t const * signaledValues;
  2140. } WGPUSharedBufferMemoryEndAccessState WGPU_STRUCTURE_ATTRIBUTE;
  2141. #define WGPU_SHARED_BUFFER_MEMORY_END_ACCESS_STATE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedBufferMemoryEndAccessState, { \
  2142. /*.nextInChain=*/NULL _wgpu_COMMA \
  2143. /*.initialized=*/WGPU_FALSE _wgpu_COMMA \
  2144. /*.fenceCount=*/0 _wgpu_COMMA \
  2145. /*.fences=*/NULL _wgpu_COMMA \
  2146. /*.signaledValues=*/NULL _wgpu_COMMA \
  2147. })
  2148. typedef struct WGPUSharedBufferMemoryProperties {
  2149. WGPUChainedStruct * nextInChain;
  2150. WGPUBufferUsage usage;
  2151. uint64_t size;
  2152. } WGPUSharedBufferMemoryProperties WGPU_STRUCTURE_ATTRIBUTE;
  2153. #define WGPU_SHARED_BUFFER_MEMORY_PROPERTIES_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedBufferMemoryProperties, { \
  2154. /*.nextInChain=*/NULL _wgpu_COMMA \
  2155. /*.usage=*/WGPUBufferUsage_None _wgpu_COMMA \
  2156. /*.size=*/0 _wgpu_COMMA \
  2157. })
  2158. // Can be chained in WGPUSharedFenceDescriptor
  2159. typedef struct WGPUSharedFenceDXGISharedHandleDescriptor {
  2160. WGPUChainedStruct chain;
  2161. void * handle;
  2162. } WGPUSharedFenceDXGISharedHandleDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2163. #define WGPU_SHARED_FENCE_DXGI_SHARED_HANDLE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedFenceDXGISharedHandleDescriptor, { \
  2164. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2165. /*.next=*/NULL _wgpu_COMMA \
  2166. /*.sType=*/WGPUSType_SharedFenceDXGISharedHandleDescriptor _wgpu_COMMA \
  2167. }) _wgpu_COMMA \
  2168. /*.handle=*/NULL _wgpu_COMMA \
  2169. })
  2170. // Can be chained in WGPUSharedFenceExportInfo
  2171. typedef struct WGPUSharedFenceDXGISharedHandleExportInfo {
  2172. WGPUChainedStruct chain;
  2173. void * handle;
  2174. } WGPUSharedFenceDXGISharedHandleExportInfo WGPU_STRUCTURE_ATTRIBUTE;
  2175. #define WGPU_SHARED_FENCE_DXGI_SHARED_HANDLE_EXPORT_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedFenceDXGISharedHandleExportInfo, { \
  2176. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2177. /*.next=*/NULL _wgpu_COMMA \
  2178. /*.sType=*/WGPUSType_SharedFenceDXGISharedHandleExportInfo _wgpu_COMMA \
  2179. }) _wgpu_COMMA \
  2180. /*.handle=*/NULL _wgpu_COMMA \
  2181. })
  2182. // Can be chained in WGPUSharedFenceDescriptor
  2183. typedef struct WGPUSharedFenceEGLSyncDescriptor {
  2184. WGPUChainedStruct chain;
  2185. void * sync;
  2186. } WGPUSharedFenceEGLSyncDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2187. #define WGPU_SHARED_FENCE_EGL_SYNC_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedFenceEGLSyncDescriptor, { \
  2188. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2189. /*.next=*/NULL _wgpu_COMMA \
  2190. /*.sType=*/WGPUSType_SharedFenceEGLSyncDescriptor _wgpu_COMMA \
  2191. }) _wgpu_COMMA \
  2192. /*.sync=*/NULL _wgpu_COMMA \
  2193. })
  2194. // Can be chained in WGPUSharedFenceExportInfo
  2195. typedef struct WGPUSharedFenceEGLSyncExportInfo {
  2196. WGPUChainedStruct chain;
  2197. void * sync;
  2198. } WGPUSharedFenceEGLSyncExportInfo WGPU_STRUCTURE_ATTRIBUTE;
  2199. #define WGPU_SHARED_FENCE_EGL_SYNC_EXPORT_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedFenceEGLSyncExportInfo, { \
  2200. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2201. /*.next=*/NULL _wgpu_COMMA \
  2202. /*.sType=*/WGPUSType_SharedFenceEGLSyncExportInfo _wgpu_COMMA \
  2203. }) _wgpu_COMMA \
  2204. /*.sync=*/NULL _wgpu_COMMA \
  2205. })
  2206. // Can be chained in WGPUSharedFenceDescriptor
  2207. typedef struct WGPUSharedFenceMTLSharedEventDescriptor {
  2208. WGPUChainedStruct chain;
  2209. void * sharedEvent;
  2210. } WGPUSharedFenceMTLSharedEventDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2211. #define WGPU_SHARED_FENCE_MTL_SHARED_EVENT_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedFenceMTLSharedEventDescriptor, { \
  2212. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2213. /*.next=*/NULL _wgpu_COMMA \
  2214. /*.sType=*/WGPUSType_SharedFenceMTLSharedEventDescriptor _wgpu_COMMA \
  2215. }) _wgpu_COMMA \
  2216. /*.sharedEvent=*/NULL _wgpu_COMMA \
  2217. })
  2218. // Can be chained in WGPUSharedFenceExportInfo
  2219. typedef struct WGPUSharedFenceMTLSharedEventExportInfo {
  2220. WGPUChainedStruct chain;
  2221. void * sharedEvent;
  2222. } WGPUSharedFenceMTLSharedEventExportInfo WGPU_STRUCTURE_ATTRIBUTE;
  2223. #define WGPU_SHARED_FENCE_MTL_SHARED_EVENT_EXPORT_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedFenceMTLSharedEventExportInfo, { \
  2224. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2225. /*.next=*/NULL _wgpu_COMMA \
  2226. /*.sType=*/WGPUSType_SharedFenceMTLSharedEventExportInfo _wgpu_COMMA \
  2227. }) _wgpu_COMMA \
  2228. /*.sharedEvent=*/NULL _wgpu_COMMA \
  2229. })
  2230. // Can be chained in WGPUSharedFenceDescriptor
  2231. typedef struct WGPUSharedFenceSyncFDDescriptor {
  2232. WGPUChainedStruct chain;
  2233. int handle;
  2234. } WGPUSharedFenceSyncFDDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2235. #define WGPU_SHARED_FENCE_SYNC_FD_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedFenceSyncFDDescriptor, { \
  2236. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2237. /*.next=*/NULL _wgpu_COMMA \
  2238. /*.sType=*/WGPUSType_SharedFenceSyncFDDescriptor _wgpu_COMMA \
  2239. }) _wgpu_COMMA \
  2240. /*.handle=*/0 _wgpu_COMMA \
  2241. })
  2242. // Can be chained in WGPUSharedFenceExportInfo
  2243. typedef struct WGPUSharedFenceSyncFDExportInfo {
  2244. WGPUChainedStruct chain;
  2245. int handle;
  2246. } WGPUSharedFenceSyncFDExportInfo WGPU_STRUCTURE_ATTRIBUTE;
  2247. #define WGPU_SHARED_FENCE_SYNC_FD_EXPORT_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedFenceSyncFDExportInfo, { \
  2248. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2249. /*.next=*/NULL _wgpu_COMMA \
  2250. /*.sType=*/WGPUSType_SharedFenceSyncFDExportInfo _wgpu_COMMA \
  2251. }) _wgpu_COMMA \
  2252. /*.handle=*/0 _wgpu_COMMA \
  2253. })
  2254. // Can be chained in WGPUSharedFenceDescriptor
  2255. typedef struct WGPUSharedFenceVkSemaphoreOpaqueFDDescriptor {
  2256. WGPUChainedStruct chain;
  2257. int handle;
  2258. } WGPUSharedFenceVkSemaphoreOpaqueFDDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2259. #define WGPU_SHARED_FENCE_VK_SEMAPHORE_OPAQUE_FD_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedFenceVkSemaphoreOpaqueFDDescriptor, { \
  2260. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2261. /*.next=*/NULL _wgpu_COMMA \
  2262. /*.sType=*/WGPUSType_SharedFenceVkSemaphoreOpaqueFDDescriptor _wgpu_COMMA \
  2263. }) _wgpu_COMMA \
  2264. /*.handle=*/0 _wgpu_COMMA \
  2265. })
  2266. // Can be chained in WGPUSharedFenceExportInfo
  2267. typedef struct WGPUSharedFenceVkSemaphoreOpaqueFDExportInfo {
  2268. WGPUChainedStruct chain;
  2269. int handle;
  2270. } WGPUSharedFenceVkSemaphoreOpaqueFDExportInfo WGPU_STRUCTURE_ATTRIBUTE;
  2271. #define WGPU_SHARED_FENCE_VK_SEMAPHORE_OPAQUE_FD_EXPORT_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedFenceVkSemaphoreOpaqueFDExportInfo, { \
  2272. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2273. /*.next=*/NULL _wgpu_COMMA \
  2274. /*.sType=*/WGPUSType_SharedFenceVkSemaphoreOpaqueFDExportInfo _wgpu_COMMA \
  2275. }) _wgpu_COMMA \
  2276. /*.handle=*/0 _wgpu_COMMA \
  2277. })
  2278. // Can be chained in WGPUSharedFenceDescriptor
  2279. typedef struct WGPUSharedFenceVkSemaphoreZirconHandleDescriptor {
  2280. WGPUChainedStruct chain;
  2281. uint32_t handle;
  2282. } WGPUSharedFenceVkSemaphoreZirconHandleDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2283. #define WGPU_SHARED_FENCE_VK_SEMAPHORE_ZIRCON_HANDLE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedFenceVkSemaphoreZirconHandleDescriptor, { \
  2284. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2285. /*.next=*/NULL _wgpu_COMMA \
  2286. /*.sType=*/WGPUSType_SharedFenceVkSemaphoreZirconHandleDescriptor _wgpu_COMMA \
  2287. }) _wgpu_COMMA \
  2288. /*.handle=*/0 _wgpu_COMMA \
  2289. })
  2290. // Can be chained in WGPUSharedFenceExportInfo
  2291. typedef struct WGPUSharedFenceVkSemaphoreZirconHandleExportInfo {
  2292. WGPUChainedStruct chain;
  2293. uint32_t handle;
  2294. } WGPUSharedFenceVkSemaphoreZirconHandleExportInfo WGPU_STRUCTURE_ATTRIBUTE;
  2295. #define WGPU_SHARED_FENCE_VK_SEMAPHORE_ZIRCON_HANDLE_EXPORT_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedFenceVkSemaphoreZirconHandleExportInfo, { \
  2296. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2297. /*.next=*/NULL _wgpu_COMMA \
  2298. /*.sType=*/WGPUSType_SharedFenceVkSemaphoreZirconHandleExportInfo _wgpu_COMMA \
  2299. }) _wgpu_COMMA \
  2300. /*.handle=*/0 _wgpu_COMMA \
  2301. })
  2302. // Can be chained in WGPUSharedTextureMemoryDescriptor
  2303. typedef struct WGPUSharedTextureMemoryAHardwareBufferDescriptor {
  2304. WGPUChainedStruct chain;
  2305. void * handle;
  2306. WGPUBool useExternalFormat;
  2307. } WGPUSharedTextureMemoryAHardwareBufferDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2308. #define WGPU_SHARED_TEXTURE_MEMORY_A_HARDWARE_BUFFER_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryAHardwareBufferDescriptor, { \
  2309. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2310. /*.next=*/NULL _wgpu_COMMA \
  2311. /*.sType=*/WGPUSType_SharedTextureMemoryAHardwareBufferDescriptor _wgpu_COMMA \
  2312. }) _wgpu_COMMA \
  2313. /*.handle=*/NULL _wgpu_COMMA \
  2314. /*.useExternalFormat=*/WGPU_FALSE _wgpu_COMMA \
  2315. })
  2316. // Can be chained in WGPUSharedTextureMemoryBeginAccessDescriptor
  2317. typedef struct WGPUSharedTextureMemoryD3D11BeginState {
  2318. WGPUChainedStruct chain;
  2319. WGPUBool requiresEndAccessFence;
  2320. } WGPUSharedTextureMemoryD3D11BeginState WGPU_STRUCTURE_ATTRIBUTE;
  2321. #define WGPU_SHARED_TEXTURE_MEMORY_D3D11_BEGIN_STATE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryD3D11BeginState, { \
  2322. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2323. /*.next=*/NULL _wgpu_COMMA \
  2324. /*.sType=*/WGPUSType_SharedTextureMemoryD3D11BeginState _wgpu_COMMA \
  2325. }) _wgpu_COMMA \
  2326. /*.requiresEndAccessFence=*/WGPU_TRUE _wgpu_COMMA \
  2327. })
  2328. // Can be chained in WGPUSharedTextureMemoryBeginAccessDescriptor
  2329. typedef struct WGPUSharedTextureMemoryD3DSwapchainBeginState {
  2330. WGPUChainedStruct chain;
  2331. WGPUBool isSwapchain;
  2332. } WGPUSharedTextureMemoryD3DSwapchainBeginState WGPU_STRUCTURE_ATTRIBUTE;
  2333. #define WGPU_SHARED_TEXTURE_MEMORY_D3D_SWAPCHAIN_BEGIN_STATE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryD3DSwapchainBeginState, { \
  2334. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2335. /*.next=*/NULL _wgpu_COMMA \
  2336. /*.sType=*/WGPUSType_SharedTextureMemoryD3DSwapchainBeginState _wgpu_COMMA \
  2337. }) _wgpu_COMMA \
  2338. /*.isSwapchain=*/WGPU_FALSE _wgpu_COMMA \
  2339. })
  2340. typedef struct WGPUSharedTextureMemoryDmaBufPlane {
  2341. int fd;
  2342. uint64_t offset;
  2343. uint32_t stride;
  2344. } WGPUSharedTextureMemoryDmaBufPlane WGPU_STRUCTURE_ATTRIBUTE;
  2345. #define WGPU_SHARED_TEXTURE_MEMORY_DMA_BUF_PLANE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryDmaBufPlane, { \
  2346. /*.fd=*/0 _wgpu_COMMA \
  2347. /*.offset=*/0 _wgpu_COMMA \
  2348. /*.stride=*/0 _wgpu_COMMA \
  2349. })
  2350. // Can be chained in WGPUSharedTextureMemoryDescriptor
  2351. typedef struct WGPUSharedTextureMemoryDXGISharedHandleDescriptor {
  2352. WGPUChainedStruct chain;
  2353. void * handle;
  2354. WGPUBool useKeyedMutex;
  2355. } WGPUSharedTextureMemoryDXGISharedHandleDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2356. #define WGPU_SHARED_TEXTURE_MEMORY_DXGI_SHARED_HANDLE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryDXGISharedHandleDescriptor, { \
  2357. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2358. /*.next=*/NULL _wgpu_COMMA \
  2359. /*.sType=*/WGPUSType_SharedTextureMemoryDXGISharedHandleDescriptor _wgpu_COMMA \
  2360. }) _wgpu_COMMA \
  2361. /*.handle=*/NULL _wgpu_COMMA \
  2362. /*.useKeyedMutex=*/WGPU_FALSE _wgpu_COMMA \
  2363. })
  2364. // Can be chained in WGPUSharedTextureMemoryDescriptor
  2365. typedef struct WGPUSharedTextureMemoryEGLImageDescriptor {
  2366. WGPUChainedStruct chain;
  2367. void * image;
  2368. } WGPUSharedTextureMemoryEGLImageDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2369. #define WGPU_SHARED_TEXTURE_MEMORY_EGL_IMAGE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryEGLImageDescriptor, { \
  2370. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2371. /*.next=*/NULL _wgpu_COMMA \
  2372. /*.sType=*/WGPUSType_SharedTextureMemoryEGLImageDescriptor _wgpu_COMMA \
  2373. }) _wgpu_COMMA \
  2374. /*.image=*/NULL _wgpu_COMMA \
  2375. })
  2376. // Can be chained in WGPUSharedTextureMemoryDescriptor
  2377. typedef struct WGPUSharedTextureMemoryIOSurfaceDescriptor {
  2378. WGPUChainedStruct chain;
  2379. void * ioSurface;
  2380. WGPUBool allowStorageBinding;
  2381. } WGPUSharedTextureMemoryIOSurfaceDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2382. #define WGPU_SHARED_TEXTURE_MEMORY_IO_SURFACE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryIOSurfaceDescriptor, { \
  2383. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2384. /*.next=*/NULL _wgpu_COMMA \
  2385. /*.sType=*/WGPUSType_SharedTextureMemoryIOSurfaceDescriptor _wgpu_COMMA \
  2386. }) _wgpu_COMMA \
  2387. /*.ioSurface=*/NULL _wgpu_COMMA \
  2388. /*.allowStorageBinding=*/WGPU_TRUE _wgpu_COMMA \
  2389. })
  2390. // Can be chained in WGPUSharedTextureMemoryDescriptor
  2391. typedef struct WGPUSharedTextureMemoryOpaqueFDDescriptor {
  2392. WGPUChainedStruct chain;
  2393. void const * vkImageCreateInfo;
  2394. int memoryFD;
  2395. uint32_t memoryTypeIndex;
  2396. uint64_t allocationSize;
  2397. WGPUBool dedicatedAllocation;
  2398. } WGPUSharedTextureMemoryOpaqueFDDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2399. #define WGPU_SHARED_TEXTURE_MEMORY_OPAQUE_FD_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryOpaqueFDDescriptor, { \
  2400. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2401. /*.next=*/NULL _wgpu_COMMA \
  2402. /*.sType=*/WGPUSType_SharedTextureMemoryOpaqueFDDescriptor _wgpu_COMMA \
  2403. }) _wgpu_COMMA \
  2404. /*.vkImageCreateInfo=*/NULL _wgpu_COMMA \
  2405. /*.memoryFD=*/0 _wgpu_COMMA \
  2406. /*.memoryTypeIndex=*/0 _wgpu_COMMA \
  2407. /*.allocationSize=*/0 _wgpu_COMMA \
  2408. /*.dedicatedAllocation=*/WGPU_FALSE _wgpu_COMMA \
  2409. })
  2410. // Can be chained in WGPUSharedTextureMemoryDescriptor
  2411. typedef struct WGPUSharedTextureMemoryVkDedicatedAllocationDescriptor {
  2412. WGPUChainedStruct chain;
  2413. WGPUBool dedicatedAllocation;
  2414. } WGPUSharedTextureMemoryVkDedicatedAllocationDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2415. #define WGPU_SHARED_TEXTURE_MEMORY_VK_DEDICATED_ALLOCATION_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryVkDedicatedAllocationDescriptor, { \
  2416. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2417. /*.next=*/NULL _wgpu_COMMA \
  2418. /*.sType=*/WGPUSType_SharedTextureMemoryVkDedicatedAllocationDescriptor _wgpu_COMMA \
  2419. }) _wgpu_COMMA \
  2420. /*.dedicatedAllocation=*/WGPU_FALSE _wgpu_COMMA \
  2421. })
  2422. // Can be chained in WGPUSharedTextureMemoryBeginAccessDescriptor
  2423. typedef struct WGPUSharedTextureMemoryVkImageLayoutBeginState {
  2424. WGPUChainedStruct chain;
  2425. int32_t oldLayout;
  2426. int32_t newLayout;
  2427. } WGPUSharedTextureMemoryVkImageLayoutBeginState WGPU_STRUCTURE_ATTRIBUTE;
  2428. #define WGPU_SHARED_TEXTURE_MEMORY_VK_IMAGE_LAYOUT_BEGIN_STATE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryVkImageLayoutBeginState, { \
  2429. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2430. /*.next=*/NULL _wgpu_COMMA \
  2431. /*.sType=*/WGPUSType_SharedTextureMemoryVkImageLayoutBeginState _wgpu_COMMA \
  2432. }) _wgpu_COMMA \
  2433. /*.oldLayout=*/0 _wgpu_COMMA \
  2434. /*.newLayout=*/0 _wgpu_COMMA \
  2435. })
  2436. // Can be chained in WGPUSharedTextureMemoryEndAccessState
  2437. typedef struct WGPUSharedTextureMemoryVkImageLayoutEndState {
  2438. WGPUChainedStruct chain;
  2439. int32_t oldLayout;
  2440. int32_t newLayout;
  2441. } WGPUSharedTextureMemoryVkImageLayoutEndState WGPU_STRUCTURE_ATTRIBUTE;
  2442. #define WGPU_SHARED_TEXTURE_MEMORY_VK_IMAGE_LAYOUT_END_STATE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryVkImageLayoutEndState, { \
  2443. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2444. /*.next=*/NULL _wgpu_COMMA \
  2445. /*.sType=*/WGPUSType_SharedTextureMemoryVkImageLayoutEndState _wgpu_COMMA \
  2446. }) _wgpu_COMMA \
  2447. /*.oldLayout=*/0 _wgpu_COMMA \
  2448. /*.newLayout=*/0 _wgpu_COMMA \
  2449. })
  2450. // Can be chained in WGPUSharedTextureMemoryDescriptor
  2451. typedef struct WGPUSharedTextureMemoryZirconHandleDescriptor {
  2452. WGPUChainedStruct chain;
  2453. uint32_t memoryFD;
  2454. uint64_t allocationSize;
  2455. } WGPUSharedTextureMemoryZirconHandleDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2456. #define WGPU_SHARED_TEXTURE_MEMORY_ZIRCON_HANDLE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryZirconHandleDescriptor, { \
  2457. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2458. /*.next=*/NULL _wgpu_COMMA \
  2459. /*.sType=*/WGPUSType_SharedTextureMemoryZirconHandleDescriptor _wgpu_COMMA \
  2460. }) _wgpu_COMMA \
  2461. /*.memoryFD=*/0 _wgpu_COMMA \
  2462. /*.allocationSize=*/0 _wgpu_COMMA \
  2463. })
  2464. // Can be chained in WGPUBindGroupLayoutEntry
  2465. typedef struct WGPUStaticSamplerBindingLayout {
  2466. WGPUChainedStruct chain;
  2467. WGPUSampler sampler;
  2468. uint32_t sampledTextureBinding;
  2469. } WGPUStaticSamplerBindingLayout WGPU_STRUCTURE_ATTRIBUTE;
  2470. #define WGPU_STATIC_SAMPLER_BINDING_LAYOUT_INIT _wgpu_MAKE_INIT_STRUCT(WGPUStaticSamplerBindingLayout, { \
  2471. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2472. /*.next=*/NULL _wgpu_COMMA \
  2473. /*.sType=*/WGPUSType_StaticSamplerBindingLayout _wgpu_COMMA \
  2474. }) _wgpu_COMMA \
  2475. /*.sampler=*/NULL _wgpu_COMMA \
  2476. /*.sampledTextureBinding=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  2477. })
  2478. typedef struct WGPUStencilFaceState {
  2479. WGPUCompareFunction compare;
  2480. WGPUStencilOperation failOp;
  2481. WGPUStencilOperation depthFailOp;
  2482. WGPUStencilOperation passOp;
  2483. } WGPUStencilFaceState WGPU_STRUCTURE_ATTRIBUTE;
  2484. #define WGPU_STENCIL_FACE_STATE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUStencilFaceState, { \
  2485. /*.compare=*/WGPUCompareFunction_Undefined _wgpu_COMMA \
  2486. /*.failOp=*/WGPUStencilOperation_Undefined _wgpu_COMMA \
  2487. /*.depthFailOp=*/WGPUStencilOperation_Undefined _wgpu_COMMA \
  2488. /*.passOp=*/WGPUStencilOperation_Undefined _wgpu_COMMA \
  2489. })
  2490. typedef struct WGPUStorageTextureBindingLayout {
  2491. WGPUChainedStruct * nextInChain;
  2492. WGPUStorageTextureAccess access;
  2493. WGPUTextureFormat format;
  2494. WGPUTextureViewDimension viewDimension;
  2495. } WGPUStorageTextureBindingLayout WGPU_STRUCTURE_ATTRIBUTE;
  2496. #define WGPU_STORAGE_TEXTURE_BINDING_LAYOUT_INIT _wgpu_MAKE_INIT_STRUCT(WGPUStorageTextureBindingLayout, { \
  2497. /*.nextInChain=*/NULL _wgpu_COMMA \
  2498. /*.access=*/WGPUStorageTextureAccess_Undefined _wgpu_COMMA \
  2499. /*.format=*/WGPUTextureFormat_Undefined _wgpu_COMMA \
  2500. /*.viewDimension=*/WGPUTextureViewDimension_Undefined _wgpu_COMMA \
  2501. })
  2502. typedef struct WGPUSubgroupMatrixConfig {
  2503. WGPUSubgroupMatrixComponentType componentType;
  2504. WGPUSubgroupMatrixComponentType resultComponentType;
  2505. uint32_t M;
  2506. uint32_t N;
  2507. uint32_t K;
  2508. } WGPUSubgroupMatrixConfig WGPU_STRUCTURE_ATTRIBUTE;
  2509. #define WGPU_SUBGROUP_MATRIX_CONFIG_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSubgroupMatrixConfig, { \
  2510. /*.componentType=*/_wgpu_ENUM_ZERO_INIT(WGPUSubgroupMatrixComponentType) _wgpu_COMMA \
  2511. /*.resultComponentType=*/_wgpu_ENUM_ZERO_INIT(WGPUSubgroupMatrixComponentType) _wgpu_COMMA \
  2512. /*.M=*/0 _wgpu_COMMA \
  2513. /*.N=*/0 _wgpu_COMMA \
  2514. /*.K=*/0 _wgpu_COMMA \
  2515. })
  2516. typedef struct WGPUSupportedFeatures {
  2517. size_t featureCount;
  2518. WGPUFeatureName const * features;
  2519. } WGPUSupportedFeatures WGPU_STRUCTURE_ATTRIBUTE;
  2520. #define WGPU_SUPPORTED_FEATURES_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSupportedFeatures, { \
  2521. /*.featureCount=*/0 _wgpu_COMMA \
  2522. /*.features=*/NULL _wgpu_COMMA \
  2523. })
  2524. typedef struct WGPUSupportedInstanceFeatures {
  2525. size_t featureCount;
  2526. WGPUInstanceFeatureName const * features;
  2527. } WGPUSupportedInstanceFeatures WGPU_STRUCTURE_ATTRIBUTE;
  2528. #define WGPU_SUPPORTED_INSTANCE_FEATURES_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSupportedInstanceFeatures, { \
  2529. /*.featureCount=*/0 _wgpu_COMMA \
  2530. /*.features=*/NULL _wgpu_COMMA \
  2531. })
  2532. typedef struct WGPUSupportedWGSLLanguageFeatures {
  2533. size_t featureCount;
  2534. WGPUWGSLLanguageFeatureName const * features;
  2535. } WGPUSupportedWGSLLanguageFeatures WGPU_STRUCTURE_ATTRIBUTE;
  2536. #define WGPU_SUPPORTED_WGSL_LANGUAGE_FEATURES_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSupportedWGSLLanguageFeatures, { \
  2537. /*.featureCount=*/0 _wgpu_COMMA \
  2538. /*.features=*/NULL _wgpu_COMMA \
  2539. })
  2540. typedef struct WGPUSurfaceCapabilities {
  2541. WGPUChainedStruct * nextInChain;
  2542. WGPUTextureUsage usages;
  2543. size_t formatCount;
  2544. WGPUTextureFormat const * formats;
  2545. size_t presentModeCount;
  2546. WGPUPresentMode const * presentModes;
  2547. size_t alphaModeCount;
  2548. WGPUCompositeAlphaMode const * alphaModes;
  2549. } WGPUSurfaceCapabilities WGPU_STRUCTURE_ATTRIBUTE;
  2550. #define WGPU_SURFACE_CAPABILITIES_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSurfaceCapabilities, { \
  2551. /*.nextInChain=*/NULL _wgpu_COMMA \
  2552. /*.usages=*/WGPUTextureUsage_None _wgpu_COMMA \
  2553. /*.formatCount=*/0 _wgpu_COMMA \
  2554. /*.formats=*/NULL _wgpu_COMMA \
  2555. /*.presentModeCount=*/0 _wgpu_COMMA \
  2556. /*.presentModes=*/NULL _wgpu_COMMA \
  2557. /*.alphaModeCount=*/0 _wgpu_COMMA \
  2558. /*.alphaModes=*/NULL _wgpu_COMMA \
  2559. })
  2560. // Can be chained in WGPUSurfaceDescriptor
  2561. typedef struct WGPUSurfaceColorManagement {
  2562. WGPUChainedStruct chain;
  2563. WGPUPredefinedColorSpace colorSpace;
  2564. WGPUToneMappingMode toneMappingMode;
  2565. } WGPUSurfaceColorManagement WGPU_STRUCTURE_ATTRIBUTE;
  2566. #define WGPU_SURFACE_COLOR_MANAGEMENT_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSurfaceColorManagement, { \
  2567. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2568. /*.next=*/NULL _wgpu_COMMA \
  2569. /*.sType=*/WGPUSType_SurfaceColorManagement _wgpu_COMMA \
  2570. }) _wgpu_COMMA \
  2571. /*.colorSpace=*/_wgpu_ENUM_ZERO_INIT(WGPUPredefinedColorSpace) _wgpu_COMMA \
  2572. /*.toneMappingMode=*/_wgpu_ENUM_ZERO_INIT(WGPUToneMappingMode) _wgpu_COMMA \
  2573. })
  2574. typedef struct WGPUSurfaceConfiguration {
  2575. WGPUChainedStruct * nextInChain;
  2576. WGPUDevice device;
  2577. WGPUTextureFormat format;
  2578. WGPUTextureUsage usage;
  2579. uint32_t width;
  2580. uint32_t height;
  2581. size_t viewFormatCount;
  2582. WGPUTextureFormat const * viewFormats;
  2583. WGPUCompositeAlphaMode alphaMode;
  2584. WGPUPresentMode presentMode;
  2585. } WGPUSurfaceConfiguration WGPU_STRUCTURE_ATTRIBUTE;
  2586. #define WGPU_SURFACE_CONFIGURATION_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSurfaceConfiguration, { \
  2587. /*.nextInChain=*/NULL _wgpu_COMMA \
  2588. /*.device=*/NULL _wgpu_COMMA \
  2589. /*.format=*/WGPUTextureFormat_Undefined _wgpu_COMMA \
  2590. /*.usage=*/WGPUTextureUsage_RenderAttachment _wgpu_COMMA \
  2591. /*.width=*/0 _wgpu_COMMA \
  2592. /*.height=*/0 _wgpu_COMMA \
  2593. /*.viewFormatCount=*/0 _wgpu_COMMA \
  2594. /*.viewFormats=*/NULL _wgpu_COMMA \
  2595. /*.alphaMode=*/WGPUCompositeAlphaMode_Auto _wgpu_COMMA \
  2596. /*.presentMode=*/WGPUPresentMode_Undefined _wgpu_COMMA \
  2597. })
  2598. // Can be chained in WGPUSurfaceDescriptor
  2599. typedef struct WGPUSurfaceDescriptorFromWindowsCoreWindow {
  2600. WGPUChainedStruct chain;
  2601. void * coreWindow;
  2602. } WGPUSurfaceDescriptorFromWindowsCoreWindow WGPU_STRUCTURE_ATTRIBUTE;
  2603. #define WGPU_SURFACE_DESCRIPTOR_FROM_WINDOWS_CORE_WINDOW_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSurfaceDescriptorFromWindowsCoreWindow, { \
  2604. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2605. /*.next=*/NULL _wgpu_COMMA \
  2606. /*.sType=*/WGPUSType_SurfaceDescriptorFromWindowsCoreWindow _wgpu_COMMA \
  2607. }) _wgpu_COMMA \
  2608. /*.coreWindow=*/NULL _wgpu_COMMA \
  2609. })
  2610. // Can be chained in WGPUSurfaceDescriptor
  2611. typedef struct WGPUSurfaceDescriptorFromWindowsUWPSwapChainPanel {
  2612. WGPUChainedStruct chain;
  2613. void * swapChainPanel;
  2614. } WGPUSurfaceDescriptorFromWindowsUWPSwapChainPanel WGPU_STRUCTURE_ATTRIBUTE;
  2615. #define WGPU_SURFACE_DESCRIPTOR_FROM_WINDOWS_UWP_SWAP_CHAIN_PANEL_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSurfaceDescriptorFromWindowsUWPSwapChainPanel, { \
  2616. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2617. /*.next=*/NULL _wgpu_COMMA \
  2618. /*.sType=*/WGPUSType_SurfaceDescriptorFromWindowsUWPSwapChainPanel _wgpu_COMMA \
  2619. }) _wgpu_COMMA \
  2620. /*.swapChainPanel=*/NULL _wgpu_COMMA \
  2621. })
  2622. // Can be chained in WGPUSurfaceDescriptor
  2623. typedef struct WGPUSurfaceDescriptorFromWindowsWinUISwapChainPanel {
  2624. WGPUChainedStruct chain;
  2625. void * swapChainPanel;
  2626. } WGPUSurfaceDescriptorFromWindowsWinUISwapChainPanel WGPU_STRUCTURE_ATTRIBUTE;
  2627. #define WGPU_SURFACE_DESCRIPTOR_FROM_WINDOWS_WINUI_SWAP_CHAIN_PANEL_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSurfaceDescriptorFromWindowsWinUISwapChainPanel, { \
  2628. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2629. /*.next=*/NULL _wgpu_COMMA \
  2630. /*.sType=*/WGPUSType_SurfaceDescriptorFromWindowsWinUISwapChainPanel _wgpu_COMMA \
  2631. }) _wgpu_COMMA \
  2632. /*.swapChainPanel=*/NULL _wgpu_COMMA \
  2633. })
  2634. // Can be chained in WGPUSurfaceDescriptor
  2635. typedef struct WGPUSurfaceSourceAndroidNativeWindow {
  2636. WGPUChainedStruct chain;
  2637. void * window;
  2638. } WGPUSurfaceSourceAndroidNativeWindow WGPU_STRUCTURE_ATTRIBUTE;
  2639. #define WGPU_SURFACE_SOURCE_ANDROID_NATIVE_WINDOW_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSurfaceSourceAndroidNativeWindow, { \
  2640. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2641. /*.next=*/NULL _wgpu_COMMA \
  2642. /*.sType=*/WGPUSType_SurfaceSourceAndroidNativeWindow _wgpu_COMMA \
  2643. }) _wgpu_COMMA \
  2644. /*.window=*/NULL _wgpu_COMMA \
  2645. })
  2646. // Can be chained in WGPUSurfaceDescriptor
  2647. typedef struct WGPUSurfaceSourceMetalLayer {
  2648. WGPUChainedStruct chain;
  2649. void * layer;
  2650. } WGPUSurfaceSourceMetalLayer WGPU_STRUCTURE_ATTRIBUTE;
  2651. #define WGPU_SURFACE_SOURCE_METAL_LAYER_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSurfaceSourceMetalLayer, { \
  2652. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2653. /*.next=*/NULL _wgpu_COMMA \
  2654. /*.sType=*/WGPUSType_SurfaceSourceMetalLayer _wgpu_COMMA \
  2655. }) _wgpu_COMMA \
  2656. /*.layer=*/NULL _wgpu_COMMA \
  2657. })
  2658. // Can be chained in WGPUSurfaceDescriptor
  2659. typedef struct WGPUSurfaceSourceWaylandSurface {
  2660. WGPUChainedStruct chain;
  2661. void * display;
  2662. void * surface;
  2663. } WGPUSurfaceSourceWaylandSurface WGPU_STRUCTURE_ATTRIBUTE;
  2664. #define WGPU_SURFACE_SOURCE_WAYLAND_SURFACE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSurfaceSourceWaylandSurface, { \
  2665. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2666. /*.next=*/NULL _wgpu_COMMA \
  2667. /*.sType=*/WGPUSType_SurfaceSourceWaylandSurface _wgpu_COMMA \
  2668. }) _wgpu_COMMA \
  2669. /*.display=*/NULL _wgpu_COMMA \
  2670. /*.surface=*/NULL _wgpu_COMMA \
  2671. })
  2672. // Can be chained in WGPUSurfaceDescriptor
  2673. typedef struct WGPUSurfaceSourceWindowsHWND {
  2674. WGPUChainedStruct chain;
  2675. void * hinstance;
  2676. void * hwnd;
  2677. } WGPUSurfaceSourceWindowsHWND WGPU_STRUCTURE_ATTRIBUTE;
  2678. #define WGPU_SURFACE_SOURCE_WINDOWS_HWND_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSurfaceSourceWindowsHWND, { \
  2679. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2680. /*.next=*/NULL _wgpu_COMMA \
  2681. /*.sType=*/WGPUSType_SurfaceSourceWindowsHWND _wgpu_COMMA \
  2682. }) _wgpu_COMMA \
  2683. /*.hinstance=*/NULL _wgpu_COMMA \
  2684. /*.hwnd=*/NULL _wgpu_COMMA \
  2685. })
  2686. // Can be chained in WGPUSurfaceDescriptor
  2687. typedef struct WGPUSurfaceSourceXCBWindow {
  2688. WGPUChainedStruct chain;
  2689. void * connection;
  2690. uint32_t window;
  2691. } WGPUSurfaceSourceXCBWindow WGPU_STRUCTURE_ATTRIBUTE;
  2692. #define WGPU_SURFACE_SOURCE_XCB_WINDOW_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSurfaceSourceXCBWindow, { \
  2693. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2694. /*.next=*/NULL _wgpu_COMMA \
  2695. /*.sType=*/WGPUSType_SurfaceSourceXCBWindow _wgpu_COMMA \
  2696. }) _wgpu_COMMA \
  2697. /*.connection=*/NULL _wgpu_COMMA \
  2698. /*.window=*/0 _wgpu_COMMA \
  2699. })
  2700. // Can be chained in WGPUSurfaceDescriptor
  2701. typedef struct WGPUSurfaceSourceXlibWindow {
  2702. WGPUChainedStruct chain;
  2703. void * display;
  2704. uint64_t window;
  2705. } WGPUSurfaceSourceXlibWindow WGPU_STRUCTURE_ATTRIBUTE;
  2706. #define WGPU_SURFACE_SOURCE_XLIB_WINDOW_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSurfaceSourceXlibWindow, { \
  2707. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2708. /*.next=*/NULL _wgpu_COMMA \
  2709. /*.sType=*/WGPUSType_SurfaceSourceXlibWindow _wgpu_COMMA \
  2710. }) _wgpu_COMMA \
  2711. /*.display=*/NULL _wgpu_COMMA \
  2712. /*.window=*/0 _wgpu_COMMA \
  2713. })
  2714. typedef struct WGPUSurfaceTexture {
  2715. WGPUChainedStruct * nextInChain;
  2716. WGPUTexture texture;
  2717. WGPUSurfaceGetCurrentTextureStatus status;
  2718. } WGPUSurfaceTexture WGPU_STRUCTURE_ATTRIBUTE;
  2719. #define WGPU_SURFACE_TEXTURE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSurfaceTexture, { \
  2720. /*.nextInChain=*/NULL _wgpu_COMMA \
  2721. /*.texture=*/NULL _wgpu_COMMA \
  2722. /*.status=*/_wgpu_ENUM_ZERO_INIT(WGPUSurfaceGetCurrentTextureStatus) _wgpu_COMMA \
  2723. })
  2724. // Can be chained in WGPUBindGroupEntry
  2725. typedef struct WGPUTexelBufferBindingEntry {
  2726. WGPUChainedStruct chain;
  2727. WGPUTexelBufferView texelBufferView;
  2728. } WGPUTexelBufferBindingEntry WGPU_STRUCTURE_ATTRIBUTE;
  2729. #define WGPU_TEXEL_BUFFER_BINDING_ENTRY_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTexelBufferBindingEntry, { \
  2730. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2731. /*.next=*/NULL _wgpu_COMMA \
  2732. /*.sType=*/WGPUSType_TexelBufferBindingEntry _wgpu_COMMA \
  2733. }) _wgpu_COMMA \
  2734. /*.texelBufferView=*/NULL _wgpu_COMMA \
  2735. })
  2736. // Can be chained in WGPUBindGroupLayoutEntry
  2737. typedef struct WGPUTexelBufferBindingLayout {
  2738. WGPUChainedStruct chain;
  2739. WGPUTexelBufferAccess access;
  2740. WGPUTextureFormat format;
  2741. } WGPUTexelBufferBindingLayout WGPU_STRUCTURE_ATTRIBUTE;
  2742. #define WGPU_TEXEL_BUFFER_BINDING_LAYOUT_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTexelBufferBindingLayout, { \
  2743. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2744. /*.next=*/NULL _wgpu_COMMA \
  2745. /*.sType=*/WGPUSType_TexelBufferBindingLayout _wgpu_COMMA \
  2746. }) _wgpu_COMMA \
  2747. /*.access=*/WGPUTexelBufferAccess_Undefined _wgpu_COMMA \
  2748. /*.format=*/WGPUTextureFormat_Undefined _wgpu_COMMA \
  2749. })
  2750. typedef struct WGPUTexelBufferViewDescriptor {
  2751. WGPUChainedStruct * nextInChain;
  2752. WGPUStringView label;
  2753. WGPUTextureFormat format;
  2754. uint64_t offset;
  2755. uint64_t size;
  2756. } WGPUTexelBufferViewDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2757. #define WGPU_TEXEL_BUFFER_VIEW_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTexelBufferViewDescriptor, { \
  2758. /*.nextInChain=*/NULL _wgpu_COMMA \
  2759. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  2760. /*.format=*/WGPUTextureFormat_Undefined _wgpu_COMMA \
  2761. /*.offset=*/0 _wgpu_COMMA \
  2762. /*.size=*/WGPU_WHOLE_SIZE _wgpu_COMMA \
  2763. })
  2764. typedef struct WGPUTexelCopyBufferLayout {
  2765. uint64_t offset;
  2766. uint32_t bytesPerRow;
  2767. uint32_t rowsPerImage;
  2768. } WGPUTexelCopyBufferLayout WGPU_STRUCTURE_ATTRIBUTE;
  2769. #define WGPU_TEXEL_COPY_BUFFER_LAYOUT_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTexelCopyBufferLayout, { \
  2770. /*.offset=*/0 _wgpu_COMMA \
  2771. /*.bytesPerRow=*/WGPU_COPY_STRIDE_UNDEFINED _wgpu_COMMA \
  2772. /*.rowsPerImage=*/WGPU_COPY_STRIDE_UNDEFINED _wgpu_COMMA \
  2773. })
  2774. typedef struct WGPUTextureBindingLayout {
  2775. WGPUChainedStruct * nextInChain;
  2776. WGPUTextureSampleType sampleType;
  2777. WGPUTextureViewDimension viewDimension;
  2778. WGPUBool multisampled;
  2779. } WGPUTextureBindingLayout WGPU_STRUCTURE_ATTRIBUTE;
  2780. #define WGPU_TEXTURE_BINDING_LAYOUT_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTextureBindingLayout, { \
  2781. /*.nextInChain=*/NULL _wgpu_COMMA \
  2782. /*.sampleType=*/WGPUTextureSampleType_Undefined _wgpu_COMMA \
  2783. /*.viewDimension=*/WGPUTextureViewDimension_Undefined _wgpu_COMMA \
  2784. /*.multisampled=*/WGPU_FALSE _wgpu_COMMA \
  2785. })
  2786. // Can be chained in WGPUTextureDescriptor
  2787. typedef struct WGPUTextureBindingViewDimensionDescriptor {
  2788. WGPUChainedStruct chain;
  2789. WGPUTextureViewDimension textureBindingViewDimension;
  2790. } WGPUTextureBindingViewDimensionDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2791. #define WGPU_TEXTURE_BINDING_VIEW_DIMENSION_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTextureBindingViewDimensionDescriptor, { \
  2792. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2793. /*.next=*/NULL _wgpu_COMMA \
  2794. /*.sType=*/WGPUSType_TextureBindingViewDimensionDescriptor _wgpu_COMMA \
  2795. }) _wgpu_COMMA \
  2796. /*.textureBindingViewDimension=*/WGPUTextureViewDimension_Undefined _wgpu_COMMA \
  2797. })
  2798. typedef struct WGPUTextureComponentSwizzle {
  2799. WGPUComponentSwizzle r;
  2800. WGPUComponentSwizzle g;
  2801. WGPUComponentSwizzle b;
  2802. WGPUComponentSwizzle a;
  2803. } WGPUTextureComponentSwizzle WGPU_STRUCTURE_ATTRIBUTE;
  2804. #define WGPU_TEXTURE_COMPONENT_SWIZZLE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTextureComponentSwizzle, { \
  2805. /*.r=*/WGPUComponentSwizzle_Undefined _wgpu_COMMA \
  2806. /*.g=*/WGPUComponentSwizzle_Undefined _wgpu_COMMA \
  2807. /*.b=*/WGPUComponentSwizzle_Undefined _wgpu_COMMA \
  2808. /*.a=*/WGPUComponentSwizzle_Undefined _wgpu_COMMA \
  2809. })
  2810. typedef struct WGPUVertexAttribute {
  2811. WGPUChainedStruct * nextInChain;
  2812. WGPUVertexFormat format;
  2813. uint64_t offset;
  2814. uint32_t shaderLocation;
  2815. } WGPUVertexAttribute WGPU_STRUCTURE_ATTRIBUTE;
  2816. #define WGPU_VERTEX_ATTRIBUTE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUVertexAttribute, { \
  2817. /*.nextInChain=*/NULL _wgpu_COMMA \
  2818. /*.format=*/_wgpu_ENUM_ZERO_INIT(WGPUVertexFormat) _wgpu_COMMA \
  2819. /*.offset=*/0 _wgpu_COMMA \
  2820. /*.shaderLocation=*/0 _wgpu_COMMA \
  2821. })
  2822. // Can be chained in WGPUSamplerDescriptor
  2823. // Can be chained in WGPUTextureViewDescriptor
  2824. typedef struct WGPUYCbCrVkDescriptor {
  2825. WGPUChainedStruct chain;
  2826. uint32_t vkFormat;
  2827. uint32_t vkYCbCrModel;
  2828. uint32_t vkYCbCrRange;
  2829. uint32_t vkComponentSwizzleRed;
  2830. uint32_t vkComponentSwizzleGreen;
  2831. uint32_t vkComponentSwizzleBlue;
  2832. uint32_t vkComponentSwizzleAlpha;
  2833. uint32_t vkXChromaOffset;
  2834. uint32_t vkYChromaOffset;
  2835. WGPUFilterMode vkChromaFilter;
  2836. WGPUBool forceExplicitReconstruction;
  2837. uint64_t externalFormat;
  2838. } WGPUYCbCrVkDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2839. #define WGPU_Y_CB_CR_VK_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUYCbCrVkDescriptor, { \
  2840. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2841. /*.next=*/NULL _wgpu_COMMA \
  2842. /*.sType=*/WGPUSType_YCbCrVkDescriptor _wgpu_COMMA \
  2843. }) _wgpu_COMMA \
  2844. /*.vkFormat=*/0 _wgpu_COMMA \
  2845. /*.vkYCbCrModel=*/0 _wgpu_COMMA \
  2846. /*.vkYCbCrRange=*/0 _wgpu_COMMA \
  2847. /*.vkComponentSwizzleRed=*/0 _wgpu_COMMA \
  2848. /*.vkComponentSwizzleGreen=*/0 _wgpu_COMMA \
  2849. /*.vkComponentSwizzleBlue=*/0 _wgpu_COMMA \
  2850. /*.vkComponentSwizzleAlpha=*/0 _wgpu_COMMA \
  2851. /*.vkXChromaOffset=*/0 _wgpu_COMMA \
  2852. /*.vkYChromaOffset=*/0 _wgpu_COMMA \
  2853. /*.vkChromaFilter=*/WGPUFilterMode_Undefined _wgpu_COMMA \
  2854. /*.forceExplicitReconstruction=*/WGPU_FALSE _wgpu_COMMA \
  2855. /*.externalFormat=*/0 _wgpu_COMMA \
  2856. })
  2857. // Can be chained in WGPUAdapterInfo
  2858. typedef struct WGPUAdapterPropertiesMemoryHeaps {
  2859. WGPUChainedStruct chain;
  2860. size_t heapCount;
  2861. WGPUMemoryHeapInfo const * heapInfo;
  2862. } WGPUAdapterPropertiesMemoryHeaps WGPU_STRUCTURE_ATTRIBUTE;
  2863. #define WGPU_ADAPTER_PROPERTIES_MEMORY_HEAPS_INIT _wgpu_MAKE_INIT_STRUCT(WGPUAdapterPropertiesMemoryHeaps, { \
  2864. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2865. /*.next=*/NULL _wgpu_COMMA \
  2866. /*.sType=*/WGPUSType_AdapterPropertiesMemoryHeaps _wgpu_COMMA \
  2867. }) _wgpu_COMMA \
  2868. /*.heapCount=*/0 _wgpu_COMMA \
  2869. /*.heapInfo=*/NULL _wgpu_COMMA \
  2870. })
  2871. // Can be chained in WGPUAdapterInfo
  2872. typedef struct WGPUAdapterPropertiesSubgroupMatrixConfigs {
  2873. WGPUChainedStruct chain;
  2874. size_t configCount;
  2875. WGPUSubgroupMatrixConfig const * configs;
  2876. } WGPUAdapterPropertiesSubgroupMatrixConfigs WGPU_STRUCTURE_ATTRIBUTE;
  2877. #define WGPU_ADAPTER_PROPERTIES_SUBGROUP_MATRIX_CONFIGS_INIT _wgpu_MAKE_INIT_STRUCT(WGPUAdapterPropertiesSubgroupMatrixConfigs, { \
  2878. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  2879. /*.next=*/NULL _wgpu_COMMA \
  2880. /*.sType=*/WGPUSType_AdapterPropertiesSubgroupMatrixConfigs _wgpu_COMMA \
  2881. }) _wgpu_COMMA \
  2882. /*.configCount=*/0 _wgpu_COMMA \
  2883. /*.configs=*/NULL _wgpu_COMMA \
  2884. })
  2885. typedef struct WGPUAHardwareBufferProperties {
  2886. WGPUYCbCrVkDescriptor yCbCrInfo;
  2887. } WGPUAHardwareBufferProperties WGPU_STRUCTURE_ATTRIBUTE;
  2888. #define WGPU_A_HARDWARE_BUFFER_PROPERTIES_INIT _wgpu_MAKE_INIT_STRUCT(WGPUAHardwareBufferProperties, { \
  2889. /*.yCbCrInfo=*/WGPU_Y_CB_CR_VK_DESCRIPTOR_INIT _wgpu_COMMA \
  2890. })
  2891. typedef struct WGPUBindGroupEntry {
  2892. WGPUChainedStruct * nextInChain;
  2893. uint32_t binding;
  2894. WGPU_NULLABLE WGPUBuffer buffer;
  2895. uint64_t offset;
  2896. uint64_t size;
  2897. WGPU_NULLABLE WGPUSampler sampler;
  2898. WGPU_NULLABLE WGPUTextureView textureView;
  2899. } WGPUBindGroupEntry WGPU_STRUCTURE_ATTRIBUTE;
  2900. #define WGPU_BIND_GROUP_ENTRY_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBindGroupEntry, { \
  2901. /*.nextInChain=*/NULL _wgpu_COMMA \
  2902. /*.binding=*/0 _wgpu_COMMA \
  2903. /*.buffer=*/NULL _wgpu_COMMA \
  2904. /*.offset=*/0 _wgpu_COMMA \
  2905. /*.size=*/WGPU_WHOLE_SIZE _wgpu_COMMA \
  2906. /*.sampler=*/NULL _wgpu_COMMA \
  2907. /*.textureView=*/NULL _wgpu_COMMA \
  2908. })
  2909. typedef struct WGPUBindGroupLayoutEntry {
  2910. WGPUChainedStruct * nextInChain;
  2911. uint32_t binding;
  2912. WGPUShaderStage visibility;
  2913. uint32_t bindingArraySize;
  2914. WGPUBufferBindingLayout buffer;
  2915. WGPUSamplerBindingLayout sampler;
  2916. WGPUTextureBindingLayout texture;
  2917. WGPUStorageTextureBindingLayout storageTexture;
  2918. } WGPUBindGroupLayoutEntry WGPU_STRUCTURE_ATTRIBUTE;
  2919. #define WGPU_BIND_GROUP_LAYOUT_ENTRY_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBindGroupLayoutEntry, { \
  2920. /*.nextInChain=*/NULL _wgpu_COMMA \
  2921. /*.binding=*/0 _wgpu_COMMA \
  2922. /*.visibility=*/WGPUShaderStage_None _wgpu_COMMA \
  2923. /*.bindingArraySize=*/0 _wgpu_COMMA \
  2924. /*.buffer=*/_wgpu_STRUCT_ZERO_INIT _wgpu_COMMA \
  2925. /*.sampler=*/_wgpu_STRUCT_ZERO_INIT _wgpu_COMMA \
  2926. /*.texture=*/_wgpu_STRUCT_ZERO_INIT _wgpu_COMMA \
  2927. /*.storageTexture=*/_wgpu_STRUCT_ZERO_INIT _wgpu_COMMA \
  2928. })
  2929. typedef struct WGPUBlendState {
  2930. WGPUBlendComponent color;
  2931. WGPUBlendComponent alpha;
  2932. } WGPUBlendState WGPU_STRUCTURE_ATTRIBUTE;
  2933. #define WGPU_BLEND_STATE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBlendState, { \
  2934. /*.color=*/WGPU_BLEND_COMPONENT_INIT _wgpu_COMMA \
  2935. /*.alpha=*/WGPU_BLEND_COMPONENT_INIT _wgpu_COMMA \
  2936. })
  2937. typedef struct WGPUBufferDescriptor {
  2938. WGPUChainedStruct * nextInChain;
  2939. WGPUStringView label;
  2940. WGPUBufferUsage usage;
  2941. uint64_t size;
  2942. WGPUBool mappedAtCreation;
  2943. } WGPUBufferDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2944. #define WGPU_BUFFER_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBufferDescriptor, { \
  2945. /*.nextInChain=*/NULL _wgpu_COMMA \
  2946. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  2947. /*.usage=*/WGPUBufferUsage_None _wgpu_COMMA \
  2948. /*.size=*/0 _wgpu_COMMA \
  2949. /*.mappedAtCreation=*/WGPU_FALSE _wgpu_COMMA \
  2950. })
  2951. typedef struct WGPUCommandEncoderDescriptor {
  2952. WGPUChainedStruct * nextInChain;
  2953. WGPUStringView label;
  2954. } WGPUCommandEncoderDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2955. #define WGPU_COMMAND_ENCODER_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUCommandEncoderDescriptor, { \
  2956. /*.nextInChain=*/NULL _wgpu_COMMA \
  2957. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  2958. })
  2959. typedef struct WGPUCompilationMessage {
  2960. WGPUChainedStruct * nextInChain;
  2961. WGPUStringView message;
  2962. WGPUCompilationMessageType type;
  2963. uint64_t lineNum;
  2964. uint64_t linePos;
  2965. uint64_t offset;
  2966. uint64_t length;
  2967. } WGPUCompilationMessage WGPU_STRUCTURE_ATTRIBUTE;
  2968. #define WGPU_COMPILATION_MESSAGE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUCompilationMessage, { \
  2969. /*.nextInChain=*/NULL _wgpu_COMMA \
  2970. /*.message=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  2971. /*.type=*/_wgpu_ENUM_ZERO_INIT(WGPUCompilationMessageType) _wgpu_COMMA \
  2972. /*.lineNum=*/0 _wgpu_COMMA \
  2973. /*.linePos=*/0 _wgpu_COMMA \
  2974. /*.offset=*/0 _wgpu_COMMA \
  2975. /*.length=*/0 _wgpu_COMMA \
  2976. })
  2977. typedef struct WGPUComputePassDescriptor {
  2978. WGPUChainedStruct * nextInChain;
  2979. WGPUStringView label;
  2980. WGPU_NULLABLE WGPUPassTimestampWrites const * timestampWrites;
  2981. } WGPUComputePassDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  2982. #define WGPU_COMPUTE_PASS_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUComputePassDescriptor, { \
  2983. /*.nextInChain=*/NULL _wgpu_COMMA \
  2984. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  2985. /*.timestampWrites=*/NULL _wgpu_COMMA \
  2986. })
  2987. typedef struct WGPUComputeState {
  2988. WGPUChainedStruct * nextInChain;
  2989. WGPUShaderModule module;
  2990. WGPUStringView entryPoint;
  2991. size_t constantCount;
  2992. WGPUConstantEntry const * constants;
  2993. } WGPUComputeState WGPU_STRUCTURE_ATTRIBUTE;
  2994. #define WGPU_COMPUTE_STATE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUComputeState, { \
  2995. /*.nextInChain=*/NULL _wgpu_COMMA \
  2996. /*.module=*/NULL _wgpu_COMMA \
  2997. /*.entryPoint=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  2998. /*.constantCount=*/0 _wgpu_COMMA \
  2999. /*.constants=*/NULL _wgpu_COMMA \
  3000. })
  3001. // Can be chained in WGPUDawnFormatCapabilities
  3002. typedef struct WGPUDawnDrmFormatCapabilities {
  3003. WGPUChainedStruct chain;
  3004. size_t propertiesCount;
  3005. WGPUDawnDrmFormatProperties const * properties;
  3006. } WGPUDawnDrmFormatCapabilities WGPU_STRUCTURE_ATTRIBUTE;
  3007. #define WGPU_DAWN_DRM_FORMAT_CAPABILITIES_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnDrmFormatCapabilities, { \
  3008. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  3009. /*.next=*/NULL _wgpu_COMMA \
  3010. /*.sType=*/WGPUSType_DawnDrmFormatCapabilities _wgpu_COMMA \
  3011. }) _wgpu_COMMA \
  3012. /*.propertiesCount=*/0 _wgpu_COMMA \
  3013. /*.properties=*/NULL _wgpu_COMMA \
  3014. })
  3015. typedef struct WGPUDepthStencilState {
  3016. WGPUChainedStruct * nextInChain;
  3017. WGPUTextureFormat format;
  3018. WGPUOptionalBool depthWriteEnabled;
  3019. WGPUCompareFunction depthCompare;
  3020. WGPUStencilFaceState stencilFront;
  3021. WGPUStencilFaceState stencilBack;
  3022. uint32_t stencilReadMask;
  3023. uint32_t stencilWriteMask;
  3024. int32_t depthBias;
  3025. float depthBiasSlopeScale;
  3026. float depthBiasClamp;
  3027. } WGPUDepthStencilState WGPU_STRUCTURE_ATTRIBUTE;
  3028. #define WGPU_DEPTH_STENCIL_STATE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDepthStencilState, { \
  3029. /*.nextInChain=*/NULL _wgpu_COMMA \
  3030. /*.format=*/WGPUTextureFormat_Undefined _wgpu_COMMA \
  3031. /*.depthWriteEnabled=*/WGPUOptionalBool_Undefined _wgpu_COMMA \
  3032. /*.depthCompare=*/WGPUCompareFunction_Undefined _wgpu_COMMA \
  3033. /*.stencilFront=*/WGPU_STENCIL_FACE_STATE_INIT _wgpu_COMMA \
  3034. /*.stencilBack=*/WGPU_STENCIL_FACE_STATE_INIT _wgpu_COMMA \
  3035. /*.stencilReadMask=*/0xFFFFFFFF _wgpu_COMMA \
  3036. /*.stencilWriteMask=*/0xFFFFFFFF _wgpu_COMMA \
  3037. /*.depthBias=*/0 _wgpu_COMMA \
  3038. /*.depthBiasSlopeScale=*/0.f _wgpu_COMMA \
  3039. /*.depthBiasClamp=*/0.f _wgpu_COMMA \
  3040. })
  3041. typedef struct WGPUExternalTextureDescriptor {
  3042. WGPUChainedStruct * nextInChain;
  3043. WGPUStringView label;
  3044. WGPUTextureView plane0;
  3045. WGPU_NULLABLE WGPUTextureView plane1;
  3046. WGPUOrigin2D cropOrigin;
  3047. WGPUExtent2D cropSize;
  3048. WGPUExtent2D apparentSize;
  3049. WGPUBool doYuvToRgbConversionOnly;
  3050. WGPU_NULLABLE float const * yuvToRgbConversionMatrix;
  3051. float const * srcTransferFunctionParameters;
  3052. float const * dstTransferFunctionParameters;
  3053. float const * gamutConversionMatrix;
  3054. WGPUBool mirrored;
  3055. WGPUExternalTextureRotation rotation;
  3056. } WGPUExternalTextureDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3057. #define WGPU_EXTERNAL_TEXTURE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUExternalTextureDescriptor, { \
  3058. /*.nextInChain=*/NULL _wgpu_COMMA \
  3059. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3060. /*.plane0=*/NULL _wgpu_COMMA \
  3061. /*.plane1=*/NULL _wgpu_COMMA \
  3062. /*.cropOrigin=*/WGPU_ORIGIN_2D_INIT _wgpu_COMMA \
  3063. /*.cropSize=*/WGPU_EXTENT_2D_INIT _wgpu_COMMA \
  3064. /*.apparentSize=*/WGPU_EXTENT_2D_INIT _wgpu_COMMA \
  3065. /*.doYuvToRgbConversionOnly=*/WGPU_FALSE _wgpu_COMMA \
  3066. /*.yuvToRgbConversionMatrix=*/NULL _wgpu_COMMA \
  3067. /*.srcTransferFunctionParameters=*/NULL _wgpu_COMMA \
  3068. /*.dstTransferFunctionParameters=*/NULL _wgpu_COMMA \
  3069. /*.gamutConversionMatrix=*/NULL _wgpu_COMMA \
  3070. /*.mirrored=*/WGPU_FALSE _wgpu_COMMA \
  3071. /*.rotation=*/WGPUExternalTextureRotation_Rotate0Degrees _wgpu_COMMA \
  3072. })
  3073. typedef struct WGPUFutureWaitInfo {
  3074. WGPUFuture future;
  3075. WGPUBool completed;
  3076. } WGPUFutureWaitInfo WGPU_STRUCTURE_ATTRIBUTE;
  3077. #define WGPU_FUTURE_WAIT_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUFutureWaitInfo, { \
  3078. /*.future=*/WGPU_FUTURE_INIT _wgpu_COMMA \
  3079. /*.completed=*/WGPU_FALSE _wgpu_COMMA \
  3080. })
  3081. typedef struct WGPUImageCopyExternalTexture {
  3082. WGPUChainedStruct * nextInChain;
  3083. WGPUExternalTexture externalTexture;
  3084. WGPUOrigin3D origin;
  3085. WGPUExtent2D naturalSize;
  3086. } WGPUImageCopyExternalTexture WGPU_STRUCTURE_ATTRIBUTE;
  3087. #define WGPU_IMAGE_COPY_EXTERNAL_TEXTURE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUImageCopyExternalTexture, { \
  3088. /*.nextInChain=*/NULL _wgpu_COMMA \
  3089. /*.externalTexture=*/NULL _wgpu_COMMA \
  3090. /*.origin=*/WGPU_ORIGIN_3D_INIT _wgpu_COMMA \
  3091. /*.naturalSize=*/WGPU_EXTENT_2D_INIT _wgpu_COMMA \
  3092. })
  3093. typedef struct WGPUInstanceDescriptor {
  3094. WGPUChainedStruct * nextInChain;
  3095. size_t requiredFeatureCount;
  3096. WGPUInstanceFeatureName const * requiredFeatures;
  3097. WGPU_NULLABLE WGPUInstanceLimits const * requiredLimits;
  3098. } WGPUInstanceDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3099. #define WGPU_INSTANCE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUInstanceDescriptor, { \
  3100. /*.nextInChain=*/NULL _wgpu_COMMA \
  3101. /*.requiredFeatureCount=*/0 _wgpu_COMMA \
  3102. /*.requiredFeatures=*/NULL _wgpu_COMMA \
  3103. /*.requiredLimits=*/NULL _wgpu_COMMA \
  3104. })
  3105. typedef struct WGPULimits {
  3106. WGPUChainedStruct * nextInChain;
  3107. uint32_t maxTextureDimension1D;
  3108. uint32_t maxTextureDimension2D;
  3109. uint32_t maxTextureDimension3D;
  3110. uint32_t maxTextureArrayLayers;
  3111. uint32_t maxBindGroups;
  3112. uint32_t maxBindGroupsPlusVertexBuffers;
  3113. uint32_t maxBindingsPerBindGroup;
  3114. uint32_t maxDynamicUniformBuffersPerPipelineLayout;
  3115. uint32_t maxDynamicStorageBuffersPerPipelineLayout;
  3116. uint32_t maxSampledTexturesPerShaderStage;
  3117. uint32_t maxSamplersPerShaderStage;
  3118. uint32_t maxStorageBuffersPerShaderStage;
  3119. uint32_t maxStorageTexturesPerShaderStage;
  3120. uint32_t maxUniformBuffersPerShaderStage;
  3121. uint64_t maxUniformBufferBindingSize;
  3122. uint64_t maxStorageBufferBindingSize;
  3123. uint32_t minUniformBufferOffsetAlignment;
  3124. uint32_t minStorageBufferOffsetAlignment;
  3125. uint32_t maxVertexBuffers;
  3126. uint64_t maxBufferSize;
  3127. uint32_t maxVertexAttributes;
  3128. uint32_t maxVertexBufferArrayStride;
  3129. uint32_t maxInterStageShaderVariables;
  3130. uint32_t maxColorAttachments;
  3131. uint32_t maxColorAttachmentBytesPerSample;
  3132. uint32_t maxComputeWorkgroupStorageSize;
  3133. uint32_t maxComputeInvocationsPerWorkgroup;
  3134. uint32_t maxComputeWorkgroupSizeX;
  3135. uint32_t maxComputeWorkgroupSizeY;
  3136. uint32_t maxComputeWorkgroupSizeZ;
  3137. uint32_t maxComputeWorkgroupsPerDimension;
  3138. uint32_t maxImmediateSize;
  3139. } WGPULimits WGPU_STRUCTURE_ATTRIBUTE;
  3140. #define WGPU_LIMITS_INIT _wgpu_MAKE_INIT_STRUCT(WGPULimits, { \
  3141. /*.nextInChain=*/NULL _wgpu_COMMA \
  3142. /*.maxTextureDimension1D=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3143. /*.maxTextureDimension2D=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3144. /*.maxTextureDimension3D=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3145. /*.maxTextureArrayLayers=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3146. /*.maxBindGroups=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3147. /*.maxBindGroupsPlusVertexBuffers=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3148. /*.maxBindingsPerBindGroup=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3149. /*.maxDynamicUniformBuffersPerPipelineLayout=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3150. /*.maxDynamicStorageBuffersPerPipelineLayout=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3151. /*.maxSampledTexturesPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3152. /*.maxSamplersPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3153. /*.maxStorageBuffersPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3154. /*.maxStorageTexturesPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3155. /*.maxUniformBuffersPerShaderStage=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3156. /*.maxUniformBufferBindingSize=*/WGPU_LIMIT_U64_UNDEFINED _wgpu_COMMA \
  3157. /*.maxStorageBufferBindingSize=*/WGPU_LIMIT_U64_UNDEFINED _wgpu_COMMA \
  3158. /*.minUniformBufferOffsetAlignment=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3159. /*.minStorageBufferOffsetAlignment=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3160. /*.maxVertexBuffers=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3161. /*.maxBufferSize=*/WGPU_LIMIT_U64_UNDEFINED _wgpu_COMMA \
  3162. /*.maxVertexAttributes=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3163. /*.maxVertexBufferArrayStride=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3164. /*.maxInterStageShaderVariables=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3165. /*.maxColorAttachments=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3166. /*.maxColorAttachmentBytesPerSample=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3167. /*.maxComputeWorkgroupStorageSize=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3168. /*.maxComputeInvocationsPerWorkgroup=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3169. /*.maxComputeWorkgroupSizeX=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3170. /*.maxComputeWorkgroupSizeY=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3171. /*.maxComputeWorkgroupSizeZ=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3172. /*.maxComputeWorkgroupsPerDimension=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3173. /*.maxImmediateSize=*/WGPU_LIMIT_U32_UNDEFINED _wgpu_COMMA \
  3174. })
  3175. // Can be chained in WGPUPipelineLayoutDescriptor
  3176. typedef struct WGPUPipelineLayoutPixelLocalStorage {
  3177. WGPUChainedStruct chain;
  3178. uint64_t totalPixelLocalStorageSize;
  3179. size_t storageAttachmentCount;
  3180. WGPUPipelineLayoutStorageAttachment const * storageAttachments;
  3181. } WGPUPipelineLayoutPixelLocalStorage WGPU_STRUCTURE_ATTRIBUTE;
  3182. #define WGPU_PIPELINE_LAYOUT_PIXEL_LOCAL_STORAGE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUPipelineLayoutPixelLocalStorage, { \
  3183. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  3184. /*.next=*/NULL _wgpu_COMMA \
  3185. /*.sType=*/WGPUSType_PipelineLayoutPixelLocalStorage _wgpu_COMMA \
  3186. }) _wgpu_COMMA \
  3187. /*.totalPixelLocalStorageSize=*/0 _wgpu_COMMA \
  3188. /*.storageAttachmentCount=*/0 _wgpu_COMMA \
  3189. /*.storageAttachments=*/NULL _wgpu_COMMA \
  3190. })
  3191. typedef struct WGPURenderPassColorAttachment {
  3192. WGPUChainedStruct * nextInChain;
  3193. WGPU_NULLABLE WGPUTextureView view;
  3194. uint32_t depthSlice;
  3195. WGPU_NULLABLE WGPUTextureView resolveTarget;
  3196. WGPULoadOp loadOp;
  3197. WGPUStoreOp storeOp;
  3198. WGPUColor clearValue;
  3199. } WGPURenderPassColorAttachment WGPU_STRUCTURE_ATTRIBUTE;
  3200. #define WGPU_RENDER_PASS_COLOR_ATTACHMENT_INIT _wgpu_MAKE_INIT_STRUCT(WGPURenderPassColorAttachment, { \
  3201. /*.nextInChain=*/NULL _wgpu_COMMA \
  3202. /*.view=*/NULL _wgpu_COMMA \
  3203. /*.depthSlice=*/WGPU_DEPTH_SLICE_UNDEFINED _wgpu_COMMA \
  3204. /*.resolveTarget=*/NULL _wgpu_COMMA \
  3205. /*.loadOp=*/WGPULoadOp_Undefined _wgpu_COMMA \
  3206. /*.storeOp=*/WGPUStoreOp_Undefined _wgpu_COMMA \
  3207. /*.clearValue=*/WGPU_COLOR_INIT _wgpu_COMMA \
  3208. })
  3209. typedef struct WGPURenderPassStorageAttachment {
  3210. WGPUChainedStruct * nextInChain;
  3211. uint64_t offset;
  3212. WGPUTextureView storage;
  3213. WGPULoadOp loadOp;
  3214. WGPUStoreOp storeOp;
  3215. WGPUColor clearValue;
  3216. } WGPURenderPassStorageAttachment WGPU_STRUCTURE_ATTRIBUTE;
  3217. #define WGPU_RENDER_PASS_STORAGE_ATTACHMENT_INIT _wgpu_MAKE_INIT_STRUCT(WGPURenderPassStorageAttachment, { \
  3218. /*.nextInChain=*/NULL _wgpu_COMMA \
  3219. /*.offset=*/0 _wgpu_COMMA \
  3220. /*.storage=*/NULL _wgpu_COMMA \
  3221. /*.loadOp=*/WGPULoadOp_Undefined _wgpu_COMMA \
  3222. /*.storeOp=*/WGPUStoreOp_Undefined _wgpu_COMMA \
  3223. /*.clearValue=*/WGPU_COLOR_INIT _wgpu_COMMA \
  3224. })
  3225. typedef struct WGPURequestAdapterOptions {
  3226. WGPUChainedStruct * nextInChain;
  3227. WGPUFeatureLevel featureLevel;
  3228. WGPUPowerPreference powerPreference;
  3229. WGPUBool forceFallbackAdapter;
  3230. WGPUBackendType backendType;
  3231. WGPU_NULLABLE WGPUSurface compatibleSurface;
  3232. } WGPURequestAdapterOptions WGPU_STRUCTURE_ATTRIBUTE;
  3233. #define WGPU_REQUEST_ADAPTER_OPTIONS_INIT _wgpu_MAKE_INIT_STRUCT(WGPURequestAdapterOptions, { \
  3234. /*.nextInChain=*/NULL _wgpu_COMMA \
  3235. /*.featureLevel=*/WGPUFeatureLevel_Undefined _wgpu_COMMA \
  3236. /*.powerPreference=*/WGPUPowerPreference_Undefined _wgpu_COMMA \
  3237. /*.forceFallbackAdapter=*/WGPU_FALSE _wgpu_COMMA \
  3238. /*.backendType=*/WGPUBackendType_Undefined _wgpu_COMMA \
  3239. /*.compatibleSurface=*/NULL _wgpu_COMMA \
  3240. })
  3241. typedef struct WGPUSamplerDescriptor {
  3242. WGPUChainedStruct * nextInChain;
  3243. WGPUStringView label;
  3244. WGPUAddressMode addressModeU;
  3245. WGPUAddressMode addressModeV;
  3246. WGPUAddressMode addressModeW;
  3247. WGPUFilterMode magFilter;
  3248. WGPUFilterMode minFilter;
  3249. WGPUMipmapFilterMode mipmapFilter;
  3250. float lodMinClamp;
  3251. float lodMaxClamp;
  3252. WGPUCompareFunction compare;
  3253. uint16_t maxAnisotropy;
  3254. } WGPUSamplerDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3255. #define WGPU_SAMPLER_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSamplerDescriptor, { \
  3256. /*.nextInChain=*/NULL _wgpu_COMMA \
  3257. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3258. /*.addressModeU=*/WGPUAddressMode_Undefined _wgpu_COMMA \
  3259. /*.addressModeV=*/WGPUAddressMode_Undefined _wgpu_COMMA \
  3260. /*.addressModeW=*/WGPUAddressMode_Undefined _wgpu_COMMA \
  3261. /*.magFilter=*/WGPUFilterMode_Undefined _wgpu_COMMA \
  3262. /*.minFilter=*/WGPUFilterMode_Undefined _wgpu_COMMA \
  3263. /*.mipmapFilter=*/WGPUMipmapFilterMode_Undefined _wgpu_COMMA \
  3264. /*.lodMinClamp=*/0.f _wgpu_COMMA \
  3265. /*.lodMaxClamp=*/32.f _wgpu_COMMA \
  3266. /*.compare=*/WGPUCompareFunction_Undefined _wgpu_COMMA \
  3267. /*.maxAnisotropy=*/1 _wgpu_COMMA \
  3268. })
  3269. typedef struct WGPUShaderModuleDescriptor {
  3270. WGPUChainedStruct * nextInChain;
  3271. WGPUStringView label;
  3272. } WGPUShaderModuleDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3273. #define WGPU_SHADER_MODULE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUShaderModuleDescriptor, { \
  3274. /*.nextInChain=*/NULL _wgpu_COMMA \
  3275. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3276. })
  3277. typedef struct WGPUSharedFenceDescriptor {
  3278. WGPUChainedStruct * nextInChain;
  3279. WGPUStringView label;
  3280. } WGPUSharedFenceDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3281. #define WGPU_SHARED_FENCE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedFenceDescriptor, { \
  3282. /*.nextInChain=*/NULL _wgpu_COMMA \
  3283. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3284. })
  3285. typedef struct WGPUSharedFenceExportInfo {
  3286. WGPUChainedStruct * nextInChain;
  3287. WGPUSharedFenceType type;
  3288. } WGPUSharedFenceExportInfo WGPU_STRUCTURE_ATTRIBUTE;
  3289. #define WGPU_SHARED_FENCE_EXPORT_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedFenceExportInfo, { \
  3290. /*.nextInChain=*/NULL _wgpu_COMMA \
  3291. /*.type=*/_wgpu_ENUM_ZERO_INIT(WGPUSharedFenceType) _wgpu_COMMA \
  3292. })
  3293. // Can be chained in WGPUSharedTextureMemoryProperties
  3294. typedef struct WGPUSharedTextureMemoryAHardwareBufferProperties {
  3295. WGPUChainedStruct chain;
  3296. WGPUYCbCrVkDescriptor yCbCrInfo;
  3297. } WGPUSharedTextureMemoryAHardwareBufferProperties WGPU_STRUCTURE_ATTRIBUTE;
  3298. #define WGPU_SHARED_TEXTURE_MEMORY_A_HARDWARE_BUFFER_PROPERTIES_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryAHardwareBufferProperties, { \
  3299. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  3300. /*.next=*/NULL _wgpu_COMMA \
  3301. /*.sType=*/WGPUSType_SharedTextureMemoryAHardwareBufferProperties _wgpu_COMMA \
  3302. }) _wgpu_COMMA \
  3303. /*.yCbCrInfo=*/WGPU_Y_CB_CR_VK_DESCRIPTOR_INIT _wgpu_COMMA \
  3304. })
  3305. typedef struct WGPUSharedTextureMemoryBeginAccessDescriptor {
  3306. WGPUChainedStruct * nextInChain;
  3307. WGPUBool concurrentRead;
  3308. WGPUBool initialized;
  3309. size_t fenceCount;
  3310. WGPUSharedFence const * fences;
  3311. uint64_t const * signaledValues;
  3312. } WGPUSharedTextureMemoryBeginAccessDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3313. #define WGPU_SHARED_TEXTURE_MEMORY_BEGIN_ACCESS_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryBeginAccessDescriptor, { \
  3314. /*.nextInChain=*/NULL _wgpu_COMMA \
  3315. /*.concurrentRead=*/WGPU_FALSE _wgpu_COMMA \
  3316. /*.initialized=*/WGPU_FALSE _wgpu_COMMA \
  3317. /*.fenceCount=*/0 _wgpu_COMMA \
  3318. /*.fences=*/NULL _wgpu_COMMA \
  3319. /*.signaledValues=*/NULL _wgpu_COMMA \
  3320. })
  3321. // Can be chained in WGPUSharedTextureMemoryDescriptor
  3322. typedef struct WGPUSharedTextureMemoryDmaBufDescriptor {
  3323. WGPUChainedStruct chain;
  3324. WGPUExtent3D size;
  3325. uint32_t drmFormat;
  3326. uint64_t drmModifier;
  3327. size_t planeCount;
  3328. WGPUSharedTextureMemoryDmaBufPlane const * planes;
  3329. } WGPUSharedTextureMemoryDmaBufDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3330. #define WGPU_SHARED_TEXTURE_MEMORY_DMA_BUF_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryDmaBufDescriptor, { \
  3331. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  3332. /*.next=*/NULL _wgpu_COMMA \
  3333. /*.sType=*/WGPUSType_SharedTextureMemoryDmaBufDescriptor _wgpu_COMMA \
  3334. }) _wgpu_COMMA \
  3335. /*.size=*/WGPU_EXTENT_3D_INIT _wgpu_COMMA \
  3336. /*.drmFormat=*/0 _wgpu_COMMA \
  3337. /*.drmModifier=*/0 _wgpu_COMMA \
  3338. /*.planeCount=*/0 _wgpu_COMMA \
  3339. /*.planes=*/NULL _wgpu_COMMA \
  3340. })
  3341. // Can be chained in WGPUSharedTextureMemoryEndAccessState
  3342. typedef struct WGPUSharedTextureMemoryMetalEndAccessState {
  3343. WGPUChainedStruct chain;
  3344. WGPUFuture commandsScheduledFuture;
  3345. } WGPUSharedTextureMemoryMetalEndAccessState WGPU_STRUCTURE_ATTRIBUTE;
  3346. #define WGPU_SHARED_TEXTURE_MEMORY_METAL_END_ACCESS_STATE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryMetalEndAccessState, { \
  3347. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  3348. /*.next=*/NULL _wgpu_COMMA \
  3349. /*.sType=*/WGPUSType_SharedTextureMemoryMetalEndAccessState _wgpu_COMMA \
  3350. }) _wgpu_COMMA \
  3351. /*.commandsScheduledFuture=*/WGPU_FUTURE_INIT _wgpu_COMMA \
  3352. })
  3353. typedef struct WGPUSurfaceDescriptor {
  3354. WGPUChainedStruct * nextInChain;
  3355. WGPUStringView label;
  3356. } WGPUSurfaceDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3357. #define WGPU_SURFACE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSurfaceDescriptor, { \
  3358. /*.nextInChain=*/NULL _wgpu_COMMA \
  3359. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3360. })
  3361. typedef struct WGPUTexelCopyBufferInfo {
  3362. WGPUTexelCopyBufferLayout layout;
  3363. WGPUBuffer buffer;
  3364. } WGPUTexelCopyBufferInfo WGPU_STRUCTURE_ATTRIBUTE;
  3365. #define WGPU_TEXEL_COPY_BUFFER_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTexelCopyBufferInfo, { \
  3366. /*.layout=*/WGPU_TEXEL_COPY_BUFFER_LAYOUT_INIT _wgpu_COMMA \
  3367. /*.buffer=*/NULL _wgpu_COMMA \
  3368. })
  3369. typedef struct WGPUTexelCopyTextureInfo {
  3370. WGPUTexture texture;
  3371. uint32_t mipLevel;
  3372. WGPUOrigin3D origin;
  3373. WGPUTextureAspect aspect;
  3374. } WGPUTexelCopyTextureInfo WGPU_STRUCTURE_ATTRIBUTE;
  3375. #define WGPU_TEXEL_COPY_TEXTURE_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTexelCopyTextureInfo, { \
  3376. /*.texture=*/NULL _wgpu_COMMA \
  3377. /*.mipLevel=*/0 _wgpu_COMMA \
  3378. /*.origin=*/WGPU_ORIGIN_3D_INIT _wgpu_COMMA \
  3379. /*.aspect=*/WGPUTextureAspect_Undefined _wgpu_COMMA \
  3380. })
  3381. // Can be chained in WGPUTextureViewDescriptor
  3382. typedef struct WGPUTextureComponentSwizzleDescriptor {
  3383. WGPUChainedStruct chain;
  3384. WGPUTextureComponentSwizzle swizzle;
  3385. } WGPUTextureComponentSwizzleDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3386. #define WGPU_TEXTURE_COMPONENT_SWIZZLE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTextureComponentSwizzleDescriptor, { \
  3387. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  3388. /*.next=*/NULL _wgpu_COMMA \
  3389. /*.sType=*/WGPUSType_TextureComponentSwizzleDescriptor _wgpu_COMMA \
  3390. }) _wgpu_COMMA \
  3391. /*.swizzle=*/WGPU_TEXTURE_COMPONENT_SWIZZLE_INIT _wgpu_COMMA \
  3392. })
  3393. typedef struct WGPUTextureDescriptor {
  3394. WGPUChainedStruct * nextInChain;
  3395. WGPUStringView label;
  3396. WGPUTextureUsage usage;
  3397. WGPUTextureDimension dimension;
  3398. WGPUExtent3D size;
  3399. WGPUTextureFormat format;
  3400. uint32_t mipLevelCount;
  3401. uint32_t sampleCount;
  3402. size_t viewFormatCount;
  3403. WGPUTextureFormat const * viewFormats;
  3404. } WGPUTextureDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3405. #define WGPU_TEXTURE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTextureDescriptor, { \
  3406. /*.nextInChain=*/NULL _wgpu_COMMA \
  3407. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3408. /*.usage=*/WGPUTextureUsage_None _wgpu_COMMA \
  3409. /*.dimension=*/WGPUTextureDimension_Undefined _wgpu_COMMA \
  3410. /*.size=*/WGPU_EXTENT_3D_INIT _wgpu_COMMA \
  3411. /*.format=*/WGPUTextureFormat_Undefined _wgpu_COMMA \
  3412. /*.mipLevelCount=*/1 _wgpu_COMMA \
  3413. /*.sampleCount=*/1 _wgpu_COMMA \
  3414. /*.viewFormatCount=*/0 _wgpu_COMMA \
  3415. /*.viewFormats=*/NULL _wgpu_COMMA \
  3416. })
  3417. typedef struct WGPUVertexBufferLayout {
  3418. WGPUChainedStruct * nextInChain;
  3419. WGPUVertexStepMode stepMode;
  3420. uint64_t arrayStride;
  3421. size_t attributeCount;
  3422. WGPUVertexAttribute const * attributes;
  3423. } WGPUVertexBufferLayout WGPU_STRUCTURE_ATTRIBUTE;
  3424. #define WGPU_VERTEX_BUFFER_LAYOUT_INIT _wgpu_MAKE_INIT_STRUCT(WGPUVertexBufferLayout, { \
  3425. /*.nextInChain=*/NULL _wgpu_COMMA \
  3426. /*.stepMode=*/WGPUVertexStepMode_Undefined _wgpu_COMMA \
  3427. /*.arrayStride=*/0 _wgpu_COMMA \
  3428. /*.attributeCount=*/0 _wgpu_COMMA \
  3429. /*.attributes=*/NULL _wgpu_COMMA \
  3430. })
  3431. typedef struct WGPUAdapterInfo {
  3432. WGPUChainedStruct * nextInChain;
  3433. WGPUStringView vendor;
  3434. WGPUStringView architecture;
  3435. WGPUStringView device;
  3436. WGPUStringView description;
  3437. WGPUBackendType backendType;
  3438. WGPUAdapterType adapterType;
  3439. uint32_t vendorID;
  3440. uint32_t deviceID;
  3441. uint32_t subgroupMinSize;
  3442. uint32_t subgroupMaxSize;
  3443. } WGPUAdapterInfo WGPU_STRUCTURE_ATTRIBUTE;
  3444. #define WGPU_ADAPTER_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUAdapterInfo, { \
  3445. /*.nextInChain=*/NULL _wgpu_COMMA \
  3446. /*.vendor=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3447. /*.architecture=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3448. /*.device=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3449. /*.description=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3450. /*.backendType=*/WGPUBackendType_Undefined _wgpu_COMMA \
  3451. /*.adapterType=*/_wgpu_ENUM_ZERO_INIT(WGPUAdapterType) _wgpu_COMMA \
  3452. /*.vendorID=*/0 _wgpu_COMMA \
  3453. /*.deviceID=*/0 _wgpu_COMMA \
  3454. /*.subgroupMinSize=*/0 _wgpu_COMMA \
  3455. /*.subgroupMaxSize=*/0 _wgpu_COMMA \
  3456. })
  3457. typedef struct WGPUBindGroupDescriptor {
  3458. WGPUChainedStruct * nextInChain;
  3459. WGPUStringView label;
  3460. WGPUBindGroupLayout layout;
  3461. size_t entryCount;
  3462. WGPUBindGroupEntry const * entries;
  3463. } WGPUBindGroupDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3464. #define WGPU_BIND_GROUP_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBindGroupDescriptor, { \
  3465. /*.nextInChain=*/NULL _wgpu_COMMA \
  3466. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3467. /*.layout=*/NULL _wgpu_COMMA \
  3468. /*.entryCount=*/0 _wgpu_COMMA \
  3469. /*.entries=*/NULL _wgpu_COMMA \
  3470. })
  3471. typedef struct WGPUBindGroupLayoutDescriptor {
  3472. WGPUChainedStruct * nextInChain;
  3473. WGPUStringView label;
  3474. size_t entryCount;
  3475. WGPUBindGroupLayoutEntry const * entries;
  3476. } WGPUBindGroupLayoutDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3477. #define WGPU_BIND_GROUP_LAYOUT_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBindGroupLayoutDescriptor, { \
  3478. /*.nextInChain=*/NULL _wgpu_COMMA \
  3479. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3480. /*.entryCount=*/0 _wgpu_COMMA \
  3481. /*.entries=*/NULL _wgpu_COMMA \
  3482. })
  3483. typedef struct WGPUColorTargetState {
  3484. WGPUChainedStruct * nextInChain;
  3485. WGPUTextureFormat format;
  3486. WGPU_NULLABLE WGPUBlendState const * blend;
  3487. WGPUColorWriteMask writeMask;
  3488. } WGPUColorTargetState WGPU_STRUCTURE_ATTRIBUTE;
  3489. #define WGPU_COLOR_TARGET_STATE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUColorTargetState, { \
  3490. /*.nextInChain=*/NULL _wgpu_COMMA \
  3491. /*.format=*/WGPUTextureFormat_Undefined _wgpu_COMMA \
  3492. /*.blend=*/NULL _wgpu_COMMA \
  3493. /*.writeMask=*/WGPUColorWriteMask_All _wgpu_COMMA \
  3494. })
  3495. typedef struct WGPUCompilationInfo {
  3496. WGPUChainedStruct * nextInChain;
  3497. size_t messageCount;
  3498. WGPUCompilationMessage const * messages;
  3499. } WGPUCompilationInfo WGPU_STRUCTURE_ATTRIBUTE;
  3500. #define WGPU_COMPILATION_INFO_INIT _wgpu_MAKE_INIT_STRUCT(WGPUCompilationInfo, { \
  3501. /*.nextInChain=*/NULL _wgpu_COMMA \
  3502. /*.messageCount=*/0 _wgpu_COMMA \
  3503. /*.messages=*/NULL _wgpu_COMMA \
  3504. })
  3505. typedef struct WGPUComputePipelineDescriptor {
  3506. WGPUChainedStruct * nextInChain;
  3507. WGPUStringView label;
  3508. WGPU_NULLABLE WGPUPipelineLayout layout;
  3509. WGPUComputeState compute;
  3510. } WGPUComputePipelineDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3511. #define WGPU_COMPUTE_PIPELINE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUComputePipelineDescriptor, { \
  3512. /*.nextInChain=*/NULL _wgpu_COMMA \
  3513. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3514. /*.layout=*/NULL _wgpu_COMMA \
  3515. /*.compute=*/WGPU_COMPUTE_STATE_INIT _wgpu_COMMA \
  3516. })
  3517. typedef struct WGPUDawnFormatCapabilities {
  3518. WGPUChainedStruct * nextInChain;
  3519. } WGPUDawnFormatCapabilities WGPU_STRUCTURE_ATTRIBUTE;
  3520. #define WGPU_DAWN_FORMAT_CAPABILITIES_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDawnFormatCapabilities, { \
  3521. /*.nextInChain=*/NULL _wgpu_COMMA \
  3522. })
  3523. typedef struct WGPUDeviceDescriptor {
  3524. WGPUChainedStruct * nextInChain;
  3525. WGPUStringView label;
  3526. size_t requiredFeatureCount;
  3527. WGPUFeatureName const * requiredFeatures;
  3528. WGPU_NULLABLE WGPULimits const * requiredLimits;
  3529. WGPUQueueDescriptor defaultQueue;
  3530. WGPUDeviceLostCallbackInfo deviceLostCallbackInfo;
  3531. WGPUUncapturedErrorCallbackInfo uncapturedErrorCallbackInfo;
  3532. } WGPUDeviceDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3533. #define WGPU_DEVICE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUDeviceDescriptor, { \
  3534. /*.nextInChain=*/NULL _wgpu_COMMA \
  3535. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3536. /*.requiredFeatureCount=*/0 _wgpu_COMMA \
  3537. /*.requiredFeatures=*/NULL _wgpu_COMMA \
  3538. /*.requiredLimits=*/NULL _wgpu_COMMA \
  3539. /*.defaultQueue=*/WGPU_QUEUE_DESCRIPTOR_INIT _wgpu_COMMA \
  3540. /*.deviceLostCallbackInfo=*/WGPU_DEVICE_LOST_CALLBACK_INFO_INIT _wgpu_COMMA \
  3541. /*.uncapturedErrorCallbackInfo=*/WGPU_UNCAPTURED_ERROR_CALLBACK_INFO_INIT _wgpu_COMMA \
  3542. })
  3543. typedef struct WGPUPipelineLayoutDescriptor {
  3544. WGPUChainedStruct * nextInChain;
  3545. WGPUStringView label;
  3546. size_t bindGroupLayoutCount;
  3547. WGPUBindGroupLayout const * bindGroupLayouts;
  3548. uint32_t immediateSize;
  3549. } WGPUPipelineLayoutDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3550. #define WGPU_PIPELINE_LAYOUT_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUPipelineLayoutDescriptor, { \
  3551. /*.nextInChain=*/NULL _wgpu_COMMA \
  3552. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3553. /*.bindGroupLayoutCount=*/0 _wgpu_COMMA \
  3554. /*.bindGroupLayouts=*/NULL _wgpu_COMMA \
  3555. /*.immediateSize=*/0 _wgpu_COMMA \
  3556. })
  3557. // Can be chained in WGPURenderPassDescriptor
  3558. typedef struct WGPURenderPassPixelLocalStorage {
  3559. WGPUChainedStruct chain;
  3560. uint64_t totalPixelLocalStorageSize;
  3561. size_t storageAttachmentCount;
  3562. WGPURenderPassStorageAttachment const * storageAttachments;
  3563. } WGPURenderPassPixelLocalStorage WGPU_STRUCTURE_ATTRIBUTE;
  3564. #define WGPU_RENDER_PASS_PIXEL_LOCAL_STORAGE_INIT _wgpu_MAKE_INIT_STRUCT(WGPURenderPassPixelLocalStorage, { \
  3565. /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
  3566. /*.next=*/NULL _wgpu_COMMA \
  3567. /*.sType=*/WGPUSType_RenderPassPixelLocalStorage _wgpu_COMMA \
  3568. }) _wgpu_COMMA \
  3569. /*.totalPixelLocalStorageSize=*/0 _wgpu_COMMA \
  3570. /*.storageAttachmentCount=*/0 _wgpu_COMMA \
  3571. /*.storageAttachments=*/NULL _wgpu_COMMA \
  3572. })
  3573. typedef struct WGPUSharedTextureMemoryDescriptor {
  3574. WGPUChainedStruct * nextInChain;
  3575. WGPUStringView label;
  3576. } WGPUSharedTextureMemoryDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3577. #define WGPU_SHARED_TEXTURE_MEMORY_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryDescriptor, { \
  3578. /*.nextInChain=*/NULL _wgpu_COMMA \
  3579. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3580. })
  3581. typedef struct WGPUSharedTextureMemoryEndAccessState {
  3582. WGPUChainedStruct * nextInChain;
  3583. WGPUBool initialized;
  3584. size_t fenceCount;
  3585. WGPUSharedFence const * fences;
  3586. uint64_t const * signaledValues;
  3587. } WGPUSharedTextureMemoryEndAccessState WGPU_STRUCTURE_ATTRIBUTE;
  3588. #define WGPU_SHARED_TEXTURE_MEMORY_END_ACCESS_STATE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryEndAccessState, { \
  3589. /*.nextInChain=*/NULL _wgpu_COMMA \
  3590. /*.initialized=*/WGPU_FALSE _wgpu_COMMA \
  3591. /*.fenceCount=*/0 _wgpu_COMMA \
  3592. /*.fences=*/NULL _wgpu_COMMA \
  3593. /*.signaledValues=*/NULL _wgpu_COMMA \
  3594. })
  3595. typedef struct WGPUSharedTextureMemoryProperties {
  3596. WGPUChainedStruct * nextInChain;
  3597. WGPUTextureUsage usage;
  3598. WGPUExtent3D size;
  3599. WGPUTextureFormat format;
  3600. } WGPUSharedTextureMemoryProperties WGPU_STRUCTURE_ATTRIBUTE;
  3601. #define WGPU_SHARED_TEXTURE_MEMORY_PROPERTIES_INIT _wgpu_MAKE_INIT_STRUCT(WGPUSharedTextureMemoryProperties, { \
  3602. /*.nextInChain=*/NULL _wgpu_COMMA \
  3603. /*.usage=*/WGPUTextureUsage_None _wgpu_COMMA \
  3604. /*.size=*/WGPU_EXTENT_3D_INIT _wgpu_COMMA \
  3605. /*.format=*/WGPUTextureFormat_Undefined _wgpu_COMMA \
  3606. })
  3607. typedef struct WGPUTextureViewDescriptor {
  3608. WGPUChainedStruct * nextInChain;
  3609. WGPUStringView label;
  3610. WGPUTextureFormat format;
  3611. WGPUTextureViewDimension dimension;
  3612. uint32_t baseMipLevel;
  3613. uint32_t mipLevelCount;
  3614. uint32_t baseArrayLayer;
  3615. uint32_t arrayLayerCount;
  3616. WGPUTextureAspect aspect;
  3617. WGPUTextureUsage usage;
  3618. } WGPUTextureViewDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3619. #define WGPU_TEXTURE_VIEW_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUTextureViewDescriptor, { \
  3620. /*.nextInChain=*/NULL _wgpu_COMMA \
  3621. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3622. /*.format=*/WGPUTextureFormat_Undefined _wgpu_COMMA \
  3623. /*.dimension=*/WGPUTextureViewDimension_Undefined _wgpu_COMMA \
  3624. /*.baseMipLevel=*/0 _wgpu_COMMA \
  3625. /*.mipLevelCount=*/WGPU_MIP_LEVEL_COUNT_UNDEFINED _wgpu_COMMA \
  3626. /*.baseArrayLayer=*/0 _wgpu_COMMA \
  3627. /*.arrayLayerCount=*/WGPU_ARRAY_LAYER_COUNT_UNDEFINED _wgpu_COMMA \
  3628. /*.aspect=*/WGPUTextureAspect_Undefined _wgpu_COMMA \
  3629. /*.usage=*/WGPUTextureUsage_None _wgpu_COMMA \
  3630. })
  3631. typedef struct WGPUVertexState {
  3632. WGPUChainedStruct * nextInChain;
  3633. WGPUShaderModule module;
  3634. WGPUStringView entryPoint;
  3635. size_t constantCount;
  3636. WGPUConstantEntry const * constants;
  3637. size_t bufferCount;
  3638. WGPUVertexBufferLayout const * buffers;
  3639. } WGPUVertexState WGPU_STRUCTURE_ATTRIBUTE;
  3640. #define WGPU_VERTEX_STATE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUVertexState, { \
  3641. /*.nextInChain=*/NULL _wgpu_COMMA \
  3642. /*.module=*/NULL _wgpu_COMMA \
  3643. /*.entryPoint=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3644. /*.constantCount=*/0 _wgpu_COMMA \
  3645. /*.constants=*/NULL _wgpu_COMMA \
  3646. /*.bufferCount=*/0 _wgpu_COMMA \
  3647. /*.buffers=*/NULL _wgpu_COMMA \
  3648. })
  3649. typedef struct WGPUFragmentState {
  3650. WGPUChainedStruct * nextInChain;
  3651. WGPUShaderModule module;
  3652. WGPUStringView entryPoint;
  3653. size_t constantCount;
  3654. WGPUConstantEntry const * constants;
  3655. size_t targetCount;
  3656. WGPUColorTargetState const * targets;
  3657. } WGPUFragmentState WGPU_STRUCTURE_ATTRIBUTE;
  3658. #define WGPU_FRAGMENT_STATE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUFragmentState, { \
  3659. /*.nextInChain=*/NULL _wgpu_COMMA \
  3660. /*.module=*/NULL _wgpu_COMMA \
  3661. /*.entryPoint=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3662. /*.constantCount=*/0 _wgpu_COMMA \
  3663. /*.constants=*/NULL _wgpu_COMMA \
  3664. /*.targetCount=*/0 _wgpu_COMMA \
  3665. /*.targets=*/NULL _wgpu_COMMA \
  3666. })
  3667. typedef struct WGPURenderPassDescriptor {
  3668. WGPUChainedStruct * nextInChain;
  3669. WGPUStringView label;
  3670. size_t colorAttachmentCount;
  3671. WGPURenderPassColorAttachment const * colorAttachments;
  3672. WGPU_NULLABLE WGPURenderPassDepthStencilAttachment const * depthStencilAttachment;
  3673. WGPU_NULLABLE WGPUQuerySet occlusionQuerySet;
  3674. WGPU_NULLABLE WGPUPassTimestampWrites const * timestampWrites;
  3675. } WGPURenderPassDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3676. #define WGPU_RENDER_PASS_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPURenderPassDescriptor, { \
  3677. /*.nextInChain=*/NULL _wgpu_COMMA \
  3678. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3679. /*.colorAttachmentCount=*/0 _wgpu_COMMA \
  3680. /*.colorAttachments=*/NULL _wgpu_COMMA \
  3681. /*.depthStencilAttachment=*/NULL _wgpu_COMMA \
  3682. /*.occlusionQuerySet=*/NULL _wgpu_COMMA \
  3683. /*.timestampWrites=*/NULL _wgpu_COMMA \
  3684. })
  3685. typedef struct WGPURenderPipelineDescriptor {
  3686. WGPUChainedStruct * nextInChain;
  3687. WGPUStringView label;
  3688. WGPU_NULLABLE WGPUPipelineLayout layout;
  3689. WGPUVertexState vertex;
  3690. WGPUPrimitiveState primitive;
  3691. WGPU_NULLABLE WGPUDepthStencilState const * depthStencil;
  3692. WGPUMultisampleState multisample;
  3693. WGPU_NULLABLE WGPUFragmentState const * fragment;
  3694. } WGPURenderPipelineDescriptor WGPU_STRUCTURE_ATTRIBUTE;
  3695. #define WGPU_RENDER_PIPELINE_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPURenderPipelineDescriptor, { \
  3696. /*.nextInChain=*/NULL _wgpu_COMMA \
  3697. /*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
  3698. /*.layout=*/NULL _wgpu_COMMA \
  3699. /*.vertex=*/WGPU_VERTEX_STATE_INIT _wgpu_COMMA \
  3700. /*.primitive=*/WGPU_PRIMITIVE_STATE_INIT _wgpu_COMMA \
  3701. /*.depthStencil=*/NULL _wgpu_COMMA \
  3702. /*.multisample=*/WGPU_MULTISAMPLE_STATE_INIT _wgpu_COMMA \
  3703. /*.fragment=*/NULL _wgpu_COMMA \
  3704. })
  3705. #ifdef __cplusplus
  3706. extern "C" {
  3707. #endif
  3708. #if !defined(WGPU_SKIP_PROCS)
  3709. // TODO(374150686): Remove these Emscripten specific declarations from the
  3710. // header once they are fully deprecated.
  3711. WGPU_EXPORT WGPUDevice emscripten_webgpu_get_device(void);
  3712. // Global procs
  3713. typedef WGPUInstance (*WGPUProcCreateInstance)(WGPU_NULLABLE WGPUInstanceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3714. typedef void (*WGPUProcGetInstanceFeatures)(WGPUSupportedInstanceFeatures * features) WGPU_FUNCTION_ATTRIBUTE;
  3715. typedef WGPUStatus (*WGPUProcGetInstanceLimits)(WGPUInstanceLimits * limits) WGPU_FUNCTION_ATTRIBUTE;
  3716. typedef WGPUBool (*WGPUProcHasInstanceFeature)(WGPUInstanceFeatureName feature) WGPU_FUNCTION_ATTRIBUTE;
  3717. typedef WGPUProc (*WGPUProcGetProcAddress)(WGPUStringView procName) WGPU_FUNCTION_ATTRIBUTE;
  3718. // Procs of Adapter
  3719. typedef WGPUDevice (*WGPUProcAdapterCreateDevice)(WGPUAdapter adapter, WGPU_NULLABLE WGPUDeviceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3720. typedef void (*WGPUProcAdapterGetFeatures)(WGPUAdapter adapter, WGPUSupportedFeatures * features) WGPU_FUNCTION_ATTRIBUTE;
  3721. typedef WGPUStatus (*WGPUProcAdapterGetFormatCapabilities)(WGPUAdapter adapter, WGPUTextureFormat format, WGPUDawnFormatCapabilities * capabilities) WGPU_FUNCTION_ATTRIBUTE;
  3722. typedef WGPUStatus (*WGPUProcAdapterGetInfo)(WGPUAdapter adapter, WGPUAdapterInfo * info) WGPU_FUNCTION_ATTRIBUTE;
  3723. typedef WGPUInstance (*WGPUProcAdapterGetInstance)(WGPUAdapter adapter) WGPU_FUNCTION_ATTRIBUTE;
  3724. typedef WGPUStatus (*WGPUProcAdapterGetLimits)(WGPUAdapter adapter, WGPULimits * limits) WGPU_FUNCTION_ATTRIBUTE;
  3725. typedef WGPUBool (*WGPUProcAdapterHasFeature)(WGPUAdapter adapter, WGPUFeatureName feature) WGPU_FUNCTION_ATTRIBUTE;
  3726. typedef WGPUFuture (*WGPUProcAdapterRequestDevice)(WGPUAdapter adapter, WGPU_NULLABLE WGPUDeviceDescriptor const * descriptor, WGPURequestDeviceCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  3727. typedef void (*WGPUProcAdapterAddRef)(WGPUAdapter adapter) WGPU_FUNCTION_ATTRIBUTE;
  3728. typedef void (*WGPUProcAdapterRelease)(WGPUAdapter adapter) WGPU_FUNCTION_ATTRIBUTE;
  3729. // Procs of AdapterInfo
  3730. typedef void (*WGPUProcAdapterInfoFreeMembers)(WGPUAdapterInfo adapterInfo) WGPU_FUNCTION_ATTRIBUTE;
  3731. // Procs of AdapterPropertiesMemoryHeaps
  3732. typedef void (*WGPUProcAdapterPropertiesMemoryHeapsFreeMembers)(WGPUAdapterPropertiesMemoryHeaps adapterPropertiesMemoryHeaps) WGPU_FUNCTION_ATTRIBUTE;
  3733. // Procs of AdapterPropertiesSubgroupMatrixConfigs
  3734. typedef void (*WGPUProcAdapterPropertiesSubgroupMatrixConfigsFreeMembers)(WGPUAdapterPropertiesSubgroupMatrixConfigs adapterPropertiesSubgroupMatrixConfigs) WGPU_FUNCTION_ATTRIBUTE;
  3735. // Procs of BindGroup
  3736. typedef void (*WGPUProcBindGroupSetLabel)(WGPUBindGroup bindGroup, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3737. typedef void (*WGPUProcBindGroupAddRef)(WGPUBindGroup bindGroup) WGPU_FUNCTION_ATTRIBUTE;
  3738. typedef void (*WGPUProcBindGroupRelease)(WGPUBindGroup bindGroup) WGPU_FUNCTION_ATTRIBUTE;
  3739. // Procs of BindGroupLayout
  3740. typedef void (*WGPUProcBindGroupLayoutSetLabel)(WGPUBindGroupLayout bindGroupLayout, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3741. typedef void (*WGPUProcBindGroupLayoutAddRef)(WGPUBindGroupLayout bindGroupLayout) WGPU_FUNCTION_ATTRIBUTE;
  3742. typedef void (*WGPUProcBindGroupLayoutRelease)(WGPUBindGroupLayout bindGroupLayout) WGPU_FUNCTION_ATTRIBUTE;
  3743. // Procs of Buffer
  3744. typedef WGPUTexelBufferView (*WGPUProcBufferCreateTexelView)(WGPUBuffer buffer, WGPUTexelBufferViewDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3745. typedef void (*WGPUProcBufferDestroy)(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
  3746. typedef void const * (*WGPUProcBufferGetConstMappedRange)(WGPUBuffer buffer, size_t offset, size_t size) WGPU_FUNCTION_ATTRIBUTE;
  3747. typedef void * (*WGPUProcBufferGetMappedRange)(WGPUBuffer buffer, size_t offset, size_t size) WGPU_FUNCTION_ATTRIBUTE;
  3748. typedef WGPUBufferMapState (*WGPUProcBufferGetMapState)(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
  3749. typedef uint64_t (*WGPUProcBufferGetSize)(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
  3750. typedef WGPUBufferUsage (*WGPUProcBufferGetUsage)(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
  3751. typedef WGPUFuture (*WGPUProcBufferMapAsync)(WGPUBuffer buffer, WGPUMapMode mode, size_t offset, size_t size, WGPUBufferMapCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  3752. typedef WGPUStatus (*WGPUProcBufferReadMappedRange)(WGPUBuffer buffer, size_t offset, void * data, size_t size) WGPU_FUNCTION_ATTRIBUTE;
  3753. typedef void (*WGPUProcBufferSetLabel)(WGPUBuffer buffer, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3754. typedef void (*WGPUProcBufferUnmap)(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
  3755. typedef WGPUStatus (*WGPUProcBufferWriteMappedRange)(WGPUBuffer buffer, size_t offset, void const * data, size_t size) WGPU_FUNCTION_ATTRIBUTE;
  3756. typedef void (*WGPUProcBufferAddRef)(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
  3757. typedef void (*WGPUProcBufferRelease)(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
  3758. // Procs of CommandBuffer
  3759. typedef void (*WGPUProcCommandBufferSetLabel)(WGPUCommandBuffer commandBuffer, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3760. typedef void (*WGPUProcCommandBufferAddRef)(WGPUCommandBuffer commandBuffer) WGPU_FUNCTION_ATTRIBUTE;
  3761. typedef void (*WGPUProcCommandBufferRelease)(WGPUCommandBuffer commandBuffer) WGPU_FUNCTION_ATTRIBUTE;
  3762. // Procs of CommandEncoder
  3763. typedef WGPUComputePassEncoder (*WGPUProcCommandEncoderBeginComputePass)(WGPUCommandEncoder commandEncoder, WGPU_NULLABLE WGPUComputePassDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3764. typedef WGPURenderPassEncoder (*WGPUProcCommandEncoderBeginRenderPass)(WGPUCommandEncoder commandEncoder, WGPURenderPassDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3765. typedef void (*WGPUProcCommandEncoderClearBuffer)(WGPUCommandEncoder commandEncoder, WGPUBuffer buffer, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
  3766. typedef void (*WGPUProcCommandEncoderCopyBufferToBuffer)(WGPUCommandEncoder commandEncoder, WGPUBuffer source, uint64_t sourceOffset, WGPUBuffer destination, uint64_t destinationOffset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
  3767. typedef void (*WGPUProcCommandEncoderCopyBufferToTexture)(WGPUCommandEncoder commandEncoder, WGPUTexelCopyBufferInfo const * source, WGPUTexelCopyTextureInfo const * destination, WGPUExtent3D const * copySize) WGPU_FUNCTION_ATTRIBUTE;
  3768. typedef void (*WGPUProcCommandEncoderCopyTextureToBuffer)(WGPUCommandEncoder commandEncoder, WGPUTexelCopyTextureInfo const * source, WGPUTexelCopyBufferInfo const * destination, WGPUExtent3D const * copySize) WGPU_FUNCTION_ATTRIBUTE;
  3769. typedef void (*WGPUProcCommandEncoderCopyTextureToTexture)(WGPUCommandEncoder commandEncoder, WGPUTexelCopyTextureInfo const * source, WGPUTexelCopyTextureInfo const * destination, WGPUExtent3D const * copySize) WGPU_FUNCTION_ATTRIBUTE;
  3770. typedef WGPUCommandBuffer (*WGPUProcCommandEncoderFinish)(WGPUCommandEncoder commandEncoder, WGPU_NULLABLE WGPUCommandBufferDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3771. typedef void (*WGPUProcCommandEncoderInjectValidationError)(WGPUCommandEncoder commandEncoder, WGPUStringView message) WGPU_FUNCTION_ATTRIBUTE;
  3772. typedef void (*WGPUProcCommandEncoderInsertDebugMarker)(WGPUCommandEncoder commandEncoder, WGPUStringView markerLabel) WGPU_FUNCTION_ATTRIBUTE;
  3773. typedef void (*WGPUProcCommandEncoderPopDebugGroup)(WGPUCommandEncoder commandEncoder) WGPU_FUNCTION_ATTRIBUTE;
  3774. typedef void (*WGPUProcCommandEncoderPushDebugGroup)(WGPUCommandEncoder commandEncoder, WGPUStringView groupLabel) WGPU_FUNCTION_ATTRIBUTE;
  3775. typedef void (*WGPUProcCommandEncoderResolveQuerySet)(WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint32_t firstQuery, uint32_t queryCount, WGPUBuffer destination, uint64_t destinationOffset) WGPU_FUNCTION_ATTRIBUTE;
  3776. typedef void (*WGPUProcCommandEncoderSetLabel)(WGPUCommandEncoder commandEncoder, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3777. typedef void (*WGPUProcCommandEncoderSetResourceTable)(WGPUCommandEncoder commandEncoder, WGPU_NULLABLE WGPUResourceTable table) WGPU_FUNCTION_ATTRIBUTE;
  3778. typedef void (*WGPUProcCommandEncoderWriteBuffer)(WGPUCommandEncoder commandEncoder, WGPUBuffer buffer, uint64_t bufferOffset, uint8_t const * data, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
  3779. typedef void (*WGPUProcCommandEncoderWriteTimestamp)(WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint32_t queryIndex) WGPU_FUNCTION_ATTRIBUTE;
  3780. typedef void (*WGPUProcCommandEncoderAddRef)(WGPUCommandEncoder commandEncoder) WGPU_FUNCTION_ATTRIBUTE;
  3781. typedef void (*WGPUProcCommandEncoderRelease)(WGPUCommandEncoder commandEncoder) WGPU_FUNCTION_ATTRIBUTE;
  3782. // Procs of ComputePassEncoder
  3783. typedef void (*WGPUProcComputePassEncoderDispatchWorkgroups)(WGPUComputePassEncoder computePassEncoder, uint32_t workgroupCountX, uint32_t workgroupCountY, uint32_t workgroupCountZ) WGPU_FUNCTION_ATTRIBUTE;
  3784. typedef void (*WGPUProcComputePassEncoderDispatchWorkgroupsIndirect)(WGPUComputePassEncoder computePassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
  3785. typedef void (*WGPUProcComputePassEncoderEnd)(WGPUComputePassEncoder computePassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  3786. typedef void (*WGPUProcComputePassEncoderInsertDebugMarker)(WGPUComputePassEncoder computePassEncoder, WGPUStringView markerLabel) WGPU_FUNCTION_ATTRIBUTE;
  3787. typedef void (*WGPUProcComputePassEncoderPopDebugGroup)(WGPUComputePassEncoder computePassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  3788. typedef void (*WGPUProcComputePassEncoderPushDebugGroup)(WGPUComputePassEncoder computePassEncoder, WGPUStringView groupLabel) WGPU_FUNCTION_ATTRIBUTE;
  3789. typedef void (*WGPUProcComputePassEncoderSetBindGroup)(WGPUComputePassEncoder computePassEncoder, uint32_t groupIndex, WGPU_NULLABLE WGPUBindGroup group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) WGPU_FUNCTION_ATTRIBUTE;
  3790. typedef void (*WGPUProcComputePassEncoderSetImmediates)(WGPUComputePassEncoder computePassEncoder, uint32_t offset, void const * data, size_t size) WGPU_FUNCTION_ATTRIBUTE;
  3791. typedef void (*WGPUProcComputePassEncoderSetLabel)(WGPUComputePassEncoder computePassEncoder, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3792. typedef void (*WGPUProcComputePassEncoderSetPipeline)(WGPUComputePassEncoder computePassEncoder, WGPUComputePipeline pipeline) WGPU_FUNCTION_ATTRIBUTE;
  3793. typedef void (*WGPUProcComputePassEncoderWriteTimestamp)(WGPUComputePassEncoder computePassEncoder, WGPUQuerySet querySet, uint32_t queryIndex) WGPU_FUNCTION_ATTRIBUTE;
  3794. typedef void (*WGPUProcComputePassEncoderAddRef)(WGPUComputePassEncoder computePassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  3795. typedef void (*WGPUProcComputePassEncoderRelease)(WGPUComputePassEncoder computePassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  3796. // Procs of ComputePipeline
  3797. typedef WGPUBindGroupLayout (*WGPUProcComputePipelineGetBindGroupLayout)(WGPUComputePipeline computePipeline, uint32_t groupIndex) WGPU_FUNCTION_ATTRIBUTE;
  3798. typedef void (*WGPUProcComputePipelineSetLabel)(WGPUComputePipeline computePipeline, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3799. typedef void (*WGPUProcComputePipelineAddRef)(WGPUComputePipeline computePipeline) WGPU_FUNCTION_ATTRIBUTE;
  3800. typedef void (*WGPUProcComputePipelineRelease)(WGPUComputePipeline computePipeline) WGPU_FUNCTION_ATTRIBUTE;
  3801. // Procs of DawnDrmFormatCapabilities
  3802. typedef void (*WGPUProcDawnDrmFormatCapabilitiesFreeMembers)(WGPUDawnDrmFormatCapabilities dawnDrmFormatCapabilities) WGPU_FUNCTION_ATTRIBUTE;
  3803. // Procs of Device
  3804. typedef WGPUBindGroup (*WGPUProcDeviceCreateBindGroup)(WGPUDevice device, WGPUBindGroupDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3805. typedef WGPUBindGroupLayout (*WGPUProcDeviceCreateBindGroupLayout)(WGPUDevice device, WGPUBindGroupLayoutDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3806. typedef WGPU_NULLABLE WGPUBuffer (*WGPUProcDeviceCreateBuffer)(WGPUDevice device, WGPUBufferDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3807. typedef WGPUCommandEncoder (*WGPUProcDeviceCreateCommandEncoder)(WGPUDevice device, WGPU_NULLABLE WGPUCommandEncoderDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3808. typedef WGPUComputePipeline (*WGPUProcDeviceCreateComputePipeline)(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3809. typedef WGPUFuture (*WGPUProcDeviceCreateComputePipelineAsync)(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor, WGPUCreateComputePipelineAsyncCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  3810. typedef WGPUBuffer (*WGPUProcDeviceCreateErrorBuffer)(WGPUDevice device, WGPUBufferDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3811. typedef WGPUExternalTexture (*WGPUProcDeviceCreateErrorExternalTexture)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
  3812. typedef WGPUShaderModule (*WGPUProcDeviceCreateErrorShaderModule)(WGPUDevice device, WGPUShaderModuleDescriptor const * descriptor, WGPUStringView errorMessage) WGPU_FUNCTION_ATTRIBUTE;
  3813. typedef WGPUTexture (*WGPUProcDeviceCreateErrorTexture)(WGPUDevice device, WGPUTextureDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3814. typedef WGPUExternalTexture (*WGPUProcDeviceCreateExternalTexture)(WGPUDevice device, WGPUExternalTextureDescriptor const * externalTextureDescriptor) WGPU_FUNCTION_ATTRIBUTE;
  3815. typedef WGPUPipelineLayout (*WGPUProcDeviceCreatePipelineLayout)(WGPUDevice device, WGPUPipelineLayoutDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3816. typedef WGPUQuerySet (*WGPUProcDeviceCreateQuerySet)(WGPUDevice device, WGPUQuerySetDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3817. typedef WGPURenderBundleEncoder (*WGPUProcDeviceCreateRenderBundleEncoder)(WGPUDevice device, WGPURenderBundleEncoderDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3818. typedef WGPURenderPipeline (*WGPUProcDeviceCreateRenderPipeline)(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3819. typedef WGPUFuture (*WGPUProcDeviceCreateRenderPipelineAsync)(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor, WGPUCreateRenderPipelineAsyncCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  3820. typedef WGPUResourceTable (*WGPUProcDeviceCreateResourceTable)(WGPUDevice device, WGPUResourceTableDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3821. typedef WGPUSampler (*WGPUProcDeviceCreateSampler)(WGPUDevice device, WGPU_NULLABLE WGPUSamplerDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3822. typedef WGPUShaderModule (*WGPUProcDeviceCreateShaderModule)(WGPUDevice device, WGPUShaderModuleDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3823. typedef WGPUTexture (*WGPUProcDeviceCreateTexture)(WGPUDevice device, WGPUTextureDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3824. typedef void (*WGPUProcDeviceDestroy)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
  3825. typedef void (*WGPUProcDeviceForceLoss)(WGPUDevice device, WGPUDeviceLostReason type, WGPUStringView message) WGPU_FUNCTION_ATTRIBUTE;
  3826. typedef WGPUAdapter (*WGPUProcDeviceGetAdapter)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
  3827. typedef WGPUStatus (*WGPUProcDeviceGetAdapterInfo)(WGPUDevice device, WGPUAdapterInfo * adapterInfo) WGPU_FUNCTION_ATTRIBUTE;
  3828. typedef WGPUStatus (*WGPUProcDeviceGetAHardwareBufferProperties)(WGPUDevice device, void * handle, WGPUAHardwareBufferProperties * properties) WGPU_FUNCTION_ATTRIBUTE;
  3829. typedef void (*WGPUProcDeviceGetFeatures)(WGPUDevice device, WGPUSupportedFeatures * features) WGPU_FUNCTION_ATTRIBUTE;
  3830. typedef WGPUStatus (*WGPUProcDeviceGetLimits)(WGPUDevice device, WGPULimits * limits) WGPU_FUNCTION_ATTRIBUTE;
  3831. typedef WGPUFuture (*WGPUProcDeviceGetLostFuture)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
  3832. typedef WGPUQueue (*WGPUProcDeviceGetQueue)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
  3833. typedef WGPUBool (*WGPUProcDeviceHasFeature)(WGPUDevice device, WGPUFeatureName feature) WGPU_FUNCTION_ATTRIBUTE;
  3834. typedef WGPUSharedBufferMemory (*WGPUProcDeviceImportSharedBufferMemory)(WGPUDevice device, WGPUSharedBufferMemoryDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3835. typedef WGPUSharedFence (*WGPUProcDeviceImportSharedFence)(WGPUDevice device, WGPUSharedFenceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3836. typedef WGPUSharedTextureMemory (*WGPUProcDeviceImportSharedTextureMemory)(WGPUDevice device, WGPUSharedTextureMemoryDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3837. typedef void (*WGPUProcDeviceInjectError)(WGPUDevice device, WGPUErrorType type, WGPUStringView message) WGPU_FUNCTION_ATTRIBUTE;
  3838. typedef WGPUFuture (*WGPUProcDevicePopErrorScope)(WGPUDevice device, WGPUPopErrorScopeCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  3839. typedef void (*WGPUProcDevicePushErrorScope)(WGPUDevice device, WGPUErrorFilter filter) WGPU_FUNCTION_ATTRIBUTE;
  3840. typedef void (*WGPUProcDeviceSetLabel)(WGPUDevice device, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3841. typedef void (*WGPUProcDeviceSetLoggingCallback)(WGPUDevice device, WGPULoggingCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  3842. typedef void (*WGPUProcDeviceTick)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
  3843. typedef void (*WGPUProcDeviceValidateTextureDescriptor)(WGPUDevice device, WGPUTextureDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3844. typedef void (*WGPUProcDeviceAddRef)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
  3845. typedef void (*WGPUProcDeviceRelease)(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
  3846. // Procs of ExternalTexture
  3847. typedef void (*WGPUProcExternalTextureDestroy)(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
  3848. typedef void (*WGPUProcExternalTextureExpire)(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
  3849. typedef void (*WGPUProcExternalTextureRefresh)(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
  3850. typedef void (*WGPUProcExternalTextureSetLabel)(WGPUExternalTexture externalTexture, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3851. typedef void (*WGPUProcExternalTextureAddRef)(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
  3852. typedef void (*WGPUProcExternalTextureRelease)(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
  3853. // Procs of Instance
  3854. typedef WGPUSurface (*WGPUProcInstanceCreateSurface)(WGPUInstance instance, WGPUSurfaceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3855. typedef void (*WGPUProcInstanceGetWGSLLanguageFeatures)(WGPUInstance instance, WGPUSupportedWGSLLanguageFeatures * features) WGPU_FUNCTION_ATTRIBUTE;
  3856. typedef WGPUBool (*WGPUProcInstanceHasWGSLLanguageFeature)(WGPUInstance instance, WGPUWGSLLanguageFeatureName feature) WGPU_FUNCTION_ATTRIBUTE;
  3857. typedef void (*WGPUProcInstanceProcessEvents)(WGPUInstance instance) WGPU_FUNCTION_ATTRIBUTE;
  3858. typedef WGPUFuture (*WGPUProcInstanceRequestAdapter)(WGPUInstance instance, WGPU_NULLABLE WGPURequestAdapterOptions const * options, WGPURequestAdapterCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  3859. typedef WGPUWaitStatus (*WGPUProcInstanceWaitAny)(WGPUInstance instance, size_t futureCount, WGPU_NULLABLE WGPUFutureWaitInfo * futures, uint64_t timeoutNS) WGPU_FUNCTION_ATTRIBUTE;
  3860. typedef void (*WGPUProcInstanceAddRef)(WGPUInstance instance) WGPU_FUNCTION_ATTRIBUTE;
  3861. typedef void (*WGPUProcInstanceRelease)(WGPUInstance instance) WGPU_FUNCTION_ATTRIBUTE;
  3862. // Procs of PipelineLayout
  3863. typedef void (*WGPUProcPipelineLayoutSetLabel)(WGPUPipelineLayout pipelineLayout, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3864. typedef void (*WGPUProcPipelineLayoutAddRef)(WGPUPipelineLayout pipelineLayout) WGPU_FUNCTION_ATTRIBUTE;
  3865. typedef void (*WGPUProcPipelineLayoutRelease)(WGPUPipelineLayout pipelineLayout) WGPU_FUNCTION_ATTRIBUTE;
  3866. // Procs of QuerySet
  3867. typedef void (*WGPUProcQuerySetDestroy)(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
  3868. typedef uint32_t (*WGPUProcQuerySetGetCount)(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
  3869. typedef WGPUQueryType (*WGPUProcQuerySetGetType)(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
  3870. typedef void (*WGPUProcQuerySetSetLabel)(WGPUQuerySet querySet, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3871. typedef void (*WGPUProcQuerySetAddRef)(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
  3872. typedef void (*WGPUProcQuerySetRelease)(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
  3873. // Procs of Queue
  3874. typedef void (*WGPUProcQueueCopyExternalTextureForBrowser)(WGPUQueue queue, WGPUImageCopyExternalTexture const * source, WGPUTexelCopyTextureInfo const * destination, WGPUExtent3D const * copySize, WGPUCopyTextureForBrowserOptions const * options) WGPU_FUNCTION_ATTRIBUTE;
  3875. typedef void (*WGPUProcQueueCopyTextureForBrowser)(WGPUQueue queue, WGPUTexelCopyTextureInfo const * source, WGPUTexelCopyTextureInfo const * destination, WGPUExtent3D const * copySize, WGPUCopyTextureForBrowserOptions const * options) WGPU_FUNCTION_ATTRIBUTE;
  3876. typedef WGPUFuture (*WGPUProcQueueOnSubmittedWorkDone)(WGPUQueue queue, WGPUQueueWorkDoneCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  3877. typedef void (*WGPUProcQueueSetLabel)(WGPUQueue queue, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3878. typedef void (*WGPUProcQueueSubmit)(WGPUQueue queue, size_t commandCount, WGPUCommandBuffer const * commands) WGPU_FUNCTION_ATTRIBUTE;
  3879. typedef void (*WGPUProcQueueWriteBuffer)(WGPUQueue queue, WGPUBuffer buffer, uint64_t bufferOffset, void const * data, size_t size) WGPU_FUNCTION_ATTRIBUTE;
  3880. typedef void (*WGPUProcQueueWriteTexture)(WGPUQueue queue, WGPUTexelCopyTextureInfo const * destination, void const * data, size_t dataSize, WGPUTexelCopyBufferLayout const * dataLayout, WGPUExtent3D const * writeSize) WGPU_FUNCTION_ATTRIBUTE;
  3881. typedef void (*WGPUProcQueueAddRef)(WGPUQueue queue) WGPU_FUNCTION_ATTRIBUTE;
  3882. typedef void (*WGPUProcQueueRelease)(WGPUQueue queue) WGPU_FUNCTION_ATTRIBUTE;
  3883. // Procs of RenderBundle
  3884. typedef void (*WGPUProcRenderBundleSetLabel)(WGPURenderBundle renderBundle, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3885. typedef void (*WGPUProcRenderBundleAddRef)(WGPURenderBundle renderBundle) WGPU_FUNCTION_ATTRIBUTE;
  3886. typedef void (*WGPUProcRenderBundleRelease)(WGPURenderBundle renderBundle) WGPU_FUNCTION_ATTRIBUTE;
  3887. // Procs of RenderBundleEncoder
  3888. typedef void (*WGPUProcRenderBundleEncoderDraw)(WGPURenderBundleEncoder renderBundleEncoder, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) WGPU_FUNCTION_ATTRIBUTE;
  3889. typedef void (*WGPUProcRenderBundleEncoderDrawIndexed)(WGPURenderBundleEncoder renderBundleEncoder, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance) WGPU_FUNCTION_ATTRIBUTE;
  3890. typedef void (*WGPUProcRenderBundleEncoderDrawIndexedIndirect)(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
  3891. typedef void (*WGPUProcRenderBundleEncoderDrawIndirect)(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
  3892. typedef WGPURenderBundle (*WGPUProcRenderBundleEncoderFinish)(WGPURenderBundleEncoder renderBundleEncoder, WGPU_NULLABLE WGPURenderBundleDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3893. typedef void (*WGPUProcRenderBundleEncoderInsertDebugMarker)(WGPURenderBundleEncoder renderBundleEncoder, WGPUStringView markerLabel) WGPU_FUNCTION_ATTRIBUTE;
  3894. typedef void (*WGPUProcRenderBundleEncoderPopDebugGroup)(WGPURenderBundleEncoder renderBundleEncoder) WGPU_FUNCTION_ATTRIBUTE;
  3895. typedef void (*WGPUProcRenderBundleEncoderPushDebugGroup)(WGPURenderBundleEncoder renderBundleEncoder, WGPUStringView groupLabel) WGPU_FUNCTION_ATTRIBUTE;
  3896. typedef void (*WGPUProcRenderBundleEncoderSetBindGroup)(WGPURenderBundleEncoder renderBundleEncoder, uint32_t groupIndex, WGPU_NULLABLE WGPUBindGroup group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) WGPU_FUNCTION_ATTRIBUTE;
  3897. typedef void (*WGPUProcRenderBundleEncoderSetImmediates)(WGPURenderBundleEncoder renderBundleEncoder, uint32_t offset, void const * data, size_t size) WGPU_FUNCTION_ATTRIBUTE;
  3898. typedef void (*WGPUProcRenderBundleEncoderSetIndexBuffer)(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
  3899. typedef void (*WGPUProcRenderBundleEncoderSetLabel)(WGPURenderBundleEncoder renderBundleEncoder, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3900. typedef void (*WGPUProcRenderBundleEncoderSetPipeline)(WGPURenderBundleEncoder renderBundleEncoder, WGPURenderPipeline pipeline) WGPU_FUNCTION_ATTRIBUTE;
  3901. typedef void (*WGPUProcRenderBundleEncoderSetVertexBuffer)(WGPURenderBundleEncoder renderBundleEncoder, uint32_t slot, WGPU_NULLABLE WGPUBuffer buffer, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
  3902. typedef void (*WGPUProcRenderBundleEncoderAddRef)(WGPURenderBundleEncoder renderBundleEncoder) WGPU_FUNCTION_ATTRIBUTE;
  3903. typedef void (*WGPUProcRenderBundleEncoderRelease)(WGPURenderBundleEncoder renderBundleEncoder) WGPU_FUNCTION_ATTRIBUTE;
  3904. // Procs of RenderPassEncoder
  3905. typedef void (*WGPUProcRenderPassEncoderBeginOcclusionQuery)(WGPURenderPassEncoder renderPassEncoder, uint32_t queryIndex) WGPU_FUNCTION_ATTRIBUTE;
  3906. typedef void (*WGPUProcRenderPassEncoderDraw)(WGPURenderPassEncoder renderPassEncoder, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) WGPU_FUNCTION_ATTRIBUTE;
  3907. typedef void (*WGPUProcRenderPassEncoderDrawIndexed)(WGPURenderPassEncoder renderPassEncoder, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance) WGPU_FUNCTION_ATTRIBUTE;
  3908. typedef void (*WGPUProcRenderPassEncoderDrawIndexedIndirect)(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
  3909. typedef void (*WGPUProcRenderPassEncoderDrawIndirect)(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
  3910. typedef void (*WGPUProcRenderPassEncoderEnd)(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  3911. typedef void (*WGPUProcRenderPassEncoderEndOcclusionQuery)(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  3912. typedef void (*WGPUProcRenderPassEncoderExecuteBundles)(WGPURenderPassEncoder renderPassEncoder, size_t bundleCount, WGPURenderBundle const * bundles) WGPU_FUNCTION_ATTRIBUTE;
  3913. typedef void (*WGPUProcRenderPassEncoderInsertDebugMarker)(WGPURenderPassEncoder renderPassEncoder, WGPUStringView markerLabel) WGPU_FUNCTION_ATTRIBUTE;
  3914. typedef void (*WGPUProcRenderPassEncoderMultiDrawIndexedIndirect)(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset, uint32_t maxDrawCount, WGPU_NULLABLE WGPUBuffer drawCountBuffer, uint64_t drawCountBufferOffset) WGPU_FUNCTION_ATTRIBUTE;
  3915. typedef void (*WGPUProcRenderPassEncoderMultiDrawIndirect)(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset, uint32_t maxDrawCount, WGPU_NULLABLE WGPUBuffer drawCountBuffer, uint64_t drawCountBufferOffset) WGPU_FUNCTION_ATTRIBUTE;
  3916. typedef void (*WGPUProcRenderPassEncoderPixelLocalStorageBarrier)(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  3917. typedef void (*WGPUProcRenderPassEncoderPopDebugGroup)(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  3918. typedef void (*WGPUProcRenderPassEncoderPushDebugGroup)(WGPURenderPassEncoder renderPassEncoder, WGPUStringView groupLabel) WGPU_FUNCTION_ATTRIBUTE;
  3919. typedef void (*WGPUProcRenderPassEncoderSetBindGroup)(WGPURenderPassEncoder renderPassEncoder, uint32_t groupIndex, WGPU_NULLABLE WGPUBindGroup group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) WGPU_FUNCTION_ATTRIBUTE;
  3920. typedef void (*WGPUProcRenderPassEncoderSetBlendConstant)(WGPURenderPassEncoder renderPassEncoder, WGPUColor const * color) WGPU_FUNCTION_ATTRIBUTE;
  3921. typedef void (*WGPUProcRenderPassEncoderSetImmediates)(WGPURenderPassEncoder renderPassEncoder, uint32_t offset, void const * data, size_t size) WGPU_FUNCTION_ATTRIBUTE;
  3922. typedef void (*WGPUProcRenderPassEncoderSetIndexBuffer)(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
  3923. typedef void (*WGPUProcRenderPassEncoderSetLabel)(WGPURenderPassEncoder renderPassEncoder, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3924. typedef void (*WGPUProcRenderPassEncoderSetPipeline)(WGPURenderPassEncoder renderPassEncoder, WGPURenderPipeline pipeline) WGPU_FUNCTION_ATTRIBUTE;
  3925. typedef void (*WGPUProcRenderPassEncoderSetScissorRect)(WGPURenderPassEncoder renderPassEncoder, uint32_t x, uint32_t y, uint32_t width, uint32_t height) WGPU_FUNCTION_ATTRIBUTE;
  3926. typedef void (*WGPUProcRenderPassEncoderSetStencilReference)(WGPURenderPassEncoder renderPassEncoder, uint32_t reference) WGPU_FUNCTION_ATTRIBUTE;
  3927. typedef void (*WGPUProcRenderPassEncoderSetVertexBuffer)(WGPURenderPassEncoder renderPassEncoder, uint32_t slot, WGPU_NULLABLE WGPUBuffer buffer, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
  3928. typedef void (*WGPUProcRenderPassEncoderSetViewport)(WGPURenderPassEncoder renderPassEncoder, float x, float y, float width, float height, float minDepth, float maxDepth) WGPU_FUNCTION_ATTRIBUTE;
  3929. typedef void (*WGPUProcRenderPassEncoderWriteTimestamp)(WGPURenderPassEncoder renderPassEncoder, WGPUQuerySet querySet, uint32_t queryIndex) WGPU_FUNCTION_ATTRIBUTE;
  3930. typedef void (*WGPUProcRenderPassEncoderAddRef)(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  3931. typedef void (*WGPUProcRenderPassEncoderRelease)(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  3932. // Procs of RenderPipeline
  3933. typedef WGPUBindGroupLayout (*WGPUProcRenderPipelineGetBindGroupLayout)(WGPURenderPipeline renderPipeline, uint32_t groupIndex) WGPU_FUNCTION_ATTRIBUTE;
  3934. typedef void (*WGPUProcRenderPipelineSetLabel)(WGPURenderPipeline renderPipeline, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3935. typedef void (*WGPUProcRenderPipelineAddRef)(WGPURenderPipeline renderPipeline) WGPU_FUNCTION_ATTRIBUTE;
  3936. typedef void (*WGPUProcRenderPipelineRelease)(WGPURenderPipeline renderPipeline) WGPU_FUNCTION_ATTRIBUTE;
  3937. // Procs of ResourceTable
  3938. typedef void (*WGPUProcResourceTableDestroy)(WGPUResourceTable resourceTable) WGPU_FUNCTION_ATTRIBUTE;
  3939. typedef uint32_t (*WGPUProcResourceTableGetSize)(WGPUResourceTable resourceTable) WGPU_FUNCTION_ATTRIBUTE;
  3940. typedef uint32_t (*WGPUProcResourceTableInsertBinding)(WGPUResourceTable resourceTable, WGPUBindingResource const * resource) WGPU_FUNCTION_ATTRIBUTE;
  3941. typedef WGPUStatus (*WGPUProcResourceTableRemoveBinding)(WGPUResourceTable resourceTable, uint32_t slot) WGPU_FUNCTION_ATTRIBUTE;
  3942. typedef WGPUStatus (*WGPUProcResourceTableUpdate)(WGPUResourceTable resourceTable, uint32_t slot, WGPUBindingResource const * resource) WGPU_FUNCTION_ATTRIBUTE;
  3943. typedef void (*WGPUProcResourceTableAddRef)(WGPUResourceTable resourceTable) WGPU_FUNCTION_ATTRIBUTE;
  3944. typedef void (*WGPUProcResourceTableRelease)(WGPUResourceTable resourceTable) WGPU_FUNCTION_ATTRIBUTE;
  3945. // Procs of Sampler
  3946. typedef void (*WGPUProcSamplerSetLabel)(WGPUSampler sampler, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3947. typedef void (*WGPUProcSamplerAddRef)(WGPUSampler sampler) WGPU_FUNCTION_ATTRIBUTE;
  3948. typedef void (*WGPUProcSamplerRelease)(WGPUSampler sampler) WGPU_FUNCTION_ATTRIBUTE;
  3949. // Procs of ShaderModule
  3950. typedef WGPUFuture (*WGPUProcShaderModuleGetCompilationInfo)(WGPUShaderModule shaderModule, WGPUCompilationInfoCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  3951. typedef void (*WGPUProcShaderModuleSetLabel)(WGPUShaderModule shaderModule, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3952. typedef void (*WGPUProcShaderModuleAddRef)(WGPUShaderModule shaderModule) WGPU_FUNCTION_ATTRIBUTE;
  3953. typedef void (*WGPUProcShaderModuleRelease)(WGPUShaderModule shaderModule) WGPU_FUNCTION_ATTRIBUTE;
  3954. // Procs of SharedBufferMemory
  3955. typedef WGPUStatus (*WGPUProcSharedBufferMemoryBeginAccess)(WGPUSharedBufferMemory sharedBufferMemory, WGPUBuffer buffer, WGPUSharedBufferMemoryBeginAccessDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3956. typedef WGPUBuffer (*WGPUProcSharedBufferMemoryCreateBuffer)(WGPUSharedBufferMemory sharedBufferMemory, WGPU_NULLABLE WGPUBufferDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3957. typedef WGPUStatus (*WGPUProcSharedBufferMemoryEndAccess)(WGPUSharedBufferMemory sharedBufferMemory, WGPUBuffer buffer, WGPUSharedBufferMemoryEndAccessState * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3958. typedef WGPUStatus (*WGPUProcSharedBufferMemoryGetProperties)(WGPUSharedBufferMemory sharedBufferMemory, WGPUSharedBufferMemoryProperties * properties) WGPU_FUNCTION_ATTRIBUTE;
  3959. typedef WGPUBool (*WGPUProcSharedBufferMemoryIsDeviceLost)(WGPUSharedBufferMemory sharedBufferMemory) WGPU_FUNCTION_ATTRIBUTE;
  3960. typedef void (*WGPUProcSharedBufferMemorySetLabel)(WGPUSharedBufferMemory sharedBufferMemory, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3961. typedef void (*WGPUProcSharedBufferMemoryAddRef)(WGPUSharedBufferMemory sharedBufferMemory) WGPU_FUNCTION_ATTRIBUTE;
  3962. typedef void (*WGPUProcSharedBufferMemoryRelease)(WGPUSharedBufferMemory sharedBufferMemory) WGPU_FUNCTION_ATTRIBUTE;
  3963. // Procs of SharedBufferMemoryEndAccessState
  3964. typedef void (*WGPUProcSharedBufferMemoryEndAccessStateFreeMembers)(WGPUSharedBufferMemoryEndAccessState sharedBufferMemoryEndAccessState) WGPU_FUNCTION_ATTRIBUTE;
  3965. // Procs of SharedFence
  3966. typedef void (*WGPUProcSharedFenceExportInfo)(WGPUSharedFence sharedFence, WGPUSharedFenceExportInfo * info) WGPU_FUNCTION_ATTRIBUTE;
  3967. typedef void (*WGPUProcSharedFenceAddRef)(WGPUSharedFence sharedFence) WGPU_FUNCTION_ATTRIBUTE;
  3968. typedef void (*WGPUProcSharedFenceRelease)(WGPUSharedFence sharedFence) WGPU_FUNCTION_ATTRIBUTE;
  3969. // Procs of SharedTextureMemory
  3970. typedef WGPUStatus (*WGPUProcSharedTextureMemoryBeginAccess)(WGPUSharedTextureMemory sharedTextureMemory, WGPUTexture texture, WGPUSharedTextureMemoryBeginAccessDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3971. typedef WGPUTexture (*WGPUProcSharedTextureMemoryCreateTexture)(WGPUSharedTextureMemory sharedTextureMemory, WGPU_NULLABLE WGPUTextureDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3972. typedef WGPUStatus (*WGPUProcSharedTextureMemoryEndAccess)(WGPUSharedTextureMemory sharedTextureMemory, WGPUTexture texture, WGPUSharedTextureMemoryEndAccessState * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  3973. typedef WGPUStatus (*WGPUProcSharedTextureMemoryGetProperties)(WGPUSharedTextureMemory sharedTextureMemory, WGPUSharedTextureMemoryProperties * properties) WGPU_FUNCTION_ATTRIBUTE;
  3974. typedef WGPUBool (*WGPUProcSharedTextureMemoryIsDeviceLost)(WGPUSharedTextureMemory sharedTextureMemory) WGPU_FUNCTION_ATTRIBUTE;
  3975. typedef void (*WGPUProcSharedTextureMemorySetLabel)(WGPUSharedTextureMemory sharedTextureMemory, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3976. typedef void (*WGPUProcSharedTextureMemoryAddRef)(WGPUSharedTextureMemory sharedTextureMemory) WGPU_FUNCTION_ATTRIBUTE;
  3977. typedef void (*WGPUProcSharedTextureMemoryRelease)(WGPUSharedTextureMemory sharedTextureMemory) WGPU_FUNCTION_ATTRIBUTE;
  3978. // Procs of SharedTextureMemoryEndAccessState
  3979. typedef void (*WGPUProcSharedTextureMemoryEndAccessStateFreeMembers)(WGPUSharedTextureMemoryEndAccessState sharedTextureMemoryEndAccessState) WGPU_FUNCTION_ATTRIBUTE;
  3980. // Procs of SupportedFeatures
  3981. typedef void (*WGPUProcSupportedFeaturesFreeMembers)(WGPUSupportedFeatures supportedFeatures) WGPU_FUNCTION_ATTRIBUTE;
  3982. // Procs of SupportedInstanceFeatures
  3983. typedef void (*WGPUProcSupportedInstanceFeaturesFreeMembers)(WGPUSupportedInstanceFeatures supportedInstanceFeatures) WGPU_FUNCTION_ATTRIBUTE;
  3984. // Procs of SupportedWGSLLanguageFeatures
  3985. typedef void (*WGPUProcSupportedWGSLLanguageFeaturesFreeMembers)(WGPUSupportedWGSLLanguageFeatures supportedWGSLLanguageFeatures) WGPU_FUNCTION_ATTRIBUTE;
  3986. // Procs of Surface
  3987. typedef void (*WGPUProcSurfaceConfigure)(WGPUSurface surface, WGPUSurfaceConfiguration const * config) WGPU_FUNCTION_ATTRIBUTE;
  3988. typedef WGPUStatus (*WGPUProcSurfaceGetCapabilities)(WGPUSurface surface, WGPUAdapter adapter, WGPUSurfaceCapabilities * capabilities) WGPU_FUNCTION_ATTRIBUTE;
  3989. typedef void (*WGPUProcSurfaceGetCurrentTexture)(WGPUSurface surface, WGPUSurfaceTexture * surfaceTexture) WGPU_FUNCTION_ATTRIBUTE;
  3990. typedef WGPUStatus (*WGPUProcSurfacePresent)(WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
  3991. typedef void (*WGPUProcSurfaceSetLabel)(WGPUSurface surface, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3992. typedef void (*WGPUProcSurfaceUnconfigure)(WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
  3993. typedef void (*WGPUProcSurfaceAddRef)(WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
  3994. typedef void (*WGPUProcSurfaceRelease)(WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
  3995. // Procs of SurfaceCapabilities
  3996. typedef void (*WGPUProcSurfaceCapabilitiesFreeMembers)(WGPUSurfaceCapabilities surfaceCapabilities) WGPU_FUNCTION_ATTRIBUTE;
  3997. // Procs of TexelBufferView
  3998. typedef void (*WGPUProcTexelBufferViewSetLabel)(WGPUTexelBufferView texelBufferView, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  3999. typedef void (*WGPUProcTexelBufferViewAddRef)(WGPUTexelBufferView texelBufferView) WGPU_FUNCTION_ATTRIBUTE;
  4000. typedef void (*WGPUProcTexelBufferViewRelease)(WGPUTexelBufferView texelBufferView) WGPU_FUNCTION_ATTRIBUTE;
  4001. // Procs of Texture
  4002. typedef WGPUTextureView (*WGPUProcTextureCreateErrorView)(WGPUTexture texture, WGPU_NULLABLE WGPUTextureViewDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4003. typedef WGPUTextureView (*WGPUProcTextureCreateView)(WGPUTexture texture, WGPU_NULLABLE WGPUTextureViewDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4004. typedef void (*WGPUProcTextureDestroy)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4005. typedef uint32_t (*WGPUProcTextureGetDepthOrArrayLayers)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4006. typedef WGPUTextureDimension (*WGPUProcTextureGetDimension)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4007. typedef WGPUTextureFormat (*WGPUProcTextureGetFormat)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4008. typedef uint32_t (*WGPUProcTextureGetHeight)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4009. typedef uint32_t (*WGPUProcTextureGetMipLevelCount)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4010. typedef uint32_t (*WGPUProcTextureGetSampleCount)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4011. typedef WGPUTextureViewDimension (*WGPUProcTextureGetTextureBindingViewDimension)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4012. typedef WGPUTextureUsage (*WGPUProcTextureGetUsage)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4013. typedef uint32_t (*WGPUProcTextureGetWidth)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4014. typedef void (*WGPUProcTexturePin)(WGPUTexture texture, WGPUTextureUsage usage) WGPU_FUNCTION_ATTRIBUTE;
  4015. typedef void (*WGPUProcTextureSetLabel)(WGPUTexture texture, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4016. typedef void (*WGPUProcTextureSetOwnershipForMemoryDump)(WGPUTexture texture, uint64_t ownerGuid) WGPU_FUNCTION_ATTRIBUTE;
  4017. typedef void (*WGPUProcTextureUnpin)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4018. typedef void (*WGPUProcTextureAddRef)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4019. typedef void (*WGPUProcTextureRelease)(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4020. // Procs of TextureView
  4021. typedef void (*WGPUProcTextureViewSetLabel)(WGPUTextureView textureView, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4022. typedef void (*WGPUProcTextureViewAddRef)(WGPUTextureView textureView) WGPU_FUNCTION_ATTRIBUTE;
  4023. typedef void (*WGPUProcTextureViewRelease)(WGPUTextureView textureView) WGPU_FUNCTION_ATTRIBUTE;
  4024. #endif // !defined(WGPU_SKIP_PROCS)
  4025. #if !defined(WGPU_SKIP_DECLARATIONS)
  4026. WGPU_EXPORT WGPUInstance wgpuCreateInstance(WGPU_NULLABLE WGPUInstanceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4027. WGPU_EXPORT void wgpuGetInstanceFeatures(WGPUSupportedInstanceFeatures * features) WGPU_FUNCTION_ATTRIBUTE;
  4028. WGPU_EXPORT WGPUStatus wgpuGetInstanceLimits(WGPUInstanceLimits * limits) WGPU_FUNCTION_ATTRIBUTE;
  4029. WGPU_EXPORT WGPUBool wgpuHasInstanceFeature(WGPUInstanceFeatureName feature) WGPU_FUNCTION_ATTRIBUTE;
  4030. WGPU_EXPORT WGPUProc wgpuGetProcAddress(WGPUStringView procName) WGPU_FUNCTION_ATTRIBUTE;
  4031. // Methods of Adapter
  4032. WGPU_EXPORT WGPUDevice wgpuAdapterCreateDevice(WGPUAdapter adapter, WGPU_NULLABLE WGPUDeviceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4033. WGPU_EXPORT void wgpuAdapterGetFeatures(WGPUAdapter adapter, WGPUSupportedFeatures * features) WGPU_FUNCTION_ATTRIBUTE;
  4034. WGPU_EXPORT WGPUStatus wgpuAdapterGetFormatCapabilities(WGPUAdapter adapter, WGPUTextureFormat format, WGPUDawnFormatCapabilities * capabilities) WGPU_FUNCTION_ATTRIBUTE;
  4035. WGPU_EXPORT WGPUStatus wgpuAdapterGetInfo(WGPUAdapter adapter, WGPUAdapterInfo * info) WGPU_FUNCTION_ATTRIBUTE;
  4036. WGPU_EXPORT WGPUInstance wgpuAdapterGetInstance(WGPUAdapter adapter) WGPU_FUNCTION_ATTRIBUTE;
  4037. WGPU_EXPORT WGPUStatus wgpuAdapterGetLimits(WGPUAdapter adapter, WGPULimits * limits) WGPU_FUNCTION_ATTRIBUTE;
  4038. WGPU_EXPORT WGPUBool wgpuAdapterHasFeature(WGPUAdapter adapter, WGPUFeatureName feature) WGPU_FUNCTION_ATTRIBUTE;
  4039. WGPU_EXPORT WGPUFuture wgpuAdapterRequestDevice(WGPUAdapter adapter, WGPU_NULLABLE WGPUDeviceDescriptor const * descriptor, WGPURequestDeviceCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  4040. WGPU_EXPORT void wgpuAdapterAddRef(WGPUAdapter adapter) WGPU_FUNCTION_ATTRIBUTE;
  4041. WGPU_EXPORT void wgpuAdapterRelease(WGPUAdapter adapter) WGPU_FUNCTION_ATTRIBUTE;
  4042. // Methods of AdapterInfo
  4043. WGPU_EXPORT void wgpuAdapterInfoFreeMembers(WGPUAdapterInfo adapterInfo) WGPU_FUNCTION_ATTRIBUTE;
  4044. // Methods of AdapterPropertiesMemoryHeaps
  4045. WGPU_EXPORT void wgpuAdapterPropertiesMemoryHeapsFreeMembers(WGPUAdapterPropertiesMemoryHeaps adapterPropertiesMemoryHeaps) WGPU_FUNCTION_ATTRIBUTE;
  4046. // Methods of AdapterPropertiesSubgroupMatrixConfigs
  4047. WGPU_EXPORT void wgpuAdapterPropertiesSubgroupMatrixConfigsFreeMembers(WGPUAdapterPropertiesSubgroupMatrixConfigs adapterPropertiesSubgroupMatrixConfigs) WGPU_FUNCTION_ATTRIBUTE;
  4048. // Methods of BindGroup
  4049. WGPU_EXPORT void wgpuBindGroupSetLabel(WGPUBindGroup bindGroup, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4050. WGPU_EXPORT void wgpuBindGroupAddRef(WGPUBindGroup bindGroup) WGPU_FUNCTION_ATTRIBUTE;
  4051. WGPU_EXPORT void wgpuBindGroupRelease(WGPUBindGroup bindGroup) WGPU_FUNCTION_ATTRIBUTE;
  4052. // Methods of BindGroupLayout
  4053. WGPU_EXPORT void wgpuBindGroupLayoutSetLabel(WGPUBindGroupLayout bindGroupLayout, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4054. WGPU_EXPORT void wgpuBindGroupLayoutAddRef(WGPUBindGroupLayout bindGroupLayout) WGPU_FUNCTION_ATTRIBUTE;
  4055. WGPU_EXPORT void wgpuBindGroupLayoutRelease(WGPUBindGroupLayout bindGroupLayout) WGPU_FUNCTION_ATTRIBUTE;
  4056. // Methods of Buffer
  4057. WGPU_EXPORT WGPUTexelBufferView wgpuBufferCreateTexelView(WGPUBuffer buffer, WGPUTexelBufferViewDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4058. WGPU_EXPORT void wgpuBufferDestroy(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
  4059. WGPU_EXPORT void const * wgpuBufferGetConstMappedRange(WGPUBuffer buffer, size_t offset, size_t size) WGPU_FUNCTION_ATTRIBUTE;
  4060. WGPU_EXPORT void * wgpuBufferGetMappedRange(WGPUBuffer buffer, size_t offset, size_t size) WGPU_FUNCTION_ATTRIBUTE;
  4061. WGPU_EXPORT WGPUBufferMapState wgpuBufferGetMapState(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
  4062. WGPU_EXPORT uint64_t wgpuBufferGetSize(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
  4063. WGPU_EXPORT WGPUBufferUsage wgpuBufferGetUsage(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
  4064. WGPU_EXPORT WGPUFuture wgpuBufferMapAsync(WGPUBuffer buffer, WGPUMapMode mode, size_t offset, size_t size, WGPUBufferMapCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  4065. WGPU_EXPORT WGPUStatus wgpuBufferReadMappedRange(WGPUBuffer buffer, size_t offset, void * data, size_t size) WGPU_FUNCTION_ATTRIBUTE;
  4066. WGPU_EXPORT void wgpuBufferSetLabel(WGPUBuffer buffer, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4067. WGPU_EXPORT void wgpuBufferUnmap(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
  4068. WGPU_EXPORT WGPUStatus wgpuBufferWriteMappedRange(WGPUBuffer buffer, size_t offset, void const * data, size_t size) WGPU_FUNCTION_ATTRIBUTE;
  4069. WGPU_EXPORT void wgpuBufferAddRef(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
  4070. WGPU_EXPORT void wgpuBufferRelease(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
  4071. // Methods of CommandBuffer
  4072. WGPU_EXPORT void wgpuCommandBufferSetLabel(WGPUCommandBuffer commandBuffer, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4073. WGPU_EXPORT void wgpuCommandBufferAddRef(WGPUCommandBuffer commandBuffer) WGPU_FUNCTION_ATTRIBUTE;
  4074. WGPU_EXPORT void wgpuCommandBufferRelease(WGPUCommandBuffer commandBuffer) WGPU_FUNCTION_ATTRIBUTE;
  4075. // Methods of CommandEncoder
  4076. WGPU_EXPORT WGPUComputePassEncoder wgpuCommandEncoderBeginComputePass(WGPUCommandEncoder commandEncoder, WGPU_NULLABLE WGPUComputePassDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4077. WGPU_EXPORT WGPURenderPassEncoder wgpuCommandEncoderBeginRenderPass(WGPUCommandEncoder commandEncoder, WGPURenderPassDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4078. WGPU_EXPORT void wgpuCommandEncoderClearBuffer(WGPUCommandEncoder commandEncoder, WGPUBuffer buffer, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
  4079. WGPU_EXPORT void wgpuCommandEncoderCopyBufferToBuffer(WGPUCommandEncoder commandEncoder, WGPUBuffer source, uint64_t sourceOffset, WGPUBuffer destination, uint64_t destinationOffset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
  4080. WGPU_EXPORT void wgpuCommandEncoderCopyBufferToTexture(WGPUCommandEncoder commandEncoder, WGPUTexelCopyBufferInfo const * source, WGPUTexelCopyTextureInfo const * destination, WGPUExtent3D const * copySize) WGPU_FUNCTION_ATTRIBUTE;
  4081. WGPU_EXPORT void wgpuCommandEncoderCopyTextureToBuffer(WGPUCommandEncoder commandEncoder, WGPUTexelCopyTextureInfo const * source, WGPUTexelCopyBufferInfo const * destination, WGPUExtent3D const * copySize) WGPU_FUNCTION_ATTRIBUTE;
  4082. WGPU_EXPORT void wgpuCommandEncoderCopyTextureToTexture(WGPUCommandEncoder commandEncoder, WGPUTexelCopyTextureInfo const * source, WGPUTexelCopyTextureInfo const * destination, WGPUExtent3D const * copySize) WGPU_FUNCTION_ATTRIBUTE;
  4083. WGPU_EXPORT WGPUCommandBuffer wgpuCommandEncoderFinish(WGPUCommandEncoder commandEncoder, WGPU_NULLABLE WGPUCommandBufferDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4084. WGPU_EXPORT void wgpuCommandEncoderInjectValidationError(WGPUCommandEncoder commandEncoder, WGPUStringView message) WGPU_FUNCTION_ATTRIBUTE;
  4085. WGPU_EXPORT void wgpuCommandEncoderInsertDebugMarker(WGPUCommandEncoder commandEncoder, WGPUStringView markerLabel) WGPU_FUNCTION_ATTRIBUTE;
  4086. WGPU_EXPORT void wgpuCommandEncoderPopDebugGroup(WGPUCommandEncoder commandEncoder) WGPU_FUNCTION_ATTRIBUTE;
  4087. WGPU_EXPORT void wgpuCommandEncoderPushDebugGroup(WGPUCommandEncoder commandEncoder, WGPUStringView groupLabel) WGPU_FUNCTION_ATTRIBUTE;
  4088. WGPU_EXPORT void wgpuCommandEncoderResolveQuerySet(WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint32_t firstQuery, uint32_t queryCount, WGPUBuffer destination, uint64_t destinationOffset) WGPU_FUNCTION_ATTRIBUTE;
  4089. WGPU_EXPORT void wgpuCommandEncoderSetLabel(WGPUCommandEncoder commandEncoder, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4090. WGPU_EXPORT void wgpuCommandEncoderSetResourceTable(WGPUCommandEncoder commandEncoder, WGPU_NULLABLE WGPUResourceTable table) WGPU_FUNCTION_ATTRIBUTE;
  4091. WGPU_EXPORT void wgpuCommandEncoderWriteBuffer(WGPUCommandEncoder commandEncoder, WGPUBuffer buffer, uint64_t bufferOffset, uint8_t const * data, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
  4092. WGPU_EXPORT void wgpuCommandEncoderWriteTimestamp(WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint32_t queryIndex) WGPU_FUNCTION_ATTRIBUTE;
  4093. WGPU_EXPORT void wgpuCommandEncoderAddRef(WGPUCommandEncoder commandEncoder) WGPU_FUNCTION_ATTRIBUTE;
  4094. WGPU_EXPORT void wgpuCommandEncoderRelease(WGPUCommandEncoder commandEncoder) WGPU_FUNCTION_ATTRIBUTE;
  4095. // Methods of ComputePassEncoder
  4096. WGPU_EXPORT void wgpuComputePassEncoderDispatchWorkgroups(WGPUComputePassEncoder computePassEncoder, uint32_t workgroupCountX, uint32_t workgroupCountY, uint32_t workgroupCountZ) WGPU_FUNCTION_ATTRIBUTE;
  4097. WGPU_EXPORT void wgpuComputePassEncoderDispatchWorkgroupsIndirect(WGPUComputePassEncoder computePassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
  4098. WGPU_EXPORT void wgpuComputePassEncoderEnd(WGPUComputePassEncoder computePassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  4099. WGPU_EXPORT void wgpuComputePassEncoderInsertDebugMarker(WGPUComputePassEncoder computePassEncoder, WGPUStringView markerLabel) WGPU_FUNCTION_ATTRIBUTE;
  4100. WGPU_EXPORT void wgpuComputePassEncoderPopDebugGroup(WGPUComputePassEncoder computePassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  4101. WGPU_EXPORT void wgpuComputePassEncoderPushDebugGroup(WGPUComputePassEncoder computePassEncoder, WGPUStringView groupLabel) WGPU_FUNCTION_ATTRIBUTE;
  4102. WGPU_EXPORT void wgpuComputePassEncoderSetBindGroup(WGPUComputePassEncoder computePassEncoder, uint32_t groupIndex, WGPU_NULLABLE WGPUBindGroup group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) WGPU_FUNCTION_ATTRIBUTE;
  4103. WGPU_EXPORT void wgpuComputePassEncoderSetImmediates(WGPUComputePassEncoder computePassEncoder, uint32_t offset, void const * data, size_t size) WGPU_FUNCTION_ATTRIBUTE;
  4104. WGPU_EXPORT void wgpuComputePassEncoderSetLabel(WGPUComputePassEncoder computePassEncoder, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4105. WGPU_EXPORT void wgpuComputePassEncoderSetPipeline(WGPUComputePassEncoder computePassEncoder, WGPUComputePipeline pipeline) WGPU_FUNCTION_ATTRIBUTE;
  4106. WGPU_EXPORT void wgpuComputePassEncoderWriteTimestamp(WGPUComputePassEncoder computePassEncoder, WGPUQuerySet querySet, uint32_t queryIndex) WGPU_FUNCTION_ATTRIBUTE;
  4107. WGPU_EXPORT void wgpuComputePassEncoderAddRef(WGPUComputePassEncoder computePassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  4108. WGPU_EXPORT void wgpuComputePassEncoderRelease(WGPUComputePassEncoder computePassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  4109. // Methods of ComputePipeline
  4110. WGPU_EXPORT WGPUBindGroupLayout wgpuComputePipelineGetBindGroupLayout(WGPUComputePipeline computePipeline, uint32_t groupIndex) WGPU_FUNCTION_ATTRIBUTE;
  4111. WGPU_EXPORT void wgpuComputePipelineSetLabel(WGPUComputePipeline computePipeline, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4112. WGPU_EXPORT void wgpuComputePipelineAddRef(WGPUComputePipeline computePipeline) WGPU_FUNCTION_ATTRIBUTE;
  4113. WGPU_EXPORT void wgpuComputePipelineRelease(WGPUComputePipeline computePipeline) WGPU_FUNCTION_ATTRIBUTE;
  4114. // Methods of DawnDrmFormatCapabilities
  4115. WGPU_EXPORT void wgpuDawnDrmFormatCapabilitiesFreeMembers(WGPUDawnDrmFormatCapabilities dawnDrmFormatCapabilities) WGPU_FUNCTION_ATTRIBUTE;
  4116. // Methods of Device
  4117. WGPU_EXPORT WGPUBindGroup wgpuDeviceCreateBindGroup(WGPUDevice device, WGPUBindGroupDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4118. WGPU_EXPORT WGPUBindGroupLayout wgpuDeviceCreateBindGroupLayout(WGPUDevice device, WGPUBindGroupLayoutDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4119. WGPU_EXPORT WGPU_NULLABLE WGPUBuffer wgpuDeviceCreateBuffer(WGPUDevice device, WGPUBufferDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4120. WGPU_EXPORT WGPUCommandEncoder wgpuDeviceCreateCommandEncoder(WGPUDevice device, WGPU_NULLABLE WGPUCommandEncoderDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4121. WGPU_EXPORT WGPUComputePipeline wgpuDeviceCreateComputePipeline(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4122. WGPU_EXPORT WGPUFuture wgpuDeviceCreateComputePipelineAsync(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor, WGPUCreateComputePipelineAsyncCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  4123. WGPU_EXPORT WGPUBuffer wgpuDeviceCreateErrorBuffer(WGPUDevice device, WGPUBufferDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4124. WGPU_EXPORT WGPUExternalTexture wgpuDeviceCreateErrorExternalTexture(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
  4125. WGPU_EXPORT WGPUShaderModule wgpuDeviceCreateErrorShaderModule(WGPUDevice device, WGPUShaderModuleDescriptor const * descriptor, WGPUStringView errorMessage) WGPU_FUNCTION_ATTRIBUTE;
  4126. WGPU_EXPORT WGPUTexture wgpuDeviceCreateErrorTexture(WGPUDevice device, WGPUTextureDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4127. WGPU_EXPORT WGPUExternalTexture wgpuDeviceCreateExternalTexture(WGPUDevice device, WGPUExternalTextureDescriptor const * externalTextureDescriptor) WGPU_FUNCTION_ATTRIBUTE;
  4128. WGPU_EXPORT WGPUPipelineLayout wgpuDeviceCreatePipelineLayout(WGPUDevice device, WGPUPipelineLayoutDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4129. WGPU_EXPORT WGPUQuerySet wgpuDeviceCreateQuerySet(WGPUDevice device, WGPUQuerySetDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4130. WGPU_EXPORT WGPURenderBundleEncoder wgpuDeviceCreateRenderBundleEncoder(WGPUDevice device, WGPURenderBundleEncoderDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4131. WGPU_EXPORT WGPURenderPipeline wgpuDeviceCreateRenderPipeline(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4132. WGPU_EXPORT WGPUFuture wgpuDeviceCreateRenderPipelineAsync(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor, WGPUCreateRenderPipelineAsyncCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  4133. WGPU_EXPORT WGPUResourceTable wgpuDeviceCreateResourceTable(WGPUDevice device, WGPUResourceTableDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4134. WGPU_EXPORT WGPUSampler wgpuDeviceCreateSampler(WGPUDevice device, WGPU_NULLABLE WGPUSamplerDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4135. WGPU_EXPORT WGPUShaderModule wgpuDeviceCreateShaderModule(WGPUDevice device, WGPUShaderModuleDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4136. WGPU_EXPORT WGPUTexture wgpuDeviceCreateTexture(WGPUDevice device, WGPUTextureDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4137. WGPU_EXPORT void wgpuDeviceDestroy(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
  4138. WGPU_EXPORT void wgpuDeviceForceLoss(WGPUDevice device, WGPUDeviceLostReason type, WGPUStringView message) WGPU_FUNCTION_ATTRIBUTE;
  4139. WGPU_EXPORT WGPUAdapter wgpuDeviceGetAdapter(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
  4140. WGPU_EXPORT WGPUStatus wgpuDeviceGetAdapterInfo(WGPUDevice device, WGPUAdapterInfo * adapterInfo) WGPU_FUNCTION_ATTRIBUTE;
  4141. WGPU_EXPORT WGPUStatus wgpuDeviceGetAHardwareBufferProperties(WGPUDevice device, void * handle, WGPUAHardwareBufferProperties * properties) WGPU_FUNCTION_ATTRIBUTE;
  4142. WGPU_EXPORT void wgpuDeviceGetFeatures(WGPUDevice device, WGPUSupportedFeatures * features) WGPU_FUNCTION_ATTRIBUTE;
  4143. WGPU_EXPORT WGPUStatus wgpuDeviceGetLimits(WGPUDevice device, WGPULimits * limits) WGPU_FUNCTION_ATTRIBUTE;
  4144. WGPU_EXPORT WGPUFuture wgpuDeviceGetLostFuture(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
  4145. WGPU_EXPORT WGPUQueue wgpuDeviceGetQueue(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
  4146. WGPU_EXPORT WGPUBool wgpuDeviceHasFeature(WGPUDevice device, WGPUFeatureName feature) WGPU_FUNCTION_ATTRIBUTE;
  4147. WGPU_EXPORT WGPUSharedBufferMemory wgpuDeviceImportSharedBufferMemory(WGPUDevice device, WGPUSharedBufferMemoryDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4148. WGPU_EXPORT WGPUSharedFence wgpuDeviceImportSharedFence(WGPUDevice device, WGPUSharedFenceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4149. WGPU_EXPORT WGPUSharedTextureMemory wgpuDeviceImportSharedTextureMemory(WGPUDevice device, WGPUSharedTextureMemoryDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4150. WGPU_EXPORT void wgpuDeviceInjectError(WGPUDevice device, WGPUErrorType type, WGPUStringView message) WGPU_FUNCTION_ATTRIBUTE;
  4151. WGPU_EXPORT WGPUFuture wgpuDevicePopErrorScope(WGPUDevice device, WGPUPopErrorScopeCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  4152. WGPU_EXPORT void wgpuDevicePushErrorScope(WGPUDevice device, WGPUErrorFilter filter) WGPU_FUNCTION_ATTRIBUTE;
  4153. WGPU_EXPORT void wgpuDeviceSetLabel(WGPUDevice device, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4154. WGPU_EXPORT void wgpuDeviceSetLoggingCallback(WGPUDevice device, WGPULoggingCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  4155. WGPU_EXPORT void wgpuDeviceTick(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
  4156. WGPU_EXPORT void wgpuDeviceValidateTextureDescriptor(WGPUDevice device, WGPUTextureDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4157. WGPU_EXPORT void wgpuDeviceAddRef(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
  4158. WGPU_EXPORT void wgpuDeviceRelease(WGPUDevice device) WGPU_FUNCTION_ATTRIBUTE;
  4159. // Methods of ExternalTexture
  4160. WGPU_EXPORT void wgpuExternalTextureDestroy(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
  4161. WGPU_EXPORT void wgpuExternalTextureExpire(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
  4162. WGPU_EXPORT void wgpuExternalTextureRefresh(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
  4163. WGPU_EXPORT void wgpuExternalTextureSetLabel(WGPUExternalTexture externalTexture, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4164. WGPU_EXPORT void wgpuExternalTextureAddRef(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
  4165. WGPU_EXPORT void wgpuExternalTextureRelease(WGPUExternalTexture externalTexture) WGPU_FUNCTION_ATTRIBUTE;
  4166. // Methods of Instance
  4167. WGPU_EXPORT WGPUSurface wgpuInstanceCreateSurface(WGPUInstance instance, WGPUSurfaceDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4168. WGPU_EXPORT void wgpuInstanceGetWGSLLanguageFeatures(WGPUInstance instance, WGPUSupportedWGSLLanguageFeatures * features) WGPU_FUNCTION_ATTRIBUTE;
  4169. WGPU_EXPORT WGPUBool wgpuInstanceHasWGSLLanguageFeature(WGPUInstance instance, WGPUWGSLLanguageFeatureName feature) WGPU_FUNCTION_ATTRIBUTE;
  4170. WGPU_EXPORT void wgpuInstanceProcessEvents(WGPUInstance instance) WGPU_FUNCTION_ATTRIBUTE;
  4171. WGPU_EXPORT WGPUFuture wgpuInstanceRequestAdapter(WGPUInstance instance, WGPU_NULLABLE WGPURequestAdapterOptions const * options, WGPURequestAdapterCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  4172. WGPU_EXPORT WGPUWaitStatus wgpuInstanceWaitAny(WGPUInstance instance, size_t futureCount, WGPU_NULLABLE WGPUFutureWaitInfo * futures, uint64_t timeoutNS) WGPU_FUNCTION_ATTRIBUTE;
  4173. WGPU_EXPORT void wgpuInstanceAddRef(WGPUInstance instance) WGPU_FUNCTION_ATTRIBUTE;
  4174. WGPU_EXPORT void wgpuInstanceRelease(WGPUInstance instance) WGPU_FUNCTION_ATTRIBUTE;
  4175. // Methods of PipelineLayout
  4176. WGPU_EXPORT void wgpuPipelineLayoutSetLabel(WGPUPipelineLayout pipelineLayout, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4177. WGPU_EXPORT void wgpuPipelineLayoutAddRef(WGPUPipelineLayout pipelineLayout) WGPU_FUNCTION_ATTRIBUTE;
  4178. WGPU_EXPORT void wgpuPipelineLayoutRelease(WGPUPipelineLayout pipelineLayout) WGPU_FUNCTION_ATTRIBUTE;
  4179. // Methods of QuerySet
  4180. WGPU_EXPORT void wgpuQuerySetDestroy(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
  4181. WGPU_EXPORT uint32_t wgpuQuerySetGetCount(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
  4182. WGPU_EXPORT WGPUQueryType wgpuQuerySetGetType(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
  4183. WGPU_EXPORT void wgpuQuerySetSetLabel(WGPUQuerySet querySet, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4184. WGPU_EXPORT void wgpuQuerySetAddRef(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
  4185. WGPU_EXPORT void wgpuQuerySetRelease(WGPUQuerySet querySet) WGPU_FUNCTION_ATTRIBUTE;
  4186. // Methods of Queue
  4187. WGPU_EXPORT void wgpuQueueCopyExternalTextureForBrowser(WGPUQueue queue, WGPUImageCopyExternalTexture const * source, WGPUTexelCopyTextureInfo const * destination, WGPUExtent3D const * copySize, WGPUCopyTextureForBrowserOptions const * options) WGPU_FUNCTION_ATTRIBUTE;
  4188. WGPU_EXPORT void wgpuQueueCopyTextureForBrowser(WGPUQueue queue, WGPUTexelCopyTextureInfo const * source, WGPUTexelCopyTextureInfo const * destination, WGPUExtent3D const * copySize, WGPUCopyTextureForBrowserOptions const * options) WGPU_FUNCTION_ATTRIBUTE;
  4189. WGPU_EXPORT WGPUFuture wgpuQueueOnSubmittedWorkDone(WGPUQueue queue, WGPUQueueWorkDoneCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  4190. WGPU_EXPORT void wgpuQueueSetLabel(WGPUQueue queue, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4191. WGPU_EXPORT void wgpuQueueSubmit(WGPUQueue queue, size_t commandCount, WGPUCommandBuffer const * commands) WGPU_FUNCTION_ATTRIBUTE;
  4192. WGPU_EXPORT void wgpuQueueWriteBuffer(WGPUQueue queue, WGPUBuffer buffer, uint64_t bufferOffset, void const * data, size_t size) WGPU_FUNCTION_ATTRIBUTE;
  4193. WGPU_EXPORT void wgpuQueueWriteTexture(WGPUQueue queue, WGPUTexelCopyTextureInfo const * destination, void const * data, size_t dataSize, WGPUTexelCopyBufferLayout const * dataLayout, WGPUExtent3D const * writeSize) WGPU_FUNCTION_ATTRIBUTE;
  4194. WGPU_EXPORT void wgpuQueueAddRef(WGPUQueue queue) WGPU_FUNCTION_ATTRIBUTE;
  4195. WGPU_EXPORT void wgpuQueueRelease(WGPUQueue queue) WGPU_FUNCTION_ATTRIBUTE;
  4196. // Methods of RenderBundle
  4197. WGPU_EXPORT void wgpuRenderBundleSetLabel(WGPURenderBundle renderBundle, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4198. WGPU_EXPORT void wgpuRenderBundleAddRef(WGPURenderBundle renderBundle) WGPU_FUNCTION_ATTRIBUTE;
  4199. WGPU_EXPORT void wgpuRenderBundleRelease(WGPURenderBundle renderBundle) WGPU_FUNCTION_ATTRIBUTE;
  4200. // Methods of RenderBundleEncoder
  4201. WGPU_EXPORT void wgpuRenderBundleEncoderDraw(WGPURenderBundleEncoder renderBundleEncoder, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) WGPU_FUNCTION_ATTRIBUTE;
  4202. WGPU_EXPORT void wgpuRenderBundleEncoderDrawIndexed(WGPURenderBundleEncoder renderBundleEncoder, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance) WGPU_FUNCTION_ATTRIBUTE;
  4203. WGPU_EXPORT void wgpuRenderBundleEncoderDrawIndexedIndirect(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
  4204. WGPU_EXPORT void wgpuRenderBundleEncoderDrawIndirect(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
  4205. WGPU_EXPORT WGPURenderBundle wgpuRenderBundleEncoderFinish(WGPURenderBundleEncoder renderBundleEncoder, WGPU_NULLABLE WGPURenderBundleDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4206. WGPU_EXPORT void wgpuRenderBundleEncoderInsertDebugMarker(WGPURenderBundleEncoder renderBundleEncoder, WGPUStringView markerLabel) WGPU_FUNCTION_ATTRIBUTE;
  4207. WGPU_EXPORT void wgpuRenderBundleEncoderPopDebugGroup(WGPURenderBundleEncoder renderBundleEncoder) WGPU_FUNCTION_ATTRIBUTE;
  4208. WGPU_EXPORT void wgpuRenderBundleEncoderPushDebugGroup(WGPURenderBundleEncoder renderBundleEncoder, WGPUStringView groupLabel) WGPU_FUNCTION_ATTRIBUTE;
  4209. WGPU_EXPORT void wgpuRenderBundleEncoderSetBindGroup(WGPURenderBundleEncoder renderBundleEncoder, uint32_t groupIndex, WGPU_NULLABLE WGPUBindGroup group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) WGPU_FUNCTION_ATTRIBUTE;
  4210. WGPU_EXPORT void wgpuRenderBundleEncoderSetImmediates(WGPURenderBundleEncoder renderBundleEncoder, uint32_t offset, void const * data, size_t size) WGPU_FUNCTION_ATTRIBUTE;
  4211. WGPU_EXPORT void wgpuRenderBundleEncoderSetIndexBuffer(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
  4212. WGPU_EXPORT void wgpuRenderBundleEncoderSetLabel(WGPURenderBundleEncoder renderBundleEncoder, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4213. WGPU_EXPORT void wgpuRenderBundleEncoderSetPipeline(WGPURenderBundleEncoder renderBundleEncoder, WGPURenderPipeline pipeline) WGPU_FUNCTION_ATTRIBUTE;
  4214. WGPU_EXPORT void wgpuRenderBundleEncoderSetVertexBuffer(WGPURenderBundleEncoder renderBundleEncoder, uint32_t slot, WGPU_NULLABLE WGPUBuffer buffer, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
  4215. WGPU_EXPORT void wgpuRenderBundleEncoderAddRef(WGPURenderBundleEncoder renderBundleEncoder) WGPU_FUNCTION_ATTRIBUTE;
  4216. WGPU_EXPORT void wgpuRenderBundleEncoderRelease(WGPURenderBundleEncoder renderBundleEncoder) WGPU_FUNCTION_ATTRIBUTE;
  4217. // Methods of RenderPassEncoder
  4218. WGPU_EXPORT void wgpuRenderPassEncoderBeginOcclusionQuery(WGPURenderPassEncoder renderPassEncoder, uint32_t queryIndex) WGPU_FUNCTION_ATTRIBUTE;
  4219. WGPU_EXPORT void wgpuRenderPassEncoderDraw(WGPURenderPassEncoder renderPassEncoder, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) WGPU_FUNCTION_ATTRIBUTE;
  4220. WGPU_EXPORT void wgpuRenderPassEncoderDrawIndexed(WGPURenderPassEncoder renderPassEncoder, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance) WGPU_FUNCTION_ATTRIBUTE;
  4221. WGPU_EXPORT void wgpuRenderPassEncoderDrawIndexedIndirect(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
  4222. WGPU_EXPORT void wgpuRenderPassEncoderDrawIndirect(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset) WGPU_FUNCTION_ATTRIBUTE;
  4223. WGPU_EXPORT void wgpuRenderPassEncoderEnd(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  4224. WGPU_EXPORT void wgpuRenderPassEncoderEndOcclusionQuery(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  4225. WGPU_EXPORT void wgpuRenderPassEncoderExecuteBundles(WGPURenderPassEncoder renderPassEncoder, size_t bundleCount, WGPURenderBundle const * bundles) WGPU_FUNCTION_ATTRIBUTE;
  4226. WGPU_EXPORT void wgpuRenderPassEncoderInsertDebugMarker(WGPURenderPassEncoder renderPassEncoder, WGPUStringView markerLabel) WGPU_FUNCTION_ATTRIBUTE;
  4227. WGPU_EXPORT void wgpuRenderPassEncoderMultiDrawIndexedIndirect(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset, uint32_t maxDrawCount, WGPU_NULLABLE WGPUBuffer drawCountBuffer, uint64_t drawCountBufferOffset) WGPU_FUNCTION_ATTRIBUTE;
  4228. WGPU_EXPORT void wgpuRenderPassEncoderMultiDrawIndirect(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset, uint32_t maxDrawCount, WGPU_NULLABLE WGPUBuffer drawCountBuffer, uint64_t drawCountBufferOffset) WGPU_FUNCTION_ATTRIBUTE;
  4229. WGPU_EXPORT void wgpuRenderPassEncoderPixelLocalStorageBarrier(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  4230. WGPU_EXPORT void wgpuRenderPassEncoderPopDebugGroup(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  4231. WGPU_EXPORT void wgpuRenderPassEncoderPushDebugGroup(WGPURenderPassEncoder renderPassEncoder, WGPUStringView groupLabel) WGPU_FUNCTION_ATTRIBUTE;
  4232. WGPU_EXPORT void wgpuRenderPassEncoderSetBindGroup(WGPURenderPassEncoder renderPassEncoder, uint32_t groupIndex, WGPU_NULLABLE WGPUBindGroup group, size_t dynamicOffsetCount, uint32_t const * dynamicOffsets) WGPU_FUNCTION_ATTRIBUTE;
  4233. WGPU_EXPORT void wgpuRenderPassEncoderSetBlendConstant(WGPURenderPassEncoder renderPassEncoder, WGPUColor const * color) WGPU_FUNCTION_ATTRIBUTE;
  4234. WGPU_EXPORT void wgpuRenderPassEncoderSetImmediates(WGPURenderPassEncoder renderPassEncoder, uint32_t offset, void const * data, size_t size) WGPU_FUNCTION_ATTRIBUTE;
  4235. WGPU_EXPORT void wgpuRenderPassEncoderSetIndexBuffer(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
  4236. WGPU_EXPORT void wgpuRenderPassEncoderSetLabel(WGPURenderPassEncoder renderPassEncoder, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4237. WGPU_EXPORT void wgpuRenderPassEncoderSetPipeline(WGPURenderPassEncoder renderPassEncoder, WGPURenderPipeline pipeline) WGPU_FUNCTION_ATTRIBUTE;
  4238. WGPU_EXPORT void wgpuRenderPassEncoderSetScissorRect(WGPURenderPassEncoder renderPassEncoder, uint32_t x, uint32_t y, uint32_t width, uint32_t height) WGPU_FUNCTION_ATTRIBUTE;
  4239. WGPU_EXPORT void wgpuRenderPassEncoderSetStencilReference(WGPURenderPassEncoder renderPassEncoder, uint32_t reference) WGPU_FUNCTION_ATTRIBUTE;
  4240. WGPU_EXPORT void wgpuRenderPassEncoderSetVertexBuffer(WGPURenderPassEncoder renderPassEncoder, uint32_t slot, WGPU_NULLABLE WGPUBuffer buffer, uint64_t offset, uint64_t size) WGPU_FUNCTION_ATTRIBUTE;
  4241. WGPU_EXPORT void wgpuRenderPassEncoderSetViewport(WGPURenderPassEncoder renderPassEncoder, float x, float y, float width, float height, float minDepth, float maxDepth) WGPU_FUNCTION_ATTRIBUTE;
  4242. WGPU_EXPORT void wgpuRenderPassEncoderWriteTimestamp(WGPURenderPassEncoder renderPassEncoder, WGPUQuerySet querySet, uint32_t queryIndex) WGPU_FUNCTION_ATTRIBUTE;
  4243. WGPU_EXPORT void wgpuRenderPassEncoderAddRef(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  4244. WGPU_EXPORT void wgpuRenderPassEncoderRelease(WGPURenderPassEncoder renderPassEncoder) WGPU_FUNCTION_ATTRIBUTE;
  4245. // Methods of RenderPipeline
  4246. WGPU_EXPORT WGPUBindGroupLayout wgpuRenderPipelineGetBindGroupLayout(WGPURenderPipeline renderPipeline, uint32_t groupIndex) WGPU_FUNCTION_ATTRIBUTE;
  4247. WGPU_EXPORT void wgpuRenderPipelineSetLabel(WGPURenderPipeline renderPipeline, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4248. WGPU_EXPORT void wgpuRenderPipelineAddRef(WGPURenderPipeline renderPipeline) WGPU_FUNCTION_ATTRIBUTE;
  4249. WGPU_EXPORT void wgpuRenderPipelineRelease(WGPURenderPipeline renderPipeline) WGPU_FUNCTION_ATTRIBUTE;
  4250. // Methods of ResourceTable
  4251. WGPU_EXPORT void wgpuResourceTableDestroy(WGPUResourceTable resourceTable) WGPU_FUNCTION_ATTRIBUTE;
  4252. WGPU_EXPORT uint32_t wgpuResourceTableGetSize(WGPUResourceTable resourceTable) WGPU_FUNCTION_ATTRIBUTE;
  4253. WGPU_EXPORT uint32_t wgpuResourceTableInsertBinding(WGPUResourceTable resourceTable, WGPUBindingResource const * resource) WGPU_FUNCTION_ATTRIBUTE;
  4254. WGPU_EXPORT WGPUStatus wgpuResourceTableRemoveBinding(WGPUResourceTable resourceTable, uint32_t slot) WGPU_FUNCTION_ATTRIBUTE;
  4255. WGPU_EXPORT WGPUStatus wgpuResourceTableUpdate(WGPUResourceTable resourceTable, uint32_t slot, WGPUBindingResource const * resource) WGPU_FUNCTION_ATTRIBUTE;
  4256. WGPU_EXPORT void wgpuResourceTableAddRef(WGPUResourceTable resourceTable) WGPU_FUNCTION_ATTRIBUTE;
  4257. WGPU_EXPORT void wgpuResourceTableRelease(WGPUResourceTable resourceTable) WGPU_FUNCTION_ATTRIBUTE;
  4258. // Methods of Sampler
  4259. WGPU_EXPORT void wgpuSamplerSetLabel(WGPUSampler sampler, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4260. WGPU_EXPORT void wgpuSamplerAddRef(WGPUSampler sampler) WGPU_FUNCTION_ATTRIBUTE;
  4261. WGPU_EXPORT void wgpuSamplerRelease(WGPUSampler sampler) WGPU_FUNCTION_ATTRIBUTE;
  4262. // Methods of ShaderModule
  4263. WGPU_EXPORT WGPUFuture wgpuShaderModuleGetCompilationInfo(WGPUShaderModule shaderModule, WGPUCompilationInfoCallbackInfo callbackInfo) WGPU_FUNCTION_ATTRIBUTE;
  4264. WGPU_EXPORT void wgpuShaderModuleSetLabel(WGPUShaderModule shaderModule, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4265. WGPU_EXPORT void wgpuShaderModuleAddRef(WGPUShaderModule shaderModule) WGPU_FUNCTION_ATTRIBUTE;
  4266. WGPU_EXPORT void wgpuShaderModuleRelease(WGPUShaderModule shaderModule) WGPU_FUNCTION_ATTRIBUTE;
  4267. // Methods of SharedBufferMemory
  4268. WGPU_EXPORT WGPUStatus wgpuSharedBufferMemoryBeginAccess(WGPUSharedBufferMemory sharedBufferMemory, WGPUBuffer buffer, WGPUSharedBufferMemoryBeginAccessDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4269. WGPU_EXPORT WGPUBuffer wgpuSharedBufferMemoryCreateBuffer(WGPUSharedBufferMemory sharedBufferMemory, WGPU_NULLABLE WGPUBufferDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4270. WGPU_EXPORT WGPUStatus wgpuSharedBufferMemoryEndAccess(WGPUSharedBufferMemory sharedBufferMemory, WGPUBuffer buffer, WGPUSharedBufferMemoryEndAccessState * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4271. WGPU_EXPORT WGPUStatus wgpuSharedBufferMemoryGetProperties(WGPUSharedBufferMemory sharedBufferMemory, WGPUSharedBufferMemoryProperties * properties) WGPU_FUNCTION_ATTRIBUTE;
  4272. WGPU_EXPORT WGPUBool wgpuSharedBufferMemoryIsDeviceLost(WGPUSharedBufferMemory sharedBufferMemory) WGPU_FUNCTION_ATTRIBUTE;
  4273. WGPU_EXPORT void wgpuSharedBufferMemorySetLabel(WGPUSharedBufferMemory sharedBufferMemory, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4274. WGPU_EXPORT void wgpuSharedBufferMemoryAddRef(WGPUSharedBufferMemory sharedBufferMemory) WGPU_FUNCTION_ATTRIBUTE;
  4275. WGPU_EXPORT void wgpuSharedBufferMemoryRelease(WGPUSharedBufferMemory sharedBufferMemory) WGPU_FUNCTION_ATTRIBUTE;
  4276. // Methods of SharedBufferMemoryEndAccessState
  4277. WGPU_EXPORT void wgpuSharedBufferMemoryEndAccessStateFreeMembers(WGPUSharedBufferMemoryEndAccessState sharedBufferMemoryEndAccessState) WGPU_FUNCTION_ATTRIBUTE;
  4278. // Methods of SharedFence
  4279. WGPU_EXPORT void wgpuSharedFenceExportInfo(WGPUSharedFence sharedFence, WGPUSharedFenceExportInfo * info) WGPU_FUNCTION_ATTRIBUTE;
  4280. WGPU_EXPORT void wgpuSharedFenceAddRef(WGPUSharedFence sharedFence) WGPU_FUNCTION_ATTRIBUTE;
  4281. WGPU_EXPORT void wgpuSharedFenceRelease(WGPUSharedFence sharedFence) WGPU_FUNCTION_ATTRIBUTE;
  4282. // Methods of SharedTextureMemory
  4283. WGPU_EXPORT WGPUStatus wgpuSharedTextureMemoryBeginAccess(WGPUSharedTextureMemory sharedTextureMemory, WGPUTexture texture, WGPUSharedTextureMemoryBeginAccessDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4284. WGPU_EXPORT WGPUTexture wgpuSharedTextureMemoryCreateTexture(WGPUSharedTextureMemory sharedTextureMemory, WGPU_NULLABLE WGPUTextureDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4285. WGPU_EXPORT WGPUStatus wgpuSharedTextureMemoryEndAccess(WGPUSharedTextureMemory sharedTextureMemory, WGPUTexture texture, WGPUSharedTextureMemoryEndAccessState * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4286. WGPU_EXPORT WGPUStatus wgpuSharedTextureMemoryGetProperties(WGPUSharedTextureMemory sharedTextureMemory, WGPUSharedTextureMemoryProperties * properties) WGPU_FUNCTION_ATTRIBUTE;
  4287. WGPU_EXPORT WGPUBool wgpuSharedTextureMemoryIsDeviceLost(WGPUSharedTextureMemory sharedTextureMemory) WGPU_FUNCTION_ATTRIBUTE;
  4288. WGPU_EXPORT void wgpuSharedTextureMemorySetLabel(WGPUSharedTextureMemory sharedTextureMemory, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4289. WGPU_EXPORT void wgpuSharedTextureMemoryAddRef(WGPUSharedTextureMemory sharedTextureMemory) WGPU_FUNCTION_ATTRIBUTE;
  4290. WGPU_EXPORT void wgpuSharedTextureMemoryRelease(WGPUSharedTextureMemory sharedTextureMemory) WGPU_FUNCTION_ATTRIBUTE;
  4291. // Methods of SharedTextureMemoryEndAccessState
  4292. WGPU_EXPORT void wgpuSharedTextureMemoryEndAccessStateFreeMembers(WGPUSharedTextureMemoryEndAccessState sharedTextureMemoryEndAccessState) WGPU_FUNCTION_ATTRIBUTE;
  4293. // Methods of SupportedFeatures
  4294. WGPU_EXPORT void wgpuSupportedFeaturesFreeMembers(WGPUSupportedFeatures supportedFeatures) WGPU_FUNCTION_ATTRIBUTE;
  4295. // Methods of SupportedInstanceFeatures
  4296. WGPU_EXPORT void wgpuSupportedInstanceFeaturesFreeMembers(WGPUSupportedInstanceFeatures supportedInstanceFeatures) WGPU_FUNCTION_ATTRIBUTE;
  4297. // Methods of SupportedWGSLLanguageFeatures
  4298. WGPU_EXPORT void wgpuSupportedWGSLLanguageFeaturesFreeMembers(WGPUSupportedWGSLLanguageFeatures supportedWGSLLanguageFeatures) WGPU_FUNCTION_ATTRIBUTE;
  4299. // Methods of Surface
  4300. WGPU_EXPORT void wgpuSurfaceConfigure(WGPUSurface surface, WGPUSurfaceConfiguration const * config) WGPU_FUNCTION_ATTRIBUTE;
  4301. WGPU_EXPORT WGPUStatus wgpuSurfaceGetCapabilities(WGPUSurface surface, WGPUAdapter adapter, WGPUSurfaceCapabilities * capabilities) WGPU_FUNCTION_ATTRIBUTE;
  4302. WGPU_EXPORT void wgpuSurfaceGetCurrentTexture(WGPUSurface surface, WGPUSurfaceTexture * surfaceTexture) WGPU_FUNCTION_ATTRIBUTE;
  4303. WGPU_EXPORT WGPUStatus wgpuSurfacePresent(WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
  4304. WGPU_EXPORT void wgpuSurfaceSetLabel(WGPUSurface surface, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4305. WGPU_EXPORT void wgpuSurfaceUnconfigure(WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
  4306. WGPU_EXPORT void wgpuSurfaceAddRef(WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
  4307. WGPU_EXPORT void wgpuSurfaceRelease(WGPUSurface surface) WGPU_FUNCTION_ATTRIBUTE;
  4308. // Methods of SurfaceCapabilities
  4309. WGPU_EXPORT void wgpuSurfaceCapabilitiesFreeMembers(WGPUSurfaceCapabilities surfaceCapabilities) WGPU_FUNCTION_ATTRIBUTE;
  4310. // Methods of TexelBufferView
  4311. WGPU_EXPORT void wgpuTexelBufferViewSetLabel(WGPUTexelBufferView texelBufferView, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4312. WGPU_EXPORT void wgpuTexelBufferViewAddRef(WGPUTexelBufferView texelBufferView) WGPU_FUNCTION_ATTRIBUTE;
  4313. WGPU_EXPORT void wgpuTexelBufferViewRelease(WGPUTexelBufferView texelBufferView) WGPU_FUNCTION_ATTRIBUTE;
  4314. // Methods of Texture
  4315. WGPU_EXPORT WGPUTextureView wgpuTextureCreateErrorView(WGPUTexture texture, WGPU_NULLABLE WGPUTextureViewDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4316. WGPU_EXPORT WGPUTextureView wgpuTextureCreateView(WGPUTexture texture, WGPU_NULLABLE WGPUTextureViewDescriptor const * descriptor) WGPU_FUNCTION_ATTRIBUTE;
  4317. WGPU_EXPORT void wgpuTextureDestroy(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4318. WGPU_EXPORT uint32_t wgpuTextureGetDepthOrArrayLayers(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4319. WGPU_EXPORT WGPUTextureDimension wgpuTextureGetDimension(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4320. WGPU_EXPORT WGPUTextureFormat wgpuTextureGetFormat(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4321. WGPU_EXPORT uint32_t wgpuTextureGetHeight(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4322. WGPU_EXPORT uint32_t wgpuTextureGetMipLevelCount(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4323. WGPU_EXPORT uint32_t wgpuTextureGetSampleCount(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4324. WGPU_EXPORT WGPUTextureViewDimension wgpuTextureGetTextureBindingViewDimension(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4325. WGPU_EXPORT WGPUTextureUsage wgpuTextureGetUsage(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4326. WGPU_EXPORT uint32_t wgpuTextureGetWidth(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4327. WGPU_EXPORT void wgpuTexturePin(WGPUTexture texture, WGPUTextureUsage usage) WGPU_FUNCTION_ATTRIBUTE;
  4328. WGPU_EXPORT void wgpuTextureSetLabel(WGPUTexture texture, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4329. WGPU_EXPORT void wgpuTextureSetOwnershipForMemoryDump(WGPUTexture texture, uint64_t ownerGuid) WGPU_FUNCTION_ATTRIBUTE;
  4330. WGPU_EXPORT void wgpuTextureUnpin(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4331. WGPU_EXPORT void wgpuTextureAddRef(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4332. WGPU_EXPORT void wgpuTextureRelease(WGPUTexture texture) WGPU_FUNCTION_ATTRIBUTE;
  4333. // Methods of TextureView
  4334. WGPU_EXPORT void wgpuTextureViewSetLabel(WGPUTextureView textureView, WGPUStringView label) WGPU_FUNCTION_ATTRIBUTE;
  4335. WGPU_EXPORT void wgpuTextureViewAddRef(WGPUTextureView textureView) WGPU_FUNCTION_ATTRIBUTE;
  4336. WGPU_EXPORT void wgpuTextureViewRelease(WGPUTextureView textureView) WGPU_FUNCTION_ATTRIBUTE;
  4337. #endif // !defined(WGPU_SKIP_DECLARATIONS)
  4338. #ifdef __cplusplus
  4339. } // extern "C"
  4340. #endif
  4341. #endif // WEBGPU_H_