2
0

vk_loader_extensions.c 293 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483
  1. // *** THIS FILE IS GENERATED - DO NOT EDIT ***
  2. // See loader_extension_generator.py for modifications
  3. /*
  4. * Copyright (c) 2015-2017 The Khronos Group Inc.
  5. * Copyright (c) 2015-2017 Valve Corporation
  6. * Copyright (c) 2015-2017 LunarG, Inc.
  7. *
  8. * Licensed under the Apache License, Version 2.0 (the "License");
  9. * you may not use this file except in compliance with the License.
  10. * You may obtain a copy of the License at
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an "AS IS" BASIS,
  16. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. *
  20. * Author: Mark Lobodzinski <[email protected]>
  21. * Author: Mark Young <[email protected]>
  22. */
  23. #ifndef _GNU_SOURCE
  24. #define _GNU_SOURCE
  25. #endif
  26. #include <stdio.h>
  27. #include <stdlib.h>
  28. #include <string.h>
  29. #include "vk_loader_platform.h"
  30. #include "loader.h"
  31. #include "vk_loader_extensions.h"
  32. #include <vulkan/vk_icd.h>
  33. #include "wsi.h"
  34. #include "debug_utils.h"
  35. #include "extension_manual.h"
  36. // Device extension error function
  37. VKAPI_ATTR VkResult VKAPI_CALL vkDevExtError(VkDevice dev) {
  38. struct loader_device *found_dev;
  39. // The device going in is a trampoline device
  40. struct loader_icd_term *icd_term = loader_get_icd_and_device(dev, &found_dev, NULL);
  41. if (icd_term)
  42. loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
  43. "Bad destination in loader trampoline dispatch,"
  44. "Are layers and extensions that you are calling enabled?");
  45. return VK_ERROR_EXTENSION_NOT_PRESENT;
  46. }
  47. VKAPI_ATTR bool VKAPI_CALL loader_icd_init_entries(struct loader_icd_term *icd_term, VkInstance inst,
  48. const PFN_vkGetInstanceProcAddr fp_gipa) {
  49. #define LOOKUP_GIPA(func, required) \
  50. do { \
  51. icd_term->dispatch.func = (PFN_vk##func)fp_gipa(inst, "vk" #func); \
  52. if (!icd_term->dispatch.func && required) { \
  53. loader_log((struct loader_instance *)inst, VK_DEBUG_REPORT_WARNING_BIT_EXT, 0, \
  54. loader_platform_get_proc_address_error("vk" #func)); \
  55. return false; \
  56. } \
  57. } while (0)
  58. // ---- Core 1_0
  59. LOOKUP_GIPA(DestroyInstance, true);
  60. LOOKUP_GIPA(EnumeratePhysicalDevices, true);
  61. LOOKUP_GIPA(GetPhysicalDeviceFeatures, true);
  62. LOOKUP_GIPA(GetPhysicalDeviceFormatProperties, true);
  63. LOOKUP_GIPA(GetPhysicalDeviceImageFormatProperties, true);
  64. LOOKUP_GIPA(GetPhysicalDeviceProperties, true);
  65. LOOKUP_GIPA(GetPhysicalDeviceQueueFamilyProperties, true);
  66. LOOKUP_GIPA(GetPhysicalDeviceMemoryProperties, true);
  67. LOOKUP_GIPA(GetDeviceProcAddr, true);
  68. LOOKUP_GIPA(CreateDevice, true);
  69. LOOKUP_GIPA(EnumerateDeviceExtensionProperties, true);
  70. LOOKUP_GIPA(GetPhysicalDeviceSparseImageFormatProperties, true);
  71. // ---- Core 1_1
  72. LOOKUP_GIPA(EnumeratePhysicalDeviceGroups, false);
  73. LOOKUP_GIPA(GetPhysicalDeviceFeatures2, false);
  74. LOOKUP_GIPA(GetPhysicalDeviceProperties2, false);
  75. LOOKUP_GIPA(GetPhysicalDeviceFormatProperties2, false);
  76. LOOKUP_GIPA(GetPhysicalDeviceImageFormatProperties2, false);
  77. LOOKUP_GIPA(GetPhysicalDeviceQueueFamilyProperties2, false);
  78. LOOKUP_GIPA(GetPhysicalDeviceMemoryProperties2, false);
  79. LOOKUP_GIPA(GetPhysicalDeviceSparseImageFormatProperties2, false);
  80. LOOKUP_GIPA(GetPhysicalDeviceExternalBufferProperties, false);
  81. LOOKUP_GIPA(GetPhysicalDeviceExternalFenceProperties, false);
  82. LOOKUP_GIPA(GetPhysicalDeviceExternalSemaphoreProperties, false);
  83. // ---- VK_KHR_surface extension commands
  84. LOOKUP_GIPA(DestroySurfaceKHR, false);
  85. LOOKUP_GIPA(GetPhysicalDeviceSurfaceSupportKHR, false);
  86. LOOKUP_GIPA(GetPhysicalDeviceSurfaceCapabilitiesKHR, false);
  87. LOOKUP_GIPA(GetPhysicalDeviceSurfaceFormatsKHR, false);
  88. LOOKUP_GIPA(GetPhysicalDeviceSurfacePresentModesKHR, false);
  89. // ---- VK_KHR_swapchain extension commands
  90. LOOKUP_GIPA(CreateSwapchainKHR, false);
  91. LOOKUP_GIPA(GetDeviceGroupSurfacePresentModesKHR, false);
  92. LOOKUP_GIPA(GetPhysicalDevicePresentRectanglesKHR, false);
  93. // ---- VK_KHR_display extension commands
  94. LOOKUP_GIPA(GetPhysicalDeviceDisplayPropertiesKHR, false);
  95. LOOKUP_GIPA(GetPhysicalDeviceDisplayPlanePropertiesKHR, false);
  96. LOOKUP_GIPA(GetDisplayPlaneSupportedDisplaysKHR, false);
  97. LOOKUP_GIPA(GetDisplayModePropertiesKHR, false);
  98. LOOKUP_GIPA(CreateDisplayModeKHR, false);
  99. LOOKUP_GIPA(GetDisplayPlaneCapabilitiesKHR, false);
  100. LOOKUP_GIPA(CreateDisplayPlaneSurfaceKHR, false);
  101. // ---- VK_KHR_display_swapchain extension commands
  102. LOOKUP_GIPA(CreateSharedSwapchainsKHR, false);
  103. // ---- VK_KHR_xlib_surface extension commands
  104. #ifdef VK_USE_PLATFORM_XLIB_KHR
  105. LOOKUP_GIPA(CreateXlibSurfaceKHR, false);
  106. #endif // VK_USE_PLATFORM_XLIB_KHR
  107. #ifdef VK_USE_PLATFORM_XLIB_KHR
  108. LOOKUP_GIPA(GetPhysicalDeviceXlibPresentationSupportKHR, false);
  109. #endif // VK_USE_PLATFORM_XLIB_KHR
  110. // ---- VK_KHR_xcb_surface extension commands
  111. #ifdef VK_USE_PLATFORM_XCB_KHR
  112. LOOKUP_GIPA(CreateXcbSurfaceKHR, false);
  113. #endif // VK_USE_PLATFORM_XCB_KHR
  114. #ifdef VK_USE_PLATFORM_XCB_KHR
  115. LOOKUP_GIPA(GetPhysicalDeviceXcbPresentationSupportKHR, false);
  116. #endif // VK_USE_PLATFORM_XCB_KHR
  117. // ---- VK_KHR_wayland_surface extension commands
  118. #ifdef VK_USE_PLATFORM_WAYLAND_KHR
  119. LOOKUP_GIPA(CreateWaylandSurfaceKHR, false);
  120. #endif // VK_USE_PLATFORM_WAYLAND_KHR
  121. #ifdef VK_USE_PLATFORM_WAYLAND_KHR
  122. LOOKUP_GIPA(GetPhysicalDeviceWaylandPresentationSupportKHR, false);
  123. #endif // VK_USE_PLATFORM_WAYLAND_KHR
  124. // ---- VK_KHR_android_surface extension commands
  125. #ifdef VK_USE_PLATFORM_ANDROID_KHR
  126. LOOKUP_GIPA(CreateAndroidSurfaceKHR, false);
  127. #endif // VK_USE_PLATFORM_ANDROID_KHR
  128. // ---- VK_KHR_win32_surface extension commands
  129. #ifdef VK_USE_PLATFORM_WIN32_KHR
  130. LOOKUP_GIPA(CreateWin32SurfaceKHR, false);
  131. #endif // VK_USE_PLATFORM_WIN32_KHR
  132. #ifdef VK_USE_PLATFORM_WIN32_KHR
  133. LOOKUP_GIPA(GetPhysicalDeviceWin32PresentationSupportKHR, false);
  134. #endif // VK_USE_PLATFORM_WIN32_KHR
  135. // ---- VK_KHR_get_physical_device_properties2 extension commands
  136. LOOKUP_GIPA(GetPhysicalDeviceFeatures2KHR, false);
  137. LOOKUP_GIPA(GetPhysicalDeviceProperties2KHR, false);
  138. LOOKUP_GIPA(GetPhysicalDeviceFormatProperties2KHR, false);
  139. LOOKUP_GIPA(GetPhysicalDeviceImageFormatProperties2KHR, false);
  140. LOOKUP_GIPA(GetPhysicalDeviceQueueFamilyProperties2KHR, false);
  141. LOOKUP_GIPA(GetPhysicalDeviceMemoryProperties2KHR, false);
  142. LOOKUP_GIPA(GetPhysicalDeviceSparseImageFormatProperties2KHR, false);
  143. // ---- VK_KHR_device_group_creation extension commands
  144. LOOKUP_GIPA(EnumeratePhysicalDeviceGroupsKHR, false);
  145. // ---- VK_KHR_external_memory_capabilities extension commands
  146. LOOKUP_GIPA(GetPhysicalDeviceExternalBufferPropertiesKHR, false);
  147. // ---- VK_KHR_external_semaphore_capabilities extension commands
  148. LOOKUP_GIPA(GetPhysicalDeviceExternalSemaphorePropertiesKHR, false);
  149. // ---- VK_KHR_external_fence_capabilities extension commands
  150. LOOKUP_GIPA(GetPhysicalDeviceExternalFencePropertiesKHR, false);
  151. // ---- VK_KHR_performance_query extension commands
  152. LOOKUP_GIPA(EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR, false);
  153. LOOKUP_GIPA(GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR, false);
  154. // ---- VK_KHR_get_surface_capabilities2 extension commands
  155. LOOKUP_GIPA(GetPhysicalDeviceSurfaceCapabilities2KHR, false);
  156. LOOKUP_GIPA(GetPhysicalDeviceSurfaceFormats2KHR, false);
  157. // ---- VK_KHR_get_display_properties2 extension commands
  158. LOOKUP_GIPA(GetPhysicalDeviceDisplayProperties2KHR, false);
  159. LOOKUP_GIPA(GetPhysicalDeviceDisplayPlaneProperties2KHR, false);
  160. LOOKUP_GIPA(GetDisplayModeProperties2KHR, false);
  161. LOOKUP_GIPA(GetDisplayPlaneCapabilities2KHR, false);
  162. // ---- VK_KHR_fragment_shading_rate extension commands
  163. LOOKUP_GIPA(GetPhysicalDeviceFragmentShadingRatesKHR, false);
  164. // ---- VK_EXT_debug_report extension commands
  165. LOOKUP_GIPA(CreateDebugReportCallbackEXT, false);
  166. LOOKUP_GIPA(DestroyDebugReportCallbackEXT, false);
  167. LOOKUP_GIPA(DebugReportMessageEXT, false);
  168. // ---- VK_EXT_debug_marker extension commands
  169. LOOKUP_GIPA(DebugMarkerSetObjectTagEXT, false);
  170. LOOKUP_GIPA(DebugMarkerSetObjectNameEXT, false);
  171. // ---- VK_GGP_stream_descriptor_surface extension commands
  172. #ifdef VK_USE_PLATFORM_GGP
  173. LOOKUP_GIPA(CreateStreamDescriptorSurfaceGGP, false);
  174. #endif // VK_USE_PLATFORM_GGP
  175. // ---- VK_NV_external_memory_capabilities extension commands
  176. LOOKUP_GIPA(GetPhysicalDeviceExternalImageFormatPropertiesNV, false);
  177. // ---- VK_NN_vi_surface extension commands
  178. #ifdef VK_USE_PLATFORM_VI_NN
  179. LOOKUP_GIPA(CreateViSurfaceNN, false);
  180. #endif // VK_USE_PLATFORM_VI_NN
  181. // ---- VK_EXT_direct_mode_display extension commands
  182. LOOKUP_GIPA(ReleaseDisplayEXT, false);
  183. // ---- VK_EXT_acquire_xlib_display extension commands
  184. #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
  185. LOOKUP_GIPA(AcquireXlibDisplayEXT, false);
  186. #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
  187. #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
  188. LOOKUP_GIPA(GetRandROutputDisplayEXT, false);
  189. #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
  190. // ---- VK_EXT_display_surface_counter extension commands
  191. LOOKUP_GIPA(GetPhysicalDeviceSurfaceCapabilities2EXT, false);
  192. // ---- VK_MVK_ios_surface extension commands
  193. #ifdef VK_USE_PLATFORM_IOS_MVK
  194. LOOKUP_GIPA(CreateIOSSurfaceMVK, false);
  195. #endif // VK_USE_PLATFORM_IOS_MVK
  196. // ---- VK_MVK_macos_surface extension commands
  197. #ifdef VK_USE_PLATFORM_MACOS_MVK
  198. LOOKUP_GIPA(CreateMacOSSurfaceMVK, false);
  199. #endif // VK_USE_PLATFORM_MACOS_MVK
  200. // ---- VK_EXT_debug_utils extension commands
  201. LOOKUP_GIPA(SetDebugUtilsObjectNameEXT, false);
  202. LOOKUP_GIPA(SetDebugUtilsObjectTagEXT, false);
  203. LOOKUP_GIPA(QueueBeginDebugUtilsLabelEXT, false);
  204. LOOKUP_GIPA(QueueEndDebugUtilsLabelEXT, false);
  205. LOOKUP_GIPA(QueueInsertDebugUtilsLabelEXT, false);
  206. LOOKUP_GIPA(CmdBeginDebugUtilsLabelEXT, false);
  207. LOOKUP_GIPA(CmdEndDebugUtilsLabelEXT, false);
  208. LOOKUP_GIPA(CmdInsertDebugUtilsLabelEXT, false);
  209. LOOKUP_GIPA(CreateDebugUtilsMessengerEXT, false);
  210. LOOKUP_GIPA(DestroyDebugUtilsMessengerEXT, false);
  211. LOOKUP_GIPA(SubmitDebugUtilsMessageEXT, false);
  212. // ---- VK_EXT_sample_locations extension commands
  213. LOOKUP_GIPA(GetPhysicalDeviceMultisamplePropertiesEXT, false);
  214. // ---- VK_EXT_calibrated_timestamps extension commands
  215. LOOKUP_GIPA(GetPhysicalDeviceCalibrateableTimeDomainsEXT, false);
  216. // ---- VK_FUCHSIA_imagepipe_surface extension commands
  217. #ifdef VK_USE_PLATFORM_FUCHSIA
  218. LOOKUP_GIPA(CreateImagePipeSurfaceFUCHSIA, false);
  219. #endif // VK_USE_PLATFORM_FUCHSIA
  220. // ---- VK_EXT_metal_surface extension commands
  221. #ifdef VK_USE_PLATFORM_METAL_EXT
  222. LOOKUP_GIPA(CreateMetalSurfaceEXT, false);
  223. #endif // VK_USE_PLATFORM_METAL_EXT
  224. // ---- VK_EXT_tooling_info extension commands
  225. LOOKUP_GIPA(GetPhysicalDeviceToolPropertiesEXT, false);
  226. // ---- VK_NV_cooperative_matrix extension commands
  227. LOOKUP_GIPA(GetPhysicalDeviceCooperativeMatrixPropertiesNV, false);
  228. // ---- VK_NV_coverage_reduction_mode extension commands
  229. LOOKUP_GIPA(GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV, false);
  230. // ---- VK_EXT_full_screen_exclusive extension commands
  231. #ifdef VK_USE_PLATFORM_WIN32_KHR
  232. LOOKUP_GIPA(GetPhysicalDeviceSurfacePresentModes2EXT, false);
  233. #endif // VK_USE_PLATFORM_WIN32_KHR
  234. #ifdef VK_USE_PLATFORM_WIN32_KHR
  235. LOOKUP_GIPA(GetDeviceGroupSurfacePresentModes2EXT, false);
  236. #endif // VK_USE_PLATFORM_WIN32_KHR
  237. // ---- VK_EXT_headless_surface extension commands
  238. LOOKUP_GIPA(CreateHeadlessSurfaceEXT, false);
  239. // ---- VK_EXT_directfb_surface extension commands
  240. #ifdef VK_USE_PLATFORM_DIRECTFB_EXT
  241. LOOKUP_GIPA(CreateDirectFBSurfaceEXT, false);
  242. #endif // VK_USE_PLATFORM_DIRECTFB_EXT
  243. #ifdef VK_USE_PLATFORM_DIRECTFB_EXT
  244. LOOKUP_GIPA(GetPhysicalDeviceDirectFBPresentationSupportEXT, false);
  245. #endif // VK_USE_PLATFORM_DIRECTFB_EXT
  246. #undef LOOKUP_GIPA
  247. return true;
  248. };
  249. // Init Device function pointer dispatch table with core commands
  250. VKAPI_ATTR void VKAPI_CALL loader_init_device_dispatch_table(struct loader_dev_dispatch_table *dev_table, PFN_vkGetDeviceProcAddr gpa,
  251. VkDevice dev) {
  252. VkLayerDispatchTable *table = &dev_table->core_dispatch;
  253. for (uint32_t i = 0; i < MAX_NUM_UNKNOWN_EXTS; i++) dev_table->ext_dispatch.dev_ext[i] = (PFN_vkDevExt)vkDevExtError;
  254. // ---- Core 1_0 commands
  255. table->GetDeviceProcAddr = gpa;
  256. table->DestroyDevice = (PFN_vkDestroyDevice)gpa(dev, "vkDestroyDevice");
  257. table->GetDeviceQueue = (PFN_vkGetDeviceQueue)gpa(dev, "vkGetDeviceQueue");
  258. table->QueueSubmit = (PFN_vkQueueSubmit)gpa(dev, "vkQueueSubmit");
  259. table->QueueWaitIdle = (PFN_vkQueueWaitIdle)gpa(dev, "vkQueueWaitIdle");
  260. table->DeviceWaitIdle = (PFN_vkDeviceWaitIdle)gpa(dev, "vkDeviceWaitIdle");
  261. table->AllocateMemory = (PFN_vkAllocateMemory)gpa(dev, "vkAllocateMemory");
  262. table->FreeMemory = (PFN_vkFreeMemory)gpa(dev, "vkFreeMemory");
  263. table->MapMemory = (PFN_vkMapMemory)gpa(dev, "vkMapMemory");
  264. table->UnmapMemory = (PFN_vkUnmapMemory)gpa(dev, "vkUnmapMemory");
  265. table->FlushMappedMemoryRanges = (PFN_vkFlushMappedMemoryRanges)gpa(dev, "vkFlushMappedMemoryRanges");
  266. table->InvalidateMappedMemoryRanges = (PFN_vkInvalidateMappedMemoryRanges)gpa(dev, "vkInvalidateMappedMemoryRanges");
  267. table->GetDeviceMemoryCommitment = (PFN_vkGetDeviceMemoryCommitment)gpa(dev, "vkGetDeviceMemoryCommitment");
  268. table->BindBufferMemory = (PFN_vkBindBufferMemory)gpa(dev, "vkBindBufferMemory");
  269. table->BindImageMemory = (PFN_vkBindImageMemory)gpa(dev, "vkBindImageMemory");
  270. table->GetBufferMemoryRequirements = (PFN_vkGetBufferMemoryRequirements)gpa(dev, "vkGetBufferMemoryRequirements");
  271. table->GetImageMemoryRequirements = (PFN_vkGetImageMemoryRequirements)gpa(dev, "vkGetImageMemoryRequirements");
  272. table->GetImageSparseMemoryRequirements = (PFN_vkGetImageSparseMemoryRequirements)gpa(dev, "vkGetImageSparseMemoryRequirements");
  273. table->QueueBindSparse = (PFN_vkQueueBindSparse)gpa(dev, "vkQueueBindSparse");
  274. table->CreateFence = (PFN_vkCreateFence)gpa(dev, "vkCreateFence");
  275. table->DestroyFence = (PFN_vkDestroyFence)gpa(dev, "vkDestroyFence");
  276. table->ResetFences = (PFN_vkResetFences)gpa(dev, "vkResetFences");
  277. table->GetFenceStatus = (PFN_vkGetFenceStatus)gpa(dev, "vkGetFenceStatus");
  278. table->WaitForFences = (PFN_vkWaitForFences)gpa(dev, "vkWaitForFences");
  279. table->CreateSemaphore = (PFN_vkCreateSemaphore)gpa(dev, "vkCreateSemaphore");
  280. table->DestroySemaphore = (PFN_vkDestroySemaphore)gpa(dev, "vkDestroySemaphore");
  281. table->CreateEvent = (PFN_vkCreateEvent)gpa(dev, "vkCreateEvent");
  282. table->DestroyEvent = (PFN_vkDestroyEvent)gpa(dev, "vkDestroyEvent");
  283. table->GetEventStatus = (PFN_vkGetEventStatus)gpa(dev, "vkGetEventStatus");
  284. table->SetEvent = (PFN_vkSetEvent)gpa(dev, "vkSetEvent");
  285. table->ResetEvent = (PFN_vkResetEvent)gpa(dev, "vkResetEvent");
  286. table->CreateQueryPool = (PFN_vkCreateQueryPool)gpa(dev, "vkCreateQueryPool");
  287. table->DestroyQueryPool = (PFN_vkDestroyQueryPool)gpa(dev, "vkDestroyQueryPool");
  288. table->GetQueryPoolResults = (PFN_vkGetQueryPoolResults)gpa(dev, "vkGetQueryPoolResults");
  289. table->CreateBuffer = (PFN_vkCreateBuffer)gpa(dev, "vkCreateBuffer");
  290. table->DestroyBuffer = (PFN_vkDestroyBuffer)gpa(dev, "vkDestroyBuffer");
  291. table->CreateBufferView = (PFN_vkCreateBufferView)gpa(dev, "vkCreateBufferView");
  292. table->DestroyBufferView = (PFN_vkDestroyBufferView)gpa(dev, "vkDestroyBufferView");
  293. table->CreateImage = (PFN_vkCreateImage)gpa(dev, "vkCreateImage");
  294. table->DestroyImage = (PFN_vkDestroyImage)gpa(dev, "vkDestroyImage");
  295. table->GetImageSubresourceLayout = (PFN_vkGetImageSubresourceLayout)gpa(dev, "vkGetImageSubresourceLayout");
  296. table->CreateImageView = (PFN_vkCreateImageView)gpa(dev, "vkCreateImageView");
  297. table->DestroyImageView = (PFN_vkDestroyImageView)gpa(dev, "vkDestroyImageView");
  298. table->CreateShaderModule = (PFN_vkCreateShaderModule)gpa(dev, "vkCreateShaderModule");
  299. table->DestroyShaderModule = (PFN_vkDestroyShaderModule)gpa(dev, "vkDestroyShaderModule");
  300. table->CreatePipelineCache = (PFN_vkCreatePipelineCache)gpa(dev, "vkCreatePipelineCache");
  301. table->DestroyPipelineCache = (PFN_vkDestroyPipelineCache)gpa(dev, "vkDestroyPipelineCache");
  302. table->GetPipelineCacheData = (PFN_vkGetPipelineCacheData)gpa(dev, "vkGetPipelineCacheData");
  303. table->MergePipelineCaches = (PFN_vkMergePipelineCaches)gpa(dev, "vkMergePipelineCaches");
  304. table->CreateGraphicsPipelines = (PFN_vkCreateGraphicsPipelines)gpa(dev, "vkCreateGraphicsPipelines");
  305. table->CreateComputePipelines = (PFN_vkCreateComputePipelines)gpa(dev, "vkCreateComputePipelines");
  306. table->DestroyPipeline = (PFN_vkDestroyPipeline)gpa(dev, "vkDestroyPipeline");
  307. table->CreatePipelineLayout = (PFN_vkCreatePipelineLayout)gpa(dev, "vkCreatePipelineLayout");
  308. table->DestroyPipelineLayout = (PFN_vkDestroyPipelineLayout)gpa(dev, "vkDestroyPipelineLayout");
  309. table->CreateSampler = (PFN_vkCreateSampler)gpa(dev, "vkCreateSampler");
  310. table->DestroySampler = (PFN_vkDestroySampler)gpa(dev, "vkDestroySampler");
  311. table->CreateDescriptorSetLayout = (PFN_vkCreateDescriptorSetLayout)gpa(dev, "vkCreateDescriptorSetLayout");
  312. table->DestroyDescriptorSetLayout = (PFN_vkDestroyDescriptorSetLayout)gpa(dev, "vkDestroyDescriptorSetLayout");
  313. table->CreateDescriptorPool = (PFN_vkCreateDescriptorPool)gpa(dev, "vkCreateDescriptorPool");
  314. table->DestroyDescriptorPool = (PFN_vkDestroyDescriptorPool)gpa(dev, "vkDestroyDescriptorPool");
  315. table->ResetDescriptorPool = (PFN_vkResetDescriptorPool)gpa(dev, "vkResetDescriptorPool");
  316. table->AllocateDescriptorSets = (PFN_vkAllocateDescriptorSets)gpa(dev, "vkAllocateDescriptorSets");
  317. table->FreeDescriptorSets = (PFN_vkFreeDescriptorSets)gpa(dev, "vkFreeDescriptorSets");
  318. table->UpdateDescriptorSets = (PFN_vkUpdateDescriptorSets)gpa(dev, "vkUpdateDescriptorSets");
  319. table->CreateFramebuffer = (PFN_vkCreateFramebuffer)gpa(dev, "vkCreateFramebuffer");
  320. table->DestroyFramebuffer = (PFN_vkDestroyFramebuffer)gpa(dev, "vkDestroyFramebuffer");
  321. table->CreateRenderPass = (PFN_vkCreateRenderPass)gpa(dev, "vkCreateRenderPass");
  322. table->DestroyRenderPass = (PFN_vkDestroyRenderPass)gpa(dev, "vkDestroyRenderPass");
  323. table->GetRenderAreaGranularity = (PFN_vkGetRenderAreaGranularity)gpa(dev, "vkGetRenderAreaGranularity");
  324. table->CreateCommandPool = (PFN_vkCreateCommandPool)gpa(dev, "vkCreateCommandPool");
  325. table->DestroyCommandPool = (PFN_vkDestroyCommandPool)gpa(dev, "vkDestroyCommandPool");
  326. table->ResetCommandPool = (PFN_vkResetCommandPool)gpa(dev, "vkResetCommandPool");
  327. table->AllocateCommandBuffers = (PFN_vkAllocateCommandBuffers)gpa(dev, "vkAllocateCommandBuffers");
  328. table->FreeCommandBuffers = (PFN_vkFreeCommandBuffers)gpa(dev, "vkFreeCommandBuffers");
  329. table->BeginCommandBuffer = (PFN_vkBeginCommandBuffer)gpa(dev, "vkBeginCommandBuffer");
  330. table->EndCommandBuffer = (PFN_vkEndCommandBuffer)gpa(dev, "vkEndCommandBuffer");
  331. table->ResetCommandBuffer = (PFN_vkResetCommandBuffer)gpa(dev, "vkResetCommandBuffer");
  332. table->CmdBindPipeline = (PFN_vkCmdBindPipeline)gpa(dev, "vkCmdBindPipeline");
  333. table->CmdSetViewport = (PFN_vkCmdSetViewport)gpa(dev, "vkCmdSetViewport");
  334. table->CmdSetScissor = (PFN_vkCmdSetScissor)gpa(dev, "vkCmdSetScissor");
  335. table->CmdSetLineWidth = (PFN_vkCmdSetLineWidth)gpa(dev, "vkCmdSetLineWidth");
  336. table->CmdSetDepthBias = (PFN_vkCmdSetDepthBias)gpa(dev, "vkCmdSetDepthBias");
  337. table->CmdSetBlendConstants = (PFN_vkCmdSetBlendConstants)gpa(dev, "vkCmdSetBlendConstants");
  338. table->CmdSetDepthBounds = (PFN_vkCmdSetDepthBounds)gpa(dev, "vkCmdSetDepthBounds");
  339. table->CmdSetStencilCompareMask = (PFN_vkCmdSetStencilCompareMask)gpa(dev, "vkCmdSetStencilCompareMask");
  340. table->CmdSetStencilWriteMask = (PFN_vkCmdSetStencilWriteMask)gpa(dev, "vkCmdSetStencilWriteMask");
  341. table->CmdSetStencilReference = (PFN_vkCmdSetStencilReference)gpa(dev, "vkCmdSetStencilReference");
  342. table->CmdBindDescriptorSets = (PFN_vkCmdBindDescriptorSets)gpa(dev, "vkCmdBindDescriptorSets");
  343. table->CmdBindIndexBuffer = (PFN_vkCmdBindIndexBuffer)gpa(dev, "vkCmdBindIndexBuffer");
  344. table->CmdBindVertexBuffers = (PFN_vkCmdBindVertexBuffers)gpa(dev, "vkCmdBindVertexBuffers");
  345. table->CmdDraw = (PFN_vkCmdDraw)gpa(dev, "vkCmdDraw");
  346. table->CmdDrawIndexed = (PFN_vkCmdDrawIndexed)gpa(dev, "vkCmdDrawIndexed");
  347. table->CmdDrawIndirect = (PFN_vkCmdDrawIndirect)gpa(dev, "vkCmdDrawIndirect");
  348. table->CmdDrawIndexedIndirect = (PFN_vkCmdDrawIndexedIndirect)gpa(dev, "vkCmdDrawIndexedIndirect");
  349. table->CmdDispatch = (PFN_vkCmdDispatch)gpa(dev, "vkCmdDispatch");
  350. table->CmdDispatchIndirect = (PFN_vkCmdDispatchIndirect)gpa(dev, "vkCmdDispatchIndirect");
  351. table->CmdCopyBuffer = (PFN_vkCmdCopyBuffer)gpa(dev, "vkCmdCopyBuffer");
  352. table->CmdCopyImage = (PFN_vkCmdCopyImage)gpa(dev, "vkCmdCopyImage");
  353. table->CmdBlitImage = (PFN_vkCmdBlitImage)gpa(dev, "vkCmdBlitImage");
  354. table->CmdCopyBufferToImage = (PFN_vkCmdCopyBufferToImage)gpa(dev, "vkCmdCopyBufferToImage");
  355. table->CmdCopyImageToBuffer = (PFN_vkCmdCopyImageToBuffer)gpa(dev, "vkCmdCopyImageToBuffer");
  356. table->CmdUpdateBuffer = (PFN_vkCmdUpdateBuffer)gpa(dev, "vkCmdUpdateBuffer");
  357. table->CmdFillBuffer = (PFN_vkCmdFillBuffer)gpa(dev, "vkCmdFillBuffer");
  358. table->CmdClearColorImage = (PFN_vkCmdClearColorImage)gpa(dev, "vkCmdClearColorImage");
  359. table->CmdClearDepthStencilImage = (PFN_vkCmdClearDepthStencilImage)gpa(dev, "vkCmdClearDepthStencilImage");
  360. table->CmdClearAttachments = (PFN_vkCmdClearAttachments)gpa(dev, "vkCmdClearAttachments");
  361. table->CmdResolveImage = (PFN_vkCmdResolveImage)gpa(dev, "vkCmdResolveImage");
  362. table->CmdSetEvent = (PFN_vkCmdSetEvent)gpa(dev, "vkCmdSetEvent");
  363. table->CmdResetEvent = (PFN_vkCmdResetEvent)gpa(dev, "vkCmdResetEvent");
  364. table->CmdWaitEvents = (PFN_vkCmdWaitEvents)gpa(dev, "vkCmdWaitEvents");
  365. table->CmdPipelineBarrier = (PFN_vkCmdPipelineBarrier)gpa(dev, "vkCmdPipelineBarrier");
  366. table->CmdBeginQuery = (PFN_vkCmdBeginQuery)gpa(dev, "vkCmdBeginQuery");
  367. table->CmdEndQuery = (PFN_vkCmdEndQuery)gpa(dev, "vkCmdEndQuery");
  368. table->CmdResetQueryPool = (PFN_vkCmdResetQueryPool)gpa(dev, "vkCmdResetQueryPool");
  369. table->CmdWriteTimestamp = (PFN_vkCmdWriteTimestamp)gpa(dev, "vkCmdWriteTimestamp");
  370. table->CmdCopyQueryPoolResults = (PFN_vkCmdCopyQueryPoolResults)gpa(dev, "vkCmdCopyQueryPoolResults");
  371. table->CmdPushConstants = (PFN_vkCmdPushConstants)gpa(dev, "vkCmdPushConstants");
  372. table->CmdBeginRenderPass = (PFN_vkCmdBeginRenderPass)gpa(dev, "vkCmdBeginRenderPass");
  373. table->CmdNextSubpass = (PFN_vkCmdNextSubpass)gpa(dev, "vkCmdNextSubpass");
  374. table->CmdEndRenderPass = (PFN_vkCmdEndRenderPass)gpa(dev, "vkCmdEndRenderPass");
  375. table->CmdExecuteCommands = (PFN_vkCmdExecuteCommands)gpa(dev, "vkCmdExecuteCommands");
  376. // ---- Core 1_1 commands
  377. table->BindBufferMemory2 = (PFN_vkBindBufferMemory2)gpa(dev, "vkBindBufferMemory2");
  378. table->BindImageMemory2 = (PFN_vkBindImageMemory2)gpa(dev, "vkBindImageMemory2");
  379. table->GetDeviceGroupPeerMemoryFeatures = (PFN_vkGetDeviceGroupPeerMemoryFeatures)gpa(dev, "vkGetDeviceGroupPeerMemoryFeatures");
  380. table->CmdSetDeviceMask = (PFN_vkCmdSetDeviceMask)gpa(dev, "vkCmdSetDeviceMask");
  381. table->CmdDispatchBase = (PFN_vkCmdDispatchBase)gpa(dev, "vkCmdDispatchBase");
  382. table->GetImageMemoryRequirements2 = (PFN_vkGetImageMemoryRequirements2)gpa(dev, "vkGetImageMemoryRequirements2");
  383. table->GetBufferMemoryRequirements2 = (PFN_vkGetBufferMemoryRequirements2)gpa(dev, "vkGetBufferMemoryRequirements2");
  384. table->GetImageSparseMemoryRequirements2 = (PFN_vkGetImageSparseMemoryRequirements2)gpa(dev, "vkGetImageSparseMemoryRequirements2");
  385. table->TrimCommandPool = (PFN_vkTrimCommandPool)gpa(dev, "vkTrimCommandPool");
  386. table->GetDeviceQueue2 = (PFN_vkGetDeviceQueue2)gpa(dev, "vkGetDeviceQueue2");
  387. table->CreateSamplerYcbcrConversion = (PFN_vkCreateSamplerYcbcrConversion)gpa(dev, "vkCreateSamplerYcbcrConversion");
  388. table->DestroySamplerYcbcrConversion = (PFN_vkDestroySamplerYcbcrConversion)gpa(dev, "vkDestroySamplerYcbcrConversion");
  389. table->CreateDescriptorUpdateTemplate = (PFN_vkCreateDescriptorUpdateTemplate)gpa(dev, "vkCreateDescriptorUpdateTemplate");
  390. table->DestroyDescriptorUpdateTemplate = (PFN_vkDestroyDescriptorUpdateTemplate)gpa(dev, "vkDestroyDescriptorUpdateTemplate");
  391. table->UpdateDescriptorSetWithTemplate = (PFN_vkUpdateDescriptorSetWithTemplate)gpa(dev, "vkUpdateDescriptorSetWithTemplate");
  392. table->GetDescriptorSetLayoutSupport = (PFN_vkGetDescriptorSetLayoutSupport)gpa(dev, "vkGetDescriptorSetLayoutSupport");
  393. // ---- Core 1_2 commands
  394. table->CmdDrawIndirectCount = (PFN_vkCmdDrawIndirectCount)gpa(dev, "vkCmdDrawIndirectCount");
  395. table->CmdDrawIndexedIndirectCount = (PFN_vkCmdDrawIndexedIndirectCount)gpa(dev, "vkCmdDrawIndexedIndirectCount");
  396. table->CreateRenderPass2 = (PFN_vkCreateRenderPass2)gpa(dev, "vkCreateRenderPass2");
  397. table->CmdBeginRenderPass2 = (PFN_vkCmdBeginRenderPass2)gpa(dev, "vkCmdBeginRenderPass2");
  398. table->CmdNextSubpass2 = (PFN_vkCmdNextSubpass2)gpa(dev, "vkCmdNextSubpass2");
  399. table->CmdEndRenderPass2 = (PFN_vkCmdEndRenderPass2)gpa(dev, "vkCmdEndRenderPass2");
  400. table->ResetQueryPool = (PFN_vkResetQueryPool)gpa(dev, "vkResetQueryPool");
  401. table->GetSemaphoreCounterValue = (PFN_vkGetSemaphoreCounterValue)gpa(dev, "vkGetSemaphoreCounterValue");
  402. table->WaitSemaphores = (PFN_vkWaitSemaphores)gpa(dev, "vkWaitSemaphores");
  403. table->SignalSemaphore = (PFN_vkSignalSemaphore)gpa(dev, "vkSignalSemaphore");
  404. table->GetBufferDeviceAddress = (PFN_vkGetBufferDeviceAddress)gpa(dev, "vkGetBufferDeviceAddress");
  405. table->GetBufferOpaqueCaptureAddress = (PFN_vkGetBufferOpaqueCaptureAddress)gpa(dev, "vkGetBufferOpaqueCaptureAddress");
  406. table->GetDeviceMemoryOpaqueCaptureAddress = (PFN_vkGetDeviceMemoryOpaqueCaptureAddress)gpa(dev, "vkGetDeviceMemoryOpaqueCaptureAddress");
  407. }
  408. // Init Device function pointer dispatch table with extension commands
  409. VKAPI_ATTR void VKAPI_CALL loader_init_device_extension_dispatch_table(struct loader_dev_dispatch_table *dev_table,
  410. PFN_vkGetInstanceProcAddr gipa,
  411. PFN_vkGetDeviceProcAddr gdpa,
  412. VkInstance inst,
  413. VkDevice dev) {
  414. VkLayerDispatchTable *table = &dev_table->core_dispatch;
  415. // ---- VK_KHR_swapchain extension commands
  416. table->CreateSwapchainKHR = (PFN_vkCreateSwapchainKHR)gdpa(dev, "vkCreateSwapchainKHR");
  417. table->DestroySwapchainKHR = (PFN_vkDestroySwapchainKHR)gdpa(dev, "vkDestroySwapchainKHR");
  418. table->GetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR)gdpa(dev, "vkGetSwapchainImagesKHR");
  419. table->AcquireNextImageKHR = (PFN_vkAcquireNextImageKHR)gdpa(dev, "vkAcquireNextImageKHR");
  420. table->QueuePresentKHR = (PFN_vkQueuePresentKHR)gdpa(dev, "vkQueuePresentKHR");
  421. table->GetDeviceGroupPresentCapabilitiesKHR = (PFN_vkGetDeviceGroupPresentCapabilitiesKHR)gdpa(dev, "vkGetDeviceGroupPresentCapabilitiesKHR");
  422. table->GetDeviceGroupSurfacePresentModesKHR = (PFN_vkGetDeviceGroupSurfacePresentModesKHR)gdpa(dev, "vkGetDeviceGroupSurfacePresentModesKHR");
  423. table->AcquireNextImage2KHR = (PFN_vkAcquireNextImage2KHR)gdpa(dev, "vkAcquireNextImage2KHR");
  424. // ---- VK_KHR_display_swapchain extension commands
  425. table->CreateSharedSwapchainsKHR = (PFN_vkCreateSharedSwapchainsKHR)gdpa(dev, "vkCreateSharedSwapchainsKHR");
  426. // ---- VK_KHR_device_group extension commands
  427. table->GetDeviceGroupPeerMemoryFeaturesKHR = (PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR)gdpa(dev, "vkGetDeviceGroupPeerMemoryFeaturesKHR");
  428. table->CmdSetDeviceMaskKHR = (PFN_vkCmdSetDeviceMaskKHR)gdpa(dev, "vkCmdSetDeviceMaskKHR");
  429. table->CmdDispatchBaseKHR = (PFN_vkCmdDispatchBaseKHR)gdpa(dev, "vkCmdDispatchBaseKHR");
  430. // ---- VK_KHR_maintenance1 extension commands
  431. table->TrimCommandPoolKHR = (PFN_vkTrimCommandPoolKHR)gdpa(dev, "vkTrimCommandPoolKHR");
  432. // ---- VK_KHR_external_memory_win32 extension commands
  433. #ifdef VK_USE_PLATFORM_WIN32_KHR
  434. table->GetMemoryWin32HandleKHR = (PFN_vkGetMemoryWin32HandleKHR)gdpa(dev, "vkGetMemoryWin32HandleKHR");
  435. #endif // VK_USE_PLATFORM_WIN32_KHR
  436. #ifdef VK_USE_PLATFORM_WIN32_KHR
  437. table->GetMemoryWin32HandlePropertiesKHR = (PFN_vkGetMemoryWin32HandlePropertiesKHR)gdpa(dev, "vkGetMemoryWin32HandlePropertiesKHR");
  438. #endif // VK_USE_PLATFORM_WIN32_KHR
  439. // ---- VK_KHR_external_memory_fd extension commands
  440. table->GetMemoryFdKHR = (PFN_vkGetMemoryFdKHR)gdpa(dev, "vkGetMemoryFdKHR");
  441. table->GetMemoryFdPropertiesKHR = (PFN_vkGetMemoryFdPropertiesKHR)gdpa(dev, "vkGetMemoryFdPropertiesKHR");
  442. // ---- VK_KHR_external_semaphore_win32 extension commands
  443. #ifdef VK_USE_PLATFORM_WIN32_KHR
  444. table->ImportSemaphoreWin32HandleKHR = (PFN_vkImportSemaphoreWin32HandleKHR)gdpa(dev, "vkImportSemaphoreWin32HandleKHR");
  445. #endif // VK_USE_PLATFORM_WIN32_KHR
  446. #ifdef VK_USE_PLATFORM_WIN32_KHR
  447. table->GetSemaphoreWin32HandleKHR = (PFN_vkGetSemaphoreWin32HandleKHR)gdpa(dev, "vkGetSemaphoreWin32HandleKHR");
  448. #endif // VK_USE_PLATFORM_WIN32_KHR
  449. // ---- VK_KHR_external_semaphore_fd extension commands
  450. table->ImportSemaphoreFdKHR = (PFN_vkImportSemaphoreFdKHR)gdpa(dev, "vkImportSemaphoreFdKHR");
  451. table->GetSemaphoreFdKHR = (PFN_vkGetSemaphoreFdKHR)gdpa(dev, "vkGetSemaphoreFdKHR");
  452. // ---- VK_KHR_push_descriptor extension commands
  453. table->CmdPushDescriptorSetKHR = (PFN_vkCmdPushDescriptorSetKHR)gdpa(dev, "vkCmdPushDescriptorSetKHR");
  454. table->CmdPushDescriptorSetWithTemplateKHR = (PFN_vkCmdPushDescriptorSetWithTemplateKHR)gdpa(dev, "vkCmdPushDescriptorSetWithTemplateKHR");
  455. // ---- VK_KHR_descriptor_update_template extension commands
  456. table->CreateDescriptorUpdateTemplateKHR = (PFN_vkCreateDescriptorUpdateTemplateKHR)gdpa(dev, "vkCreateDescriptorUpdateTemplateKHR");
  457. table->DestroyDescriptorUpdateTemplateKHR = (PFN_vkDestroyDescriptorUpdateTemplateKHR)gdpa(dev, "vkDestroyDescriptorUpdateTemplateKHR");
  458. table->UpdateDescriptorSetWithTemplateKHR = (PFN_vkUpdateDescriptorSetWithTemplateKHR)gdpa(dev, "vkUpdateDescriptorSetWithTemplateKHR");
  459. // ---- VK_KHR_create_renderpass2 extension commands
  460. table->CreateRenderPass2KHR = (PFN_vkCreateRenderPass2KHR)gdpa(dev, "vkCreateRenderPass2KHR");
  461. table->CmdBeginRenderPass2KHR = (PFN_vkCmdBeginRenderPass2KHR)gdpa(dev, "vkCmdBeginRenderPass2KHR");
  462. table->CmdNextSubpass2KHR = (PFN_vkCmdNextSubpass2KHR)gdpa(dev, "vkCmdNextSubpass2KHR");
  463. table->CmdEndRenderPass2KHR = (PFN_vkCmdEndRenderPass2KHR)gdpa(dev, "vkCmdEndRenderPass2KHR");
  464. // ---- VK_KHR_shared_presentable_image extension commands
  465. table->GetSwapchainStatusKHR = (PFN_vkGetSwapchainStatusKHR)gdpa(dev, "vkGetSwapchainStatusKHR");
  466. // ---- VK_KHR_external_fence_win32 extension commands
  467. #ifdef VK_USE_PLATFORM_WIN32_KHR
  468. table->ImportFenceWin32HandleKHR = (PFN_vkImportFenceWin32HandleKHR)gdpa(dev, "vkImportFenceWin32HandleKHR");
  469. #endif // VK_USE_PLATFORM_WIN32_KHR
  470. #ifdef VK_USE_PLATFORM_WIN32_KHR
  471. table->GetFenceWin32HandleKHR = (PFN_vkGetFenceWin32HandleKHR)gdpa(dev, "vkGetFenceWin32HandleKHR");
  472. #endif // VK_USE_PLATFORM_WIN32_KHR
  473. // ---- VK_KHR_external_fence_fd extension commands
  474. table->ImportFenceFdKHR = (PFN_vkImportFenceFdKHR)gdpa(dev, "vkImportFenceFdKHR");
  475. table->GetFenceFdKHR = (PFN_vkGetFenceFdKHR)gdpa(dev, "vkGetFenceFdKHR");
  476. // ---- VK_KHR_performance_query extension commands
  477. table->AcquireProfilingLockKHR = (PFN_vkAcquireProfilingLockKHR)gdpa(dev, "vkAcquireProfilingLockKHR");
  478. table->ReleaseProfilingLockKHR = (PFN_vkReleaseProfilingLockKHR)gdpa(dev, "vkReleaseProfilingLockKHR");
  479. // ---- VK_KHR_get_memory_requirements2 extension commands
  480. table->GetImageMemoryRequirements2KHR = (PFN_vkGetImageMemoryRequirements2KHR)gdpa(dev, "vkGetImageMemoryRequirements2KHR");
  481. table->GetBufferMemoryRequirements2KHR = (PFN_vkGetBufferMemoryRequirements2KHR)gdpa(dev, "vkGetBufferMemoryRequirements2KHR");
  482. table->GetImageSparseMemoryRequirements2KHR = (PFN_vkGetImageSparseMemoryRequirements2KHR)gdpa(dev, "vkGetImageSparseMemoryRequirements2KHR");
  483. // ---- VK_KHR_sampler_ycbcr_conversion extension commands
  484. table->CreateSamplerYcbcrConversionKHR = (PFN_vkCreateSamplerYcbcrConversionKHR)gdpa(dev, "vkCreateSamplerYcbcrConversionKHR");
  485. table->DestroySamplerYcbcrConversionKHR = (PFN_vkDestroySamplerYcbcrConversionKHR)gdpa(dev, "vkDestroySamplerYcbcrConversionKHR");
  486. // ---- VK_KHR_bind_memory2 extension commands
  487. table->BindBufferMemory2KHR = (PFN_vkBindBufferMemory2KHR)gdpa(dev, "vkBindBufferMemory2KHR");
  488. table->BindImageMemory2KHR = (PFN_vkBindImageMemory2KHR)gdpa(dev, "vkBindImageMemory2KHR");
  489. // ---- VK_KHR_maintenance3 extension commands
  490. table->GetDescriptorSetLayoutSupportKHR = (PFN_vkGetDescriptorSetLayoutSupportKHR)gdpa(dev, "vkGetDescriptorSetLayoutSupportKHR");
  491. // ---- VK_KHR_draw_indirect_count extension commands
  492. table->CmdDrawIndirectCountKHR = (PFN_vkCmdDrawIndirectCountKHR)gdpa(dev, "vkCmdDrawIndirectCountKHR");
  493. table->CmdDrawIndexedIndirectCountKHR = (PFN_vkCmdDrawIndexedIndirectCountKHR)gdpa(dev, "vkCmdDrawIndexedIndirectCountKHR");
  494. // ---- VK_KHR_timeline_semaphore extension commands
  495. table->GetSemaphoreCounterValueKHR = (PFN_vkGetSemaphoreCounterValueKHR)gdpa(dev, "vkGetSemaphoreCounterValueKHR");
  496. table->WaitSemaphoresKHR = (PFN_vkWaitSemaphoresKHR)gdpa(dev, "vkWaitSemaphoresKHR");
  497. table->SignalSemaphoreKHR = (PFN_vkSignalSemaphoreKHR)gdpa(dev, "vkSignalSemaphoreKHR");
  498. // ---- VK_KHR_fragment_shading_rate extension commands
  499. table->CmdSetFragmentShadingRateKHR = (PFN_vkCmdSetFragmentShadingRateKHR)gdpa(dev, "vkCmdSetFragmentShadingRateKHR");
  500. // ---- VK_KHR_buffer_device_address extension commands
  501. table->GetBufferDeviceAddressKHR = (PFN_vkGetBufferDeviceAddressKHR)gdpa(dev, "vkGetBufferDeviceAddressKHR");
  502. table->GetBufferOpaqueCaptureAddressKHR = (PFN_vkGetBufferOpaqueCaptureAddressKHR)gdpa(dev, "vkGetBufferOpaqueCaptureAddressKHR");
  503. table->GetDeviceMemoryOpaqueCaptureAddressKHR = (PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR)gdpa(dev, "vkGetDeviceMemoryOpaqueCaptureAddressKHR");
  504. // ---- VK_KHR_deferred_host_operations extension commands
  505. table->CreateDeferredOperationKHR = (PFN_vkCreateDeferredOperationKHR)gdpa(dev, "vkCreateDeferredOperationKHR");
  506. table->DestroyDeferredOperationKHR = (PFN_vkDestroyDeferredOperationKHR)gdpa(dev, "vkDestroyDeferredOperationKHR");
  507. table->GetDeferredOperationMaxConcurrencyKHR = (PFN_vkGetDeferredOperationMaxConcurrencyKHR)gdpa(dev, "vkGetDeferredOperationMaxConcurrencyKHR");
  508. table->GetDeferredOperationResultKHR = (PFN_vkGetDeferredOperationResultKHR)gdpa(dev, "vkGetDeferredOperationResultKHR");
  509. table->DeferredOperationJoinKHR = (PFN_vkDeferredOperationJoinKHR)gdpa(dev, "vkDeferredOperationJoinKHR");
  510. // ---- VK_KHR_pipeline_executable_properties extension commands
  511. table->GetPipelineExecutablePropertiesKHR = (PFN_vkGetPipelineExecutablePropertiesKHR)gdpa(dev, "vkGetPipelineExecutablePropertiesKHR");
  512. table->GetPipelineExecutableStatisticsKHR = (PFN_vkGetPipelineExecutableStatisticsKHR)gdpa(dev, "vkGetPipelineExecutableStatisticsKHR");
  513. table->GetPipelineExecutableInternalRepresentationsKHR = (PFN_vkGetPipelineExecutableInternalRepresentationsKHR)gdpa(dev, "vkGetPipelineExecutableInternalRepresentationsKHR");
  514. // ---- VK_KHR_copy_commands2 extension commands
  515. table->CmdCopyBuffer2KHR = (PFN_vkCmdCopyBuffer2KHR)gdpa(dev, "vkCmdCopyBuffer2KHR");
  516. table->CmdCopyImage2KHR = (PFN_vkCmdCopyImage2KHR)gdpa(dev, "vkCmdCopyImage2KHR");
  517. table->CmdCopyBufferToImage2KHR = (PFN_vkCmdCopyBufferToImage2KHR)gdpa(dev, "vkCmdCopyBufferToImage2KHR");
  518. table->CmdCopyImageToBuffer2KHR = (PFN_vkCmdCopyImageToBuffer2KHR)gdpa(dev, "vkCmdCopyImageToBuffer2KHR");
  519. table->CmdBlitImage2KHR = (PFN_vkCmdBlitImage2KHR)gdpa(dev, "vkCmdBlitImage2KHR");
  520. table->CmdResolveImage2KHR = (PFN_vkCmdResolveImage2KHR)gdpa(dev, "vkCmdResolveImage2KHR");
  521. // ---- VK_EXT_debug_marker extension commands
  522. table->DebugMarkerSetObjectTagEXT = (PFN_vkDebugMarkerSetObjectTagEXT)gdpa(dev, "vkDebugMarkerSetObjectTagEXT");
  523. table->DebugMarkerSetObjectNameEXT = (PFN_vkDebugMarkerSetObjectNameEXT)gdpa(dev, "vkDebugMarkerSetObjectNameEXT");
  524. table->CmdDebugMarkerBeginEXT = (PFN_vkCmdDebugMarkerBeginEXT)gdpa(dev, "vkCmdDebugMarkerBeginEXT");
  525. table->CmdDebugMarkerEndEXT = (PFN_vkCmdDebugMarkerEndEXT)gdpa(dev, "vkCmdDebugMarkerEndEXT");
  526. table->CmdDebugMarkerInsertEXT = (PFN_vkCmdDebugMarkerInsertEXT)gdpa(dev, "vkCmdDebugMarkerInsertEXT");
  527. // ---- VK_EXT_transform_feedback extension commands
  528. table->CmdBindTransformFeedbackBuffersEXT = (PFN_vkCmdBindTransformFeedbackBuffersEXT)gdpa(dev, "vkCmdBindTransformFeedbackBuffersEXT");
  529. table->CmdBeginTransformFeedbackEXT = (PFN_vkCmdBeginTransformFeedbackEXT)gdpa(dev, "vkCmdBeginTransformFeedbackEXT");
  530. table->CmdEndTransformFeedbackEXT = (PFN_vkCmdEndTransformFeedbackEXT)gdpa(dev, "vkCmdEndTransformFeedbackEXT");
  531. table->CmdBeginQueryIndexedEXT = (PFN_vkCmdBeginQueryIndexedEXT)gdpa(dev, "vkCmdBeginQueryIndexedEXT");
  532. table->CmdEndQueryIndexedEXT = (PFN_vkCmdEndQueryIndexedEXT)gdpa(dev, "vkCmdEndQueryIndexedEXT");
  533. table->CmdDrawIndirectByteCountEXT = (PFN_vkCmdDrawIndirectByteCountEXT)gdpa(dev, "vkCmdDrawIndirectByteCountEXT");
  534. // ---- VK_NVX_image_view_handle extension commands
  535. table->GetImageViewHandleNVX = (PFN_vkGetImageViewHandleNVX)gdpa(dev, "vkGetImageViewHandleNVX");
  536. table->GetImageViewAddressNVX = (PFN_vkGetImageViewAddressNVX)gdpa(dev, "vkGetImageViewAddressNVX");
  537. // ---- VK_AMD_draw_indirect_count extension commands
  538. table->CmdDrawIndirectCountAMD = (PFN_vkCmdDrawIndirectCountAMD)gdpa(dev, "vkCmdDrawIndirectCountAMD");
  539. table->CmdDrawIndexedIndirectCountAMD = (PFN_vkCmdDrawIndexedIndirectCountAMD)gdpa(dev, "vkCmdDrawIndexedIndirectCountAMD");
  540. // ---- VK_AMD_shader_info extension commands
  541. table->GetShaderInfoAMD = (PFN_vkGetShaderInfoAMD)gdpa(dev, "vkGetShaderInfoAMD");
  542. // ---- VK_NV_external_memory_win32 extension commands
  543. #ifdef VK_USE_PLATFORM_WIN32_KHR
  544. table->GetMemoryWin32HandleNV = (PFN_vkGetMemoryWin32HandleNV)gdpa(dev, "vkGetMemoryWin32HandleNV");
  545. #endif // VK_USE_PLATFORM_WIN32_KHR
  546. // ---- VK_EXT_conditional_rendering extension commands
  547. table->CmdBeginConditionalRenderingEXT = (PFN_vkCmdBeginConditionalRenderingEXT)gdpa(dev, "vkCmdBeginConditionalRenderingEXT");
  548. table->CmdEndConditionalRenderingEXT = (PFN_vkCmdEndConditionalRenderingEXT)gdpa(dev, "vkCmdEndConditionalRenderingEXT");
  549. // ---- VK_NV_clip_space_w_scaling extension commands
  550. table->CmdSetViewportWScalingNV = (PFN_vkCmdSetViewportWScalingNV)gdpa(dev, "vkCmdSetViewportWScalingNV");
  551. // ---- VK_EXT_display_control extension commands
  552. table->DisplayPowerControlEXT = (PFN_vkDisplayPowerControlEXT)gdpa(dev, "vkDisplayPowerControlEXT");
  553. table->RegisterDeviceEventEXT = (PFN_vkRegisterDeviceEventEXT)gdpa(dev, "vkRegisterDeviceEventEXT");
  554. table->RegisterDisplayEventEXT = (PFN_vkRegisterDisplayEventEXT)gdpa(dev, "vkRegisterDisplayEventEXT");
  555. table->GetSwapchainCounterEXT = (PFN_vkGetSwapchainCounterEXT)gdpa(dev, "vkGetSwapchainCounterEXT");
  556. // ---- VK_GOOGLE_display_timing extension commands
  557. table->GetRefreshCycleDurationGOOGLE = (PFN_vkGetRefreshCycleDurationGOOGLE)gdpa(dev, "vkGetRefreshCycleDurationGOOGLE");
  558. table->GetPastPresentationTimingGOOGLE = (PFN_vkGetPastPresentationTimingGOOGLE)gdpa(dev, "vkGetPastPresentationTimingGOOGLE");
  559. // ---- VK_EXT_discard_rectangles extension commands
  560. table->CmdSetDiscardRectangleEXT = (PFN_vkCmdSetDiscardRectangleEXT)gdpa(dev, "vkCmdSetDiscardRectangleEXT");
  561. // ---- VK_EXT_hdr_metadata extension commands
  562. table->SetHdrMetadataEXT = (PFN_vkSetHdrMetadataEXT)gdpa(dev, "vkSetHdrMetadataEXT");
  563. // ---- VK_EXT_debug_utils extension commands
  564. table->SetDebugUtilsObjectNameEXT = (PFN_vkSetDebugUtilsObjectNameEXT)gipa(inst, "vkSetDebugUtilsObjectNameEXT");
  565. table->SetDebugUtilsObjectTagEXT = (PFN_vkSetDebugUtilsObjectTagEXT)gipa(inst, "vkSetDebugUtilsObjectTagEXT");
  566. table->QueueBeginDebugUtilsLabelEXT = (PFN_vkQueueBeginDebugUtilsLabelEXT)gipa(inst, "vkQueueBeginDebugUtilsLabelEXT");
  567. table->QueueEndDebugUtilsLabelEXT = (PFN_vkQueueEndDebugUtilsLabelEXT)gipa(inst, "vkQueueEndDebugUtilsLabelEXT");
  568. table->QueueInsertDebugUtilsLabelEXT = (PFN_vkQueueInsertDebugUtilsLabelEXT)gipa(inst, "vkQueueInsertDebugUtilsLabelEXT");
  569. table->CmdBeginDebugUtilsLabelEXT = (PFN_vkCmdBeginDebugUtilsLabelEXT)gipa(inst, "vkCmdBeginDebugUtilsLabelEXT");
  570. table->CmdEndDebugUtilsLabelEXT = (PFN_vkCmdEndDebugUtilsLabelEXT)gipa(inst, "vkCmdEndDebugUtilsLabelEXT");
  571. table->CmdInsertDebugUtilsLabelEXT = (PFN_vkCmdInsertDebugUtilsLabelEXT)gipa(inst, "vkCmdInsertDebugUtilsLabelEXT");
  572. // ---- VK_ANDROID_external_memory_android_hardware_buffer extension commands
  573. #ifdef VK_USE_PLATFORM_ANDROID_KHR
  574. table->GetAndroidHardwareBufferPropertiesANDROID = (PFN_vkGetAndroidHardwareBufferPropertiesANDROID)gdpa(dev, "vkGetAndroidHardwareBufferPropertiesANDROID");
  575. #endif // VK_USE_PLATFORM_ANDROID_KHR
  576. #ifdef VK_USE_PLATFORM_ANDROID_KHR
  577. table->GetMemoryAndroidHardwareBufferANDROID = (PFN_vkGetMemoryAndroidHardwareBufferANDROID)gdpa(dev, "vkGetMemoryAndroidHardwareBufferANDROID");
  578. #endif // VK_USE_PLATFORM_ANDROID_KHR
  579. // ---- VK_EXT_sample_locations extension commands
  580. table->CmdSetSampleLocationsEXT = (PFN_vkCmdSetSampleLocationsEXT)gdpa(dev, "vkCmdSetSampleLocationsEXT");
  581. // ---- VK_EXT_image_drm_format_modifier extension commands
  582. table->GetImageDrmFormatModifierPropertiesEXT = (PFN_vkGetImageDrmFormatModifierPropertiesEXT)gdpa(dev, "vkGetImageDrmFormatModifierPropertiesEXT");
  583. // ---- VK_EXT_validation_cache extension commands
  584. table->CreateValidationCacheEXT = (PFN_vkCreateValidationCacheEXT)gdpa(dev, "vkCreateValidationCacheEXT");
  585. table->DestroyValidationCacheEXT = (PFN_vkDestroyValidationCacheEXT)gdpa(dev, "vkDestroyValidationCacheEXT");
  586. table->MergeValidationCachesEXT = (PFN_vkMergeValidationCachesEXT)gdpa(dev, "vkMergeValidationCachesEXT");
  587. table->GetValidationCacheDataEXT = (PFN_vkGetValidationCacheDataEXT)gdpa(dev, "vkGetValidationCacheDataEXT");
  588. // ---- VK_NV_shading_rate_image extension commands
  589. table->CmdBindShadingRateImageNV = (PFN_vkCmdBindShadingRateImageNV)gdpa(dev, "vkCmdBindShadingRateImageNV");
  590. table->CmdSetViewportShadingRatePaletteNV = (PFN_vkCmdSetViewportShadingRatePaletteNV)gdpa(dev, "vkCmdSetViewportShadingRatePaletteNV");
  591. table->CmdSetCoarseSampleOrderNV = (PFN_vkCmdSetCoarseSampleOrderNV)gdpa(dev, "vkCmdSetCoarseSampleOrderNV");
  592. // ---- VK_NV_ray_tracing extension commands
  593. table->CreateAccelerationStructureNV = (PFN_vkCreateAccelerationStructureNV)gdpa(dev, "vkCreateAccelerationStructureNV");
  594. table->DestroyAccelerationStructureNV = (PFN_vkDestroyAccelerationStructureNV)gdpa(dev, "vkDestroyAccelerationStructureNV");
  595. table->GetAccelerationStructureMemoryRequirementsNV = (PFN_vkGetAccelerationStructureMemoryRequirementsNV)gdpa(dev, "vkGetAccelerationStructureMemoryRequirementsNV");
  596. table->BindAccelerationStructureMemoryNV = (PFN_vkBindAccelerationStructureMemoryNV)gdpa(dev, "vkBindAccelerationStructureMemoryNV");
  597. table->CmdBuildAccelerationStructureNV = (PFN_vkCmdBuildAccelerationStructureNV)gdpa(dev, "vkCmdBuildAccelerationStructureNV");
  598. table->CmdCopyAccelerationStructureNV = (PFN_vkCmdCopyAccelerationStructureNV)gdpa(dev, "vkCmdCopyAccelerationStructureNV");
  599. table->CmdTraceRaysNV = (PFN_vkCmdTraceRaysNV)gdpa(dev, "vkCmdTraceRaysNV");
  600. table->CreateRayTracingPipelinesNV = (PFN_vkCreateRayTracingPipelinesNV)gdpa(dev, "vkCreateRayTracingPipelinesNV");
  601. table->GetRayTracingShaderGroupHandlesKHR = (PFN_vkGetRayTracingShaderGroupHandlesKHR)gdpa(dev, "vkGetRayTracingShaderGroupHandlesKHR");
  602. table->GetRayTracingShaderGroupHandlesNV = (PFN_vkGetRayTracingShaderGroupHandlesNV)gdpa(dev, "vkGetRayTracingShaderGroupHandlesNV");
  603. table->GetAccelerationStructureHandleNV = (PFN_vkGetAccelerationStructureHandleNV)gdpa(dev, "vkGetAccelerationStructureHandleNV");
  604. table->CmdWriteAccelerationStructuresPropertiesNV = (PFN_vkCmdWriteAccelerationStructuresPropertiesNV)gdpa(dev, "vkCmdWriteAccelerationStructuresPropertiesNV");
  605. table->CompileDeferredNV = (PFN_vkCompileDeferredNV)gdpa(dev, "vkCompileDeferredNV");
  606. // ---- VK_EXT_external_memory_host extension commands
  607. table->GetMemoryHostPointerPropertiesEXT = (PFN_vkGetMemoryHostPointerPropertiesEXT)gdpa(dev, "vkGetMemoryHostPointerPropertiesEXT");
  608. // ---- VK_AMD_buffer_marker extension commands
  609. table->CmdWriteBufferMarkerAMD = (PFN_vkCmdWriteBufferMarkerAMD)gdpa(dev, "vkCmdWriteBufferMarkerAMD");
  610. // ---- VK_EXT_calibrated_timestamps extension commands
  611. table->GetCalibratedTimestampsEXT = (PFN_vkGetCalibratedTimestampsEXT)gdpa(dev, "vkGetCalibratedTimestampsEXT");
  612. // ---- VK_NV_mesh_shader extension commands
  613. table->CmdDrawMeshTasksNV = (PFN_vkCmdDrawMeshTasksNV)gdpa(dev, "vkCmdDrawMeshTasksNV");
  614. table->CmdDrawMeshTasksIndirectNV = (PFN_vkCmdDrawMeshTasksIndirectNV)gdpa(dev, "vkCmdDrawMeshTasksIndirectNV");
  615. table->CmdDrawMeshTasksIndirectCountNV = (PFN_vkCmdDrawMeshTasksIndirectCountNV)gdpa(dev, "vkCmdDrawMeshTasksIndirectCountNV");
  616. // ---- VK_NV_scissor_exclusive extension commands
  617. table->CmdSetExclusiveScissorNV = (PFN_vkCmdSetExclusiveScissorNV)gdpa(dev, "vkCmdSetExclusiveScissorNV");
  618. // ---- VK_NV_device_diagnostic_checkpoints extension commands
  619. table->CmdSetCheckpointNV = (PFN_vkCmdSetCheckpointNV)gdpa(dev, "vkCmdSetCheckpointNV");
  620. table->GetQueueCheckpointDataNV = (PFN_vkGetQueueCheckpointDataNV)gdpa(dev, "vkGetQueueCheckpointDataNV");
  621. // ---- VK_INTEL_performance_query extension commands
  622. table->InitializePerformanceApiINTEL = (PFN_vkInitializePerformanceApiINTEL)gdpa(dev, "vkInitializePerformanceApiINTEL");
  623. table->UninitializePerformanceApiINTEL = (PFN_vkUninitializePerformanceApiINTEL)gdpa(dev, "vkUninitializePerformanceApiINTEL");
  624. table->CmdSetPerformanceMarkerINTEL = (PFN_vkCmdSetPerformanceMarkerINTEL)gdpa(dev, "vkCmdSetPerformanceMarkerINTEL");
  625. table->CmdSetPerformanceStreamMarkerINTEL = (PFN_vkCmdSetPerformanceStreamMarkerINTEL)gdpa(dev, "vkCmdSetPerformanceStreamMarkerINTEL");
  626. table->CmdSetPerformanceOverrideINTEL = (PFN_vkCmdSetPerformanceOverrideINTEL)gdpa(dev, "vkCmdSetPerformanceOverrideINTEL");
  627. table->AcquirePerformanceConfigurationINTEL = (PFN_vkAcquirePerformanceConfigurationINTEL)gdpa(dev, "vkAcquirePerformanceConfigurationINTEL");
  628. table->ReleasePerformanceConfigurationINTEL = (PFN_vkReleasePerformanceConfigurationINTEL)gdpa(dev, "vkReleasePerformanceConfigurationINTEL");
  629. table->QueueSetPerformanceConfigurationINTEL = (PFN_vkQueueSetPerformanceConfigurationINTEL)gdpa(dev, "vkQueueSetPerformanceConfigurationINTEL");
  630. table->GetPerformanceParameterINTEL = (PFN_vkGetPerformanceParameterINTEL)gdpa(dev, "vkGetPerformanceParameterINTEL");
  631. // ---- VK_AMD_display_native_hdr extension commands
  632. table->SetLocalDimmingAMD = (PFN_vkSetLocalDimmingAMD)gdpa(dev, "vkSetLocalDimmingAMD");
  633. // ---- VK_EXT_buffer_device_address extension commands
  634. table->GetBufferDeviceAddressEXT = (PFN_vkGetBufferDeviceAddressEXT)gdpa(dev, "vkGetBufferDeviceAddressEXT");
  635. // ---- VK_EXT_full_screen_exclusive extension commands
  636. #ifdef VK_USE_PLATFORM_WIN32_KHR
  637. table->AcquireFullScreenExclusiveModeEXT = (PFN_vkAcquireFullScreenExclusiveModeEXT)gdpa(dev, "vkAcquireFullScreenExclusiveModeEXT");
  638. #endif // VK_USE_PLATFORM_WIN32_KHR
  639. #ifdef VK_USE_PLATFORM_WIN32_KHR
  640. table->ReleaseFullScreenExclusiveModeEXT = (PFN_vkReleaseFullScreenExclusiveModeEXT)gdpa(dev, "vkReleaseFullScreenExclusiveModeEXT");
  641. #endif // VK_USE_PLATFORM_WIN32_KHR
  642. #ifdef VK_USE_PLATFORM_WIN32_KHR
  643. table->GetDeviceGroupSurfacePresentModes2EXT = (PFN_vkGetDeviceGroupSurfacePresentModes2EXT)gdpa(dev, "vkGetDeviceGroupSurfacePresentModes2EXT");
  644. #endif // VK_USE_PLATFORM_WIN32_KHR
  645. // ---- VK_EXT_line_rasterization extension commands
  646. table->CmdSetLineStippleEXT = (PFN_vkCmdSetLineStippleEXT)gdpa(dev, "vkCmdSetLineStippleEXT");
  647. // ---- VK_EXT_host_query_reset extension commands
  648. table->ResetQueryPoolEXT = (PFN_vkResetQueryPoolEXT)gdpa(dev, "vkResetQueryPoolEXT");
  649. // ---- VK_EXT_extended_dynamic_state extension commands
  650. table->CmdSetCullModeEXT = (PFN_vkCmdSetCullModeEXT)gdpa(dev, "vkCmdSetCullModeEXT");
  651. table->CmdSetFrontFaceEXT = (PFN_vkCmdSetFrontFaceEXT)gdpa(dev, "vkCmdSetFrontFaceEXT");
  652. table->CmdSetPrimitiveTopologyEXT = (PFN_vkCmdSetPrimitiveTopologyEXT)gdpa(dev, "vkCmdSetPrimitiveTopologyEXT");
  653. table->CmdSetViewportWithCountEXT = (PFN_vkCmdSetViewportWithCountEXT)gdpa(dev, "vkCmdSetViewportWithCountEXT");
  654. table->CmdSetScissorWithCountEXT = (PFN_vkCmdSetScissorWithCountEXT)gdpa(dev, "vkCmdSetScissorWithCountEXT");
  655. table->CmdBindVertexBuffers2EXT = (PFN_vkCmdBindVertexBuffers2EXT)gdpa(dev, "vkCmdBindVertexBuffers2EXT");
  656. table->CmdSetDepthTestEnableEXT = (PFN_vkCmdSetDepthTestEnableEXT)gdpa(dev, "vkCmdSetDepthTestEnableEXT");
  657. table->CmdSetDepthWriteEnableEXT = (PFN_vkCmdSetDepthWriteEnableEXT)gdpa(dev, "vkCmdSetDepthWriteEnableEXT");
  658. table->CmdSetDepthCompareOpEXT = (PFN_vkCmdSetDepthCompareOpEXT)gdpa(dev, "vkCmdSetDepthCompareOpEXT");
  659. table->CmdSetDepthBoundsTestEnableEXT = (PFN_vkCmdSetDepthBoundsTestEnableEXT)gdpa(dev, "vkCmdSetDepthBoundsTestEnableEXT");
  660. table->CmdSetStencilTestEnableEXT = (PFN_vkCmdSetStencilTestEnableEXT)gdpa(dev, "vkCmdSetStencilTestEnableEXT");
  661. table->CmdSetStencilOpEXT = (PFN_vkCmdSetStencilOpEXT)gdpa(dev, "vkCmdSetStencilOpEXT");
  662. // ---- VK_NV_device_generated_commands extension commands
  663. table->GetGeneratedCommandsMemoryRequirementsNV = (PFN_vkGetGeneratedCommandsMemoryRequirementsNV)gdpa(dev, "vkGetGeneratedCommandsMemoryRequirementsNV");
  664. table->CmdPreprocessGeneratedCommandsNV = (PFN_vkCmdPreprocessGeneratedCommandsNV)gdpa(dev, "vkCmdPreprocessGeneratedCommandsNV");
  665. table->CmdExecuteGeneratedCommandsNV = (PFN_vkCmdExecuteGeneratedCommandsNV)gdpa(dev, "vkCmdExecuteGeneratedCommandsNV");
  666. table->CmdBindPipelineShaderGroupNV = (PFN_vkCmdBindPipelineShaderGroupNV)gdpa(dev, "vkCmdBindPipelineShaderGroupNV");
  667. table->CreateIndirectCommandsLayoutNV = (PFN_vkCreateIndirectCommandsLayoutNV)gdpa(dev, "vkCreateIndirectCommandsLayoutNV");
  668. table->DestroyIndirectCommandsLayoutNV = (PFN_vkDestroyIndirectCommandsLayoutNV)gdpa(dev, "vkDestroyIndirectCommandsLayoutNV");
  669. // ---- VK_EXT_private_data extension commands
  670. table->CreatePrivateDataSlotEXT = (PFN_vkCreatePrivateDataSlotEXT)gdpa(dev, "vkCreatePrivateDataSlotEXT");
  671. table->DestroyPrivateDataSlotEXT = (PFN_vkDestroyPrivateDataSlotEXT)gdpa(dev, "vkDestroyPrivateDataSlotEXT");
  672. table->SetPrivateDataEXT = (PFN_vkSetPrivateDataEXT)gdpa(dev, "vkSetPrivateDataEXT");
  673. table->GetPrivateDataEXT = (PFN_vkGetPrivateDataEXT)gdpa(dev, "vkGetPrivateDataEXT");
  674. // ---- VK_NV_fragment_shading_rate_enums extension commands
  675. table->CmdSetFragmentShadingRateEnumNV = (PFN_vkCmdSetFragmentShadingRateEnumNV)gdpa(dev, "vkCmdSetFragmentShadingRateEnumNV");
  676. // ---- VK_KHR_acceleration_structure extension commands
  677. table->CreateAccelerationStructureKHR = (PFN_vkCreateAccelerationStructureKHR)gdpa(dev, "vkCreateAccelerationStructureKHR");
  678. table->DestroyAccelerationStructureKHR = (PFN_vkDestroyAccelerationStructureKHR)gdpa(dev, "vkDestroyAccelerationStructureKHR");
  679. table->CmdBuildAccelerationStructuresKHR = (PFN_vkCmdBuildAccelerationStructuresKHR)gdpa(dev, "vkCmdBuildAccelerationStructuresKHR");
  680. table->CmdBuildAccelerationStructuresIndirectKHR = (PFN_vkCmdBuildAccelerationStructuresIndirectKHR)gdpa(dev, "vkCmdBuildAccelerationStructuresIndirectKHR");
  681. table->BuildAccelerationStructuresKHR = (PFN_vkBuildAccelerationStructuresKHR)gdpa(dev, "vkBuildAccelerationStructuresKHR");
  682. table->CopyAccelerationStructureKHR = (PFN_vkCopyAccelerationStructureKHR)gdpa(dev, "vkCopyAccelerationStructureKHR");
  683. table->CopyAccelerationStructureToMemoryKHR = (PFN_vkCopyAccelerationStructureToMemoryKHR)gdpa(dev, "vkCopyAccelerationStructureToMemoryKHR");
  684. table->CopyMemoryToAccelerationStructureKHR = (PFN_vkCopyMemoryToAccelerationStructureKHR)gdpa(dev, "vkCopyMemoryToAccelerationStructureKHR");
  685. table->WriteAccelerationStructuresPropertiesKHR = (PFN_vkWriteAccelerationStructuresPropertiesKHR)gdpa(dev, "vkWriteAccelerationStructuresPropertiesKHR");
  686. table->CmdCopyAccelerationStructureKHR = (PFN_vkCmdCopyAccelerationStructureKHR)gdpa(dev, "vkCmdCopyAccelerationStructureKHR");
  687. table->CmdCopyAccelerationStructureToMemoryKHR = (PFN_vkCmdCopyAccelerationStructureToMemoryKHR)gdpa(dev, "vkCmdCopyAccelerationStructureToMemoryKHR");
  688. table->CmdCopyMemoryToAccelerationStructureKHR = (PFN_vkCmdCopyMemoryToAccelerationStructureKHR)gdpa(dev, "vkCmdCopyMemoryToAccelerationStructureKHR");
  689. table->GetAccelerationStructureDeviceAddressKHR = (PFN_vkGetAccelerationStructureDeviceAddressKHR)gdpa(dev, "vkGetAccelerationStructureDeviceAddressKHR");
  690. table->CmdWriteAccelerationStructuresPropertiesKHR = (PFN_vkCmdWriteAccelerationStructuresPropertiesKHR)gdpa(dev, "vkCmdWriteAccelerationStructuresPropertiesKHR");
  691. table->GetDeviceAccelerationStructureCompatibilityKHR = (PFN_vkGetDeviceAccelerationStructureCompatibilityKHR)gdpa(dev, "vkGetDeviceAccelerationStructureCompatibilityKHR");
  692. table->GetAccelerationStructureBuildSizesKHR = (PFN_vkGetAccelerationStructureBuildSizesKHR)gdpa(dev, "vkGetAccelerationStructureBuildSizesKHR");
  693. // ---- VK_KHR_ray_tracing_pipeline extension commands
  694. table->CmdTraceRaysKHR = (PFN_vkCmdTraceRaysKHR)gdpa(dev, "vkCmdTraceRaysKHR");
  695. table->CreateRayTracingPipelinesKHR = (PFN_vkCreateRayTracingPipelinesKHR)gdpa(dev, "vkCreateRayTracingPipelinesKHR");
  696. table->GetRayTracingCaptureReplayShaderGroupHandlesKHR = (PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR)gdpa(dev, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR");
  697. table->CmdTraceRaysIndirectKHR = (PFN_vkCmdTraceRaysIndirectKHR)gdpa(dev, "vkCmdTraceRaysIndirectKHR");
  698. table->GetRayTracingShaderGroupStackSizeKHR = (PFN_vkGetRayTracingShaderGroupStackSizeKHR)gdpa(dev, "vkGetRayTracingShaderGroupStackSizeKHR");
  699. table->CmdSetRayTracingPipelineStackSizeKHR = (PFN_vkCmdSetRayTracingPipelineStackSizeKHR)gdpa(dev, "vkCmdSetRayTracingPipelineStackSizeKHR");
  700. }
  701. // Init Instance function pointer dispatch table with core commands
  702. VKAPI_ATTR void VKAPI_CALL loader_init_instance_core_dispatch_table(VkLayerInstanceDispatchTable *table, PFN_vkGetInstanceProcAddr gpa,
  703. VkInstance inst) {
  704. // ---- Core 1_0 commands
  705. table->DestroyInstance = (PFN_vkDestroyInstance)gpa(inst, "vkDestroyInstance");
  706. table->EnumeratePhysicalDevices = (PFN_vkEnumeratePhysicalDevices)gpa(inst, "vkEnumeratePhysicalDevices");
  707. table->GetPhysicalDeviceFeatures = (PFN_vkGetPhysicalDeviceFeatures)gpa(inst, "vkGetPhysicalDeviceFeatures");
  708. table->GetPhysicalDeviceFormatProperties = (PFN_vkGetPhysicalDeviceFormatProperties)gpa(inst, "vkGetPhysicalDeviceFormatProperties");
  709. table->GetPhysicalDeviceImageFormatProperties = (PFN_vkGetPhysicalDeviceImageFormatProperties)gpa(inst, "vkGetPhysicalDeviceImageFormatProperties");
  710. table->GetPhysicalDeviceProperties = (PFN_vkGetPhysicalDeviceProperties)gpa(inst, "vkGetPhysicalDeviceProperties");
  711. table->GetPhysicalDeviceQueueFamilyProperties = (PFN_vkGetPhysicalDeviceQueueFamilyProperties)gpa(inst, "vkGetPhysicalDeviceQueueFamilyProperties");
  712. table->GetPhysicalDeviceMemoryProperties = (PFN_vkGetPhysicalDeviceMemoryProperties)gpa(inst, "vkGetPhysicalDeviceMemoryProperties");
  713. table->GetInstanceProcAddr = gpa;
  714. table->EnumerateDeviceExtensionProperties = (PFN_vkEnumerateDeviceExtensionProperties)gpa(inst, "vkEnumerateDeviceExtensionProperties");
  715. table->EnumerateDeviceLayerProperties = (PFN_vkEnumerateDeviceLayerProperties)gpa(inst, "vkEnumerateDeviceLayerProperties");
  716. table->GetPhysicalDeviceSparseImageFormatProperties = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties)gpa(inst, "vkGetPhysicalDeviceSparseImageFormatProperties");
  717. // ---- Core 1_1 commands
  718. table->EnumeratePhysicalDeviceGroups = (PFN_vkEnumeratePhysicalDeviceGroups)gpa(inst, "vkEnumeratePhysicalDeviceGroups");
  719. table->GetPhysicalDeviceFeatures2 = (PFN_vkGetPhysicalDeviceFeatures2)gpa(inst, "vkGetPhysicalDeviceFeatures2");
  720. table->GetPhysicalDeviceProperties2 = (PFN_vkGetPhysicalDeviceProperties2)gpa(inst, "vkGetPhysicalDeviceProperties2");
  721. table->GetPhysicalDeviceFormatProperties2 = (PFN_vkGetPhysicalDeviceFormatProperties2)gpa(inst, "vkGetPhysicalDeviceFormatProperties2");
  722. table->GetPhysicalDeviceImageFormatProperties2 = (PFN_vkGetPhysicalDeviceImageFormatProperties2)gpa(inst, "vkGetPhysicalDeviceImageFormatProperties2");
  723. table->GetPhysicalDeviceQueueFamilyProperties2 = (PFN_vkGetPhysicalDeviceQueueFamilyProperties2)gpa(inst, "vkGetPhysicalDeviceQueueFamilyProperties2");
  724. table->GetPhysicalDeviceMemoryProperties2 = (PFN_vkGetPhysicalDeviceMemoryProperties2)gpa(inst, "vkGetPhysicalDeviceMemoryProperties2");
  725. table->GetPhysicalDeviceSparseImageFormatProperties2 = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2)gpa(inst, "vkGetPhysicalDeviceSparseImageFormatProperties2");
  726. table->GetPhysicalDeviceExternalBufferProperties = (PFN_vkGetPhysicalDeviceExternalBufferProperties)gpa(inst, "vkGetPhysicalDeviceExternalBufferProperties");
  727. table->GetPhysicalDeviceExternalFenceProperties = (PFN_vkGetPhysicalDeviceExternalFenceProperties)gpa(inst, "vkGetPhysicalDeviceExternalFenceProperties");
  728. table->GetPhysicalDeviceExternalSemaphoreProperties = (PFN_vkGetPhysicalDeviceExternalSemaphoreProperties)gpa(inst, "vkGetPhysicalDeviceExternalSemaphoreProperties");
  729. }
  730. // Init Instance function pointer dispatch table with core commands
  731. VKAPI_ATTR void VKAPI_CALL loader_init_instance_extension_dispatch_table(VkLayerInstanceDispatchTable *table, PFN_vkGetInstanceProcAddr gpa,
  732. VkInstance inst) {
  733. // ---- VK_KHR_surface extension commands
  734. table->DestroySurfaceKHR = (PFN_vkDestroySurfaceKHR)gpa(inst, "vkDestroySurfaceKHR");
  735. table->GetPhysicalDeviceSurfaceSupportKHR = (PFN_vkGetPhysicalDeviceSurfaceSupportKHR)gpa(inst, "vkGetPhysicalDeviceSurfaceSupportKHR");
  736. table->GetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)gpa(inst, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
  737. table->GetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)gpa(inst, "vkGetPhysicalDeviceSurfaceFormatsKHR");
  738. table->GetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)gpa(inst, "vkGetPhysicalDeviceSurfacePresentModesKHR");
  739. // ---- VK_KHR_swapchain extension commands
  740. table->GetPhysicalDevicePresentRectanglesKHR = (PFN_vkGetPhysicalDevicePresentRectanglesKHR)gpa(inst, "vkGetPhysicalDevicePresentRectanglesKHR");
  741. // ---- VK_KHR_display extension commands
  742. table->GetPhysicalDeviceDisplayPropertiesKHR = (PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)gpa(inst, "vkGetPhysicalDeviceDisplayPropertiesKHR");
  743. table->GetPhysicalDeviceDisplayPlanePropertiesKHR = (PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)gpa(inst, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
  744. table->GetDisplayPlaneSupportedDisplaysKHR = (PFN_vkGetDisplayPlaneSupportedDisplaysKHR)gpa(inst, "vkGetDisplayPlaneSupportedDisplaysKHR");
  745. table->GetDisplayModePropertiesKHR = (PFN_vkGetDisplayModePropertiesKHR)gpa(inst, "vkGetDisplayModePropertiesKHR");
  746. table->CreateDisplayModeKHR = (PFN_vkCreateDisplayModeKHR)gpa(inst, "vkCreateDisplayModeKHR");
  747. table->GetDisplayPlaneCapabilitiesKHR = (PFN_vkGetDisplayPlaneCapabilitiesKHR)gpa(inst, "vkGetDisplayPlaneCapabilitiesKHR");
  748. table->CreateDisplayPlaneSurfaceKHR = (PFN_vkCreateDisplayPlaneSurfaceKHR)gpa(inst, "vkCreateDisplayPlaneSurfaceKHR");
  749. // ---- VK_KHR_xlib_surface extension commands
  750. #ifdef VK_USE_PLATFORM_XLIB_KHR
  751. table->CreateXlibSurfaceKHR = (PFN_vkCreateXlibSurfaceKHR)gpa(inst, "vkCreateXlibSurfaceKHR");
  752. #endif // VK_USE_PLATFORM_XLIB_KHR
  753. #ifdef VK_USE_PLATFORM_XLIB_KHR
  754. table->GetPhysicalDeviceXlibPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)gpa(inst, "vkGetPhysicalDeviceXlibPresentationSupportKHR");
  755. #endif // VK_USE_PLATFORM_XLIB_KHR
  756. // ---- VK_KHR_xcb_surface extension commands
  757. #ifdef VK_USE_PLATFORM_XCB_KHR
  758. table->CreateXcbSurfaceKHR = (PFN_vkCreateXcbSurfaceKHR)gpa(inst, "vkCreateXcbSurfaceKHR");
  759. #endif // VK_USE_PLATFORM_XCB_KHR
  760. #ifdef VK_USE_PLATFORM_XCB_KHR
  761. table->GetPhysicalDeviceXcbPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)gpa(inst, "vkGetPhysicalDeviceXcbPresentationSupportKHR");
  762. #endif // VK_USE_PLATFORM_XCB_KHR
  763. // ---- VK_KHR_wayland_surface extension commands
  764. #ifdef VK_USE_PLATFORM_WAYLAND_KHR
  765. table->CreateWaylandSurfaceKHR = (PFN_vkCreateWaylandSurfaceKHR)gpa(inst, "vkCreateWaylandSurfaceKHR");
  766. #endif // VK_USE_PLATFORM_WAYLAND_KHR
  767. #ifdef VK_USE_PLATFORM_WAYLAND_KHR
  768. table->GetPhysicalDeviceWaylandPresentationSupportKHR = (PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)gpa(inst, "vkGetPhysicalDeviceWaylandPresentationSupportKHR");
  769. #endif // VK_USE_PLATFORM_WAYLAND_KHR
  770. // ---- VK_KHR_android_surface extension commands
  771. #ifdef VK_USE_PLATFORM_ANDROID_KHR
  772. table->CreateAndroidSurfaceKHR = (PFN_vkCreateAndroidSurfaceKHR)gpa(inst, "vkCreateAndroidSurfaceKHR");
  773. #endif // VK_USE_PLATFORM_ANDROID_KHR
  774. // ---- VK_KHR_win32_surface extension commands
  775. #ifdef VK_USE_PLATFORM_WIN32_KHR
  776. table->CreateWin32SurfaceKHR = (PFN_vkCreateWin32SurfaceKHR)gpa(inst, "vkCreateWin32SurfaceKHR");
  777. #endif // VK_USE_PLATFORM_WIN32_KHR
  778. #ifdef VK_USE_PLATFORM_WIN32_KHR
  779. table->GetPhysicalDeviceWin32PresentationSupportKHR = (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)gpa(inst, "vkGetPhysicalDeviceWin32PresentationSupportKHR");
  780. #endif // VK_USE_PLATFORM_WIN32_KHR
  781. // ---- VK_KHR_get_physical_device_properties2 extension commands
  782. table->GetPhysicalDeviceFeatures2KHR = (PFN_vkGetPhysicalDeviceFeatures2KHR)gpa(inst, "vkGetPhysicalDeviceFeatures2KHR");
  783. table->GetPhysicalDeviceProperties2KHR = (PFN_vkGetPhysicalDeviceProperties2KHR)gpa(inst, "vkGetPhysicalDeviceProperties2KHR");
  784. table->GetPhysicalDeviceFormatProperties2KHR = (PFN_vkGetPhysicalDeviceFormatProperties2KHR)gpa(inst, "vkGetPhysicalDeviceFormatProperties2KHR");
  785. table->GetPhysicalDeviceImageFormatProperties2KHR = (PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)gpa(inst, "vkGetPhysicalDeviceImageFormatProperties2KHR");
  786. table->GetPhysicalDeviceQueueFamilyProperties2KHR = (PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)gpa(inst, "vkGetPhysicalDeviceQueueFamilyProperties2KHR");
  787. table->GetPhysicalDeviceMemoryProperties2KHR = (PFN_vkGetPhysicalDeviceMemoryProperties2KHR)gpa(inst, "vkGetPhysicalDeviceMemoryProperties2KHR");
  788. table->GetPhysicalDeviceSparseImageFormatProperties2KHR = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)gpa(inst, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR");
  789. // ---- VK_KHR_device_group_creation extension commands
  790. table->EnumeratePhysicalDeviceGroupsKHR = (PFN_vkEnumeratePhysicalDeviceGroupsKHR)gpa(inst, "vkEnumeratePhysicalDeviceGroupsKHR");
  791. // ---- VK_KHR_external_memory_capabilities extension commands
  792. table->GetPhysicalDeviceExternalBufferPropertiesKHR = (PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR)gpa(inst, "vkGetPhysicalDeviceExternalBufferPropertiesKHR");
  793. // ---- VK_KHR_external_semaphore_capabilities extension commands
  794. table->GetPhysicalDeviceExternalSemaphorePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR)gpa(inst, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR");
  795. // ---- VK_KHR_external_fence_capabilities extension commands
  796. table->GetPhysicalDeviceExternalFencePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR)gpa(inst, "vkGetPhysicalDeviceExternalFencePropertiesKHR");
  797. // ---- VK_KHR_performance_query extension commands
  798. table->EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = (PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR)gpa(inst, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR");
  799. table->GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = (PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR)gpa(inst, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR");
  800. // ---- VK_KHR_get_surface_capabilities2 extension commands
  801. table->GetPhysicalDeviceSurfaceCapabilities2KHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR)gpa(inst, "vkGetPhysicalDeviceSurfaceCapabilities2KHR");
  802. table->GetPhysicalDeviceSurfaceFormats2KHR = (PFN_vkGetPhysicalDeviceSurfaceFormats2KHR)gpa(inst, "vkGetPhysicalDeviceSurfaceFormats2KHR");
  803. // ---- VK_KHR_get_display_properties2 extension commands
  804. table->GetPhysicalDeviceDisplayProperties2KHR = (PFN_vkGetPhysicalDeviceDisplayProperties2KHR)gpa(inst, "vkGetPhysicalDeviceDisplayProperties2KHR");
  805. table->GetPhysicalDeviceDisplayPlaneProperties2KHR = (PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR)gpa(inst, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR");
  806. table->GetDisplayModeProperties2KHR = (PFN_vkGetDisplayModeProperties2KHR)gpa(inst, "vkGetDisplayModeProperties2KHR");
  807. table->GetDisplayPlaneCapabilities2KHR = (PFN_vkGetDisplayPlaneCapabilities2KHR)gpa(inst, "vkGetDisplayPlaneCapabilities2KHR");
  808. // ---- VK_KHR_fragment_shading_rate extension commands
  809. table->GetPhysicalDeviceFragmentShadingRatesKHR = (PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR)gpa(inst, "vkGetPhysicalDeviceFragmentShadingRatesKHR");
  810. // ---- VK_EXT_debug_report extension commands
  811. table->CreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)gpa(inst, "vkCreateDebugReportCallbackEXT");
  812. table->DestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)gpa(inst, "vkDestroyDebugReportCallbackEXT");
  813. table->DebugReportMessageEXT = (PFN_vkDebugReportMessageEXT)gpa(inst, "vkDebugReportMessageEXT");
  814. // ---- VK_GGP_stream_descriptor_surface extension commands
  815. #ifdef VK_USE_PLATFORM_GGP
  816. table->CreateStreamDescriptorSurfaceGGP = (PFN_vkCreateStreamDescriptorSurfaceGGP)gpa(inst, "vkCreateStreamDescriptorSurfaceGGP");
  817. #endif // VK_USE_PLATFORM_GGP
  818. // ---- VK_NV_external_memory_capabilities extension commands
  819. table->GetPhysicalDeviceExternalImageFormatPropertiesNV = (PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)gpa(inst, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV");
  820. // ---- VK_NN_vi_surface extension commands
  821. #ifdef VK_USE_PLATFORM_VI_NN
  822. table->CreateViSurfaceNN = (PFN_vkCreateViSurfaceNN)gpa(inst, "vkCreateViSurfaceNN");
  823. #endif // VK_USE_PLATFORM_VI_NN
  824. // ---- VK_EXT_direct_mode_display extension commands
  825. table->ReleaseDisplayEXT = (PFN_vkReleaseDisplayEXT)gpa(inst, "vkReleaseDisplayEXT");
  826. // ---- VK_EXT_acquire_xlib_display extension commands
  827. #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
  828. table->AcquireXlibDisplayEXT = (PFN_vkAcquireXlibDisplayEXT)gpa(inst, "vkAcquireXlibDisplayEXT");
  829. #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
  830. #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
  831. table->GetRandROutputDisplayEXT = (PFN_vkGetRandROutputDisplayEXT)gpa(inst, "vkGetRandROutputDisplayEXT");
  832. #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
  833. // ---- VK_EXT_display_surface_counter extension commands
  834. table->GetPhysicalDeviceSurfaceCapabilities2EXT = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT)gpa(inst, "vkGetPhysicalDeviceSurfaceCapabilities2EXT");
  835. // ---- VK_MVK_ios_surface extension commands
  836. #ifdef VK_USE_PLATFORM_IOS_MVK
  837. table->CreateIOSSurfaceMVK = (PFN_vkCreateIOSSurfaceMVK)gpa(inst, "vkCreateIOSSurfaceMVK");
  838. #endif // VK_USE_PLATFORM_IOS_MVK
  839. // ---- VK_MVK_macos_surface extension commands
  840. #ifdef VK_USE_PLATFORM_MACOS_MVK
  841. table->CreateMacOSSurfaceMVK = (PFN_vkCreateMacOSSurfaceMVK)gpa(inst, "vkCreateMacOSSurfaceMVK");
  842. #endif // VK_USE_PLATFORM_MACOS_MVK
  843. // ---- VK_EXT_debug_utils extension commands
  844. table->CreateDebugUtilsMessengerEXT = (PFN_vkCreateDebugUtilsMessengerEXT)gpa(inst, "vkCreateDebugUtilsMessengerEXT");
  845. table->DestroyDebugUtilsMessengerEXT = (PFN_vkDestroyDebugUtilsMessengerEXT)gpa(inst, "vkDestroyDebugUtilsMessengerEXT");
  846. table->SubmitDebugUtilsMessageEXT = (PFN_vkSubmitDebugUtilsMessageEXT)gpa(inst, "vkSubmitDebugUtilsMessageEXT");
  847. // ---- VK_EXT_sample_locations extension commands
  848. table->GetPhysicalDeviceMultisamplePropertiesEXT = (PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT)gpa(inst, "vkGetPhysicalDeviceMultisamplePropertiesEXT");
  849. // ---- VK_EXT_calibrated_timestamps extension commands
  850. table->GetPhysicalDeviceCalibrateableTimeDomainsEXT = (PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT)gpa(inst, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT");
  851. // ---- VK_FUCHSIA_imagepipe_surface extension commands
  852. #ifdef VK_USE_PLATFORM_FUCHSIA
  853. table->CreateImagePipeSurfaceFUCHSIA = (PFN_vkCreateImagePipeSurfaceFUCHSIA)gpa(inst, "vkCreateImagePipeSurfaceFUCHSIA");
  854. #endif // VK_USE_PLATFORM_FUCHSIA
  855. // ---- VK_EXT_metal_surface extension commands
  856. #ifdef VK_USE_PLATFORM_METAL_EXT
  857. table->CreateMetalSurfaceEXT = (PFN_vkCreateMetalSurfaceEXT)gpa(inst, "vkCreateMetalSurfaceEXT");
  858. #endif // VK_USE_PLATFORM_METAL_EXT
  859. // ---- VK_EXT_tooling_info extension commands
  860. table->GetPhysicalDeviceToolPropertiesEXT = (PFN_vkGetPhysicalDeviceToolPropertiesEXT)gpa(inst, "vkGetPhysicalDeviceToolPropertiesEXT");
  861. // ---- VK_NV_cooperative_matrix extension commands
  862. table->GetPhysicalDeviceCooperativeMatrixPropertiesNV = (PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV)gpa(inst, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV");
  863. // ---- VK_NV_coverage_reduction_mode extension commands
  864. table->GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = (PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV)gpa(inst, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV");
  865. // ---- VK_EXT_full_screen_exclusive extension commands
  866. #ifdef VK_USE_PLATFORM_WIN32_KHR
  867. table->GetPhysicalDeviceSurfacePresentModes2EXT = (PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT)gpa(inst, "vkGetPhysicalDeviceSurfacePresentModes2EXT");
  868. #endif // VK_USE_PLATFORM_WIN32_KHR
  869. // ---- VK_EXT_headless_surface extension commands
  870. table->CreateHeadlessSurfaceEXT = (PFN_vkCreateHeadlessSurfaceEXT)gpa(inst, "vkCreateHeadlessSurfaceEXT");
  871. // ---- VK_EXT_directfb_surface extension commands
  872. #ifdef VK_USE_PLATFORM_DIRECTFB_EXT
  873. table->CreateDirectFBSurfaceEXT = (PFN_vkCreateDirectFBSurfaceEXT)gpa(inst, "vkCreateDirectFBSurfaceEXT");
  874. #endif // VK_USE_PLATFORM_DIRECTFB_EXT
  875. #ifdef VK_USE_PLATFORM_DIRECTFB_EXT
  876. table->GetPhysicalDeviceDirectFBPresentationSupportEXT = (PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT)gpa(inst, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT");
  877. #endif // VK_USE_PLATFORM_DIRECTFB_EXT
  878. }
  879. // Device command lookup function
  880. VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDispatchTable *table, const char *name) {
  881. if (!name || name[0] != 'v' || name[1] != 'k') return NULL;
  882. name += 2;
  883. // ---- Core 1_0 commands
  884. if (!strcmp(name, "GetDeviceProcAddr")) return (void *)table->GetDeviceProcAddr;
  885. if (!strcmp(name, "DestroyDevice")) return (void *)table->DestroyDevice;
  886. if (!strcmp(name, "GetDeviceQueue")) return (void *)table->GetDeviceQueue;
  887. if (!strcmp(name, "QueueSubmit")) return (void *)table->QueueSubmit;
  888. if (!strcmp(name, "QueueWaitIdle")) return (void *)table->QueueWaitIdle;
  889. if (!strcmp(name, "DeviceWaitIdle")) return (void *)table->DeviceWaitIdle;
  890. if (!strcmp(name, "AllocateMemory")) return (void *)table->AllocateMemory;
  891. if (!strcmp(name, "FreeMemory")) return (void *)table->FreeMemory;
  892. if (!strcmp(name, "MapMemory")) return (void *)table->MapMemory;
  893. if (!strcmp(name, "UnmapMemory")) return (void *)table->UnmapMemory;
  894. if (!strcmp(name, "FlushMappedMemoryRanges")) return (void *)table->FlushMappedMemoryRanges;
  895. if (!strcmp(name, "InvalidateMappedMemoryRanges")) return (void *)table->InvalidateMappedMemoryRanges;
  896. if (!strcmp(name, "GetDeviceMemoryCommitment")) return (void *)table->GetDeviceMemoryCommitment;
  897. if (!strcmp(name, "BindBufferMemory")) return (void *)table->BindBufferMemory;
  898. if (!strcmp(name, "BindImageMemory")) return (void *)table->BindImageMemory;
  899. if (!strcmp(name, "GetBufferMemoryRequirements")) return (void *)table->GetBufferMemoryRequirements;
  900. if (!strcmp(name, "GetImageMemoryRequirements")) return (void *)table->GetImageMemoryRequirements;
  901. if (!strcmp(name, "GetImageSparseMemoryRequirements")) return (void *)table->GetImageSparseMemoryRequirements;
  902. if (!strcmp(name, "QueueBindSparse")) return (void *)table->QueueBindSparse;
  903. if (!strcmp(name, "CreateFence")) return (void *)table->CreateFence;
  904. if (!strcmp(name, "DestroyFence")) return (void *)table->DestroyFence;
  905. if (!strcmp(name, "ResetFences")) return (void *)table->ResetFences;
  906. if (!strcmp(name, "GetFenceStatus")) return (void *)table->GetFenceStatus;
  907. if (!strcmp(name, "WaitForFences")) return (void *)table->WaitForFences;
  908. if (!strcmp(name, "CreateSemaphore")) return (void *)table->CreateSemaphore;
  909. if (!strcmp(name, "DestroySemaphore")) return (void *)table->DestroySemaphore;
  910. if (!strcmp(name, "CreateEvent")) return (void *)table->CreateEvent;
  911. if (!strcmp(name, "DestroyEvent")) return (void *)table->DestroyEvent;
  912. if (!strcmp(name, "GetEventStatus")) return (void *)table->GetEventStatus;
  913. if (!strcmp(name, "SetEvent")) return (void *)table->SetEvent;
  914. if (!strcmp(name, "ResetEvent")) return (void *)table->ResetEvent;
  915. if (!strcmp(name, "CreateQueryPool")) return (void *)table->CreateQueryPool;
  916. if (!strcmp(name, "DestroyQueryPool")) return (void *)table->DestroyQueryPool;
  917. if (!strcmp(name, "GetQueryPoolResults")) return (void *)table->GetQueryPoolResults;
  918. if (!strcmp(name, "CreateBuffer")) return (void *)table->CreateBuffer;
  919. if (!strcmp(name, "DestroyBuffer")) return (void *)table->DestroyBuffer;
  920. if (!strcmp(name, "CreateBufferView")) return (void *)table->CreateBufferView;
  921. if (!strcmp(name, "DestroyBufferView")) return (void *)table->DestroyBufferView;
  922. if (!strcmp(name, "CreateImage")) return (void *)table->CreateImage;
  923. if (!strcmp(name, "DestroyImage")) return (void *)table->DestroyImage;
  924. if (!strcmp(name, "GetImageSubresourceLayout")) return (void *)table->GetImageSubresourceLayout;
  925. if (!strcmp(name, "CreateImageView")) return (void *)table->CreateImageView;
  926. if (!strcmp(name, "DestroyImageView")) return (void *)table->DestroyImageView;
  927. if (!strcmp(name, "CreateShaderModule")) return (void *)table->CreateShaderModule;
  928. if (!strcmp(name, "DestroyShaderModule")) return (void *)table->DestroyShaderModule;
  929. if (!strcmp(name, "CreatePipelineCache")) return (void *)table->CreatePipelineCache;
  930. if (!strcmp(name, "DestroyPipelineCache")) return (void *)table->DestroyPipelineCache;
  931. if (!strcmp(name, "GetPipelineCacheData")) return (void *)table->GetPipelineCacheData;
  932. if (!strcmp(name, "MergePipelineCaches")) return (void *)table->MergePipelineCaches;
  933. if (!strcmp(name, "CreateGraphicsPipelines")) return (void *)table->CreateGraphicsPipelines;
  934. if (!strcmp(name, "CreateComputePipelines")) return (void *)table->CreateComputePipelines;
  935. if (!strcmp(name, "DestroyPipeline")) return (void *)table->DestroyPipeline;
  936. if (!strcmp(name, "CreatePipelineLayout")) return (void *)table->CreatePipelineLayout;
  937. if (!strcmp(name, "DestroyPipelineLayout")) return (void *)table->DestroyPipelineLayout;
  938. if (!strcmp(name, "CreateSampler")) return (void *)table->CreateSampler;
  939. if (!strcmp(name, "DestroySampler")) return (void *)table->DestroySampler;
  940. if (!strcmp(name, "CreateDescriptorSetLayout")) return (void *)table->CreateDescriptorSetLayout;
  941. if (!strcmp(name, "DestroyDescriptorSetLayout")) return (void *)table->DestroyDescriptorSetLayout;
  942. if (!strcmp(name, "CreateDescriptorPool")) return (void *)table->CreateDescriptorPool;
  943. if (!strcmp(name, "DestroyDescriptorPool")) return (void *)table->DestroyDescriptorPool;
  944. if (!strcmp(name, "ResetDescriptorPool")) return (void *)table->ResetDescriptorPool;
  945. if (!strcmp(name, "AllocateDescriptorSets")) return (void *)table->AllocateDescriptorSets;
  946. if (!strcmp(name, "FreeDescriptorSets")) return (void *)table->FreeDescriptorSets;
  947. if (!strcmp(name, "UpdateDescriptorSets")) return (void *)table->UpdateDescriptorSets;
  948. if (!strcmp(name, "CreateFramebuffer")) return (void *)table->CreateFramebuffer;
  949. if (!strcmp(name, "DestroyFramebuffer")) return (void *)table->DestroyFramebuffer;
  950. if (!strcmp(name, "CreateRenderPass")) return (void *)table->CreateRenderPass;
  951. if (!strcmp(name, "DestroyRenderPass")) return (void *)table->DestroyRenderPass;
  952. if (!strcmp(name, "GetRenderAreaGranularity")) return (void *)table->GetRenderAreaGranularity;
  953. if (!strcmp(name, "CreateCommandPool")) return (void *)table->CreateCommandPool;
  954. if (!strcmp(name, "DestroyCommandPool")) return (void *)table->DestroyCommandPool;
  955. if (!strcmp(name, "ResetCommandPool")) return (void *)table->ResetCommandPool;
  956. if (!strcmp(name, "AllocateCommandBuffers")) return (void *)table->AllocateCommandBuffers;
  957. if (!strcmp(name, "FreeCommandBuffers")) return (void *)table->FreeCommandBuffers;
  958. if (!strcmp(name, "BeginCommandBuffer")) return (void *)table->BeginCommandBuffer;
  959. if (!strcmp(name, "EndCommandBuffer")) return (void *)table->EndCommandBuffer;
  960. if (!strcmp(name, "ResetCommandBuffer")) return (void *)table->ResetCommandBuffer;
  961. if (!strcmp(name, "CmdBindPipeline")) return (void *)table->CmdBindPipeline;
  962. if (!strcmp(name, "CmdSetViewport")) return (void *)table->CmdSetViewport;
  963. if (!strcmp(name, "CmdSetScissor")) return (void *)table->CmdSetScissor;
  964. if (!strcmp(name, "CmdSetLineWidth")) return (void *)table->CmdSetLineWidth;
  965. if (!strcmp(name, "CmdSetDepthBias")) return (void *)table->CmdSetDepthBias;
  966. if (!strcmp(name, "CmdSetBlendConstants")) return (void *)table->CmdSetBlendConstants;
  967. if (!strcmp(name, "CmdSetDepthBounds")) return (void *)table->CmdSetDepthBounds;
  968. if (!strcmp(name, "CmdSetStencilCompareMask")) return (void *)table->CmdSetStencilCompareMask;
  969. if (!strcmp(name, "CmdSetStencilWriteMask")) return (void *)table->CmdSetStencilWriteMask;
  970. if (!strcmp(name, "CmdSetStencilReference")) return (void *)table->CmdSetStencilReference;
  971. if (!strcmp(name, "CmdBindDescriptorSets")) return (void *)table->CmdBindDescriptorSets;
  972. if (!strcmp(name, "CmdBindIndexBuffer")) return (void *)table->CmdBindIndexBuffer;
  973. if (!strcmp(name, "CmdBindVertexBuffers")) return (void *)table->CmdBindVertexBuffers;
  974. if (!strcmp(name, "CmdDraw")) return (void *)table->CmdDraw;
  975. if (!strcmp(name, "CmdDrawIndexed")) return (void *)table->CmdDrawIndexed;
  976. if (!strcmp(name, "CmdDrawIndirect")) return (void *)table->CmdDrawIndirect;
  977. if (!strcmp(name, "CmdDrawIndexedIndirect")) return (void *)table->CmdDrawIndexedIndirect;
  978. if (!strcmp(name, "CmdDispatch")) return (void *)table->CmdDispatch;
  979. if (!strcmp(name, "CmdDispatchIndirect")) return (void *)table->CmdDispatchIndirect;
  980. if (!strcmp(name, "CmdCopyBuffer")) return (void *)table->CmdCopyBuffer;
  981. if (!strcmp(name, "CmdCopyImage")) return (void *)table->CmdCopyImage;
  982. if (!strcmp(name, "CmdBlitImage")) return (void *)table->CmdBlitImage;
  983. if (!strcmp(name, "CmdCopyBufferToImage")) return (void *)table->CmdCopyBufferToImage;
  984. if (!strcmp(name, "CmdCopyImageToBuffer")) return (void *)table->CmdCopyImageToBuffer;
  985. if (!strcmp(name, "CmdUpdateBuffer")) return (void *)table->CmdUpdateBuffer;
  986. if (!strcmp(name, "CmdFillBuffer")) return (void *)table->CmdFillBuffer;
  987. if (!strcmp(name, "CmdClearColorImage")) return (void *)table->CmdClearColorImage;
  988. if (!strcmp(name, "CmdClearDepthStencilImage")) return (void *)table->CmdClearDepthStencilImage;
  989. if (!strcmp(name, "CmdClearAttachments")) return (void *)table->CmdClearAttachments;
  990. if (!strcmp(name, "CmdResolveImage")) return (void *)table->CmdResolveImage;
  991. if (!strcmp(name, "CmdSetEvent")) return (void *)table->CmdSetEvent;
  992. if (!strcmp(name, "CmdResetEvent")) return (void *)table->CmdResetEvent;
  993. if (!strcmp(name, "CmdWaitEvents")) return (void *)table->CmdWaitEvents;
  994. if (!strcmp(name, "CmdPipelineBarrier")) return (void *)table->CmdPipelineBarrier;
  995. if (!strcmp(name, "CmdBeginQuery")) return (void *)table->CmdBeginQuery;
  996. if (!strcmp(name, "CmdEndQuery")) return (void *)table->CmdEndQuery;
  997. if (!strcmp(name, "CmdResetQueryPool")) return (void *)table->CmdResetQueryPool;
  998. if (!strcmp(name, "CmdWriteTimestamp")) return (void *)table->CmdWriteTimestamp;
  999. if (!strcmp(name, "CmdCopyQueryPoolResults")) return (void *)table->CmdCopyQueryPoolResults;
  1000. if (!strcmp(name, "CmdPushConstants")) return (void *)table->CmdPushConstants;
  1001. if (!strcmp(name, "CmdBeginRenderPass")) return (void *)table->CmdBeginRenderPass;
  1002. if (!strcmp(name, "CmdNextSubpass")) return (void *)table->CmdNextSubpass;
  1003. if (!strcmp(name, "CmdEndRenderPass")) return (void *)table->CmdEndRenderPass;
  1004. if (!strcmp(name, "CmdExecuteCommands")) return (void *)table->CmdExecuteCommands;
  1005. // ---- Core 1_1 commands
  1006. if (!strcmp(name, "BindBufferMemory2")) return (void *)table->BindBufferMemory2;
  1007. if (!strcmp(name, "BindImageMemory2")) return (void *)table->BindImageMemory2;
  1008. if (!strcmp(name, "GetDeviceGroupPeerMemoryFeatures")) return (void *)table->GetDeviceGroupPeerMemoryFeatures;
  1009. if (!strcmp(name, "CmdSetDeviceMask")) return (void *)table->CmdSetDeviceMask;
  1010. if (!strcmp(name, "CmdDispatchBase")) return (void *)table->CmdDispatchBase;
  1011. if (!strcmp(name, "GetImageMemoryRequirements2")) return (void *)table->GetImageMemoryRequirements2;
  1012. if (!strcmp(name, "GetBufferMemoryRequirements2")) return (void *)table->GetBufferMemoryRequirements2;
  1013. if (!strcmp(name, "GetImageSparseMemoryRequirements2")) return (void *)table->GetImageSparseMemoryRequirements2;
  1014. if (!strcmp(name, "TrimCommandPool")) return (void *)table->TrimCommandPool;
  1015. if (!strcmp(name, "GetDeviceQueue2")) return (void *)table->GetDeviceQueue2;
  1016. if (!strcmp(name, "CreateSamplerYcbcrConversion")) return (void *)table->CreateSamplerYcbcrConversion;
  1017. if (!strcmp(name, "DestroySamplerYcbcrConversion")) return (void *)table->DestroySamplerYcbcrConversion;
  1018. if (!strcmp(name, "CreateDescriptorUpdateTemplate")) return (void *)table->CreateDescriptorUpdateTemplate;
  1019. if (!strcmp(name, "DestroyDescriptorUpdateTemplate")) return (void *)table->DestroyDescriptorUpdateTemplate;
  1020. if (!strcmp(name, "UpdateDescriptorSetWithTemplate")) return (void *)table->UpdateDescriptorSetWithTemplate;
  1021. if (!strcmp(name, "GetDescriptorSetLayoutSupport")) return (void *)table->GetDescriptorSetLayoutSupport;
  1022. // ---- Core 1_2 commands
  1023. if (!strcmp(name, "CmdDrawIndirectCount")) return (void *)table->CmdDrawIndirectCount;
  1024. if (!strcmp(name, "CmdDrawIndexedIndirectCount")) return (void *)table->CmdDrawIndexedIndirectCount;
  1025. if (!strcmp(name, "CreateRenderPass2")) return (void *)table->CreateRenderPass2;
  1026. if (!strcmp(name, "CmdBeginRenderPass2")) return (void *)table->CmdBeginRenderPass2;
  1027. if (!strcmp(name, "CmdNextSubpass2")) return (void *)table->CmdNextSubpass2;
  1028. if (!strcmp(name, "CmdEndRenderPass2")) return (void *)table->CmdEndRenderPass2;
  1029. if (!strcmp(name, "ResetQueryPool")) return (void *)table->ResetQueryPool;
  1030. if (!strcmp(name, "GetSemaphoreCounterValue")) return (void *)table->GetSemaphoreCounterValue;
  1031. if (!strcmp(name, "WaitSemaphores")) return (void *)table->WaitSemaphores;
  1032. if (!strcmp(name, "SignalSemaphore")) return (void *)table->SignalSemaphore;
  1033. if (!strcmp(name, "GetBufferDeviceAddress")) return (void *)table->GetBufferDeviceAddress;
  1034. if (!strcmp(name, "GetBufferOpaqueCaptureAddress")) return (void *)table->GetBufferOpaqueCaptureAddress;
  1035. if (!strcmp(name, "GetDeviceMemoryOpaqueCaptureAddress")) return (void *)table->GetDeviceMemoryOpaqueCaptureAddress;
  1036. // ---- VK_KHR_swapchain extension commands
  1037. if (!strcmp(name, "CreateSwapchainKHR")) return (void *)table->CreateSwapchainKHR;
  1038. if (!strcmp(name, "DestroySwapchainKHR")) return (void *)table->DestroySwapchainKHR;
  1039. if (!strcmp(name, "GetSwapchainImagesKHR")) return (void *)table->GetSwapchainImagesKHR;
  1040. if (!strcmp(name, "AcquireNextImageKHR")) return (void *)table->AcquireNextImageKHR;
  1041. if (!strcmp(name, "QueuePresentKHR")) return (void *)table->QueuePresentKHR;
  1042. if (!strcmp(name, "GetDeviceGroupPresentCapabilitiesKHR")) return (void *)table->GetDeviceGroupPresentCapabilitiesKHR;
  1043. if (!strcmp(name, "GetDeviceGroupSurfacePresentModesKHR")) return (void *)table->GetDeviceGroupSurfacePresentModesKHR;
  1044. if (!strcmp(name, "AcquireNextImage2KHR")) return (void *)table->AcquireNextImage2KHR;
  1045. // ---- VK_KHR_display_swapchain extension commands
  1046. if (!strcmp(name, "CreateSharedSwapchainsKHR")) return (void *)table->CreateSharedSwapchainsKHR;
  1047. // ---- VK_KHR_device_group extension commands
  1048. if (!strcmp(name, "GetDeviceGroupPeerMemoryFeaturesKHR")) return (void *)table->GetDeviceGroupPeerMemoryFeaturesKHR;
  1049. if (!strcmp(name, "CmdSetDeviceMaskKHR")) return (void *)table->CmdSetDeviceMaskKHR;
  1050. if (!strcmp(name, "CmdDispatchBaseKHR")) return (void *)table->CmdDispatchBaseKHR;
  1051. // ---- VK_KHR_maintenance1 extension commands
  1052. if (!strcmp(name, "TrimCommandPoolKHR")) return (void *)table->TrimCommandPoolKHR;
  1053. // ---- VK_KHR_external_memory_win32 extension commands
  1054. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1055. if (!strcmp(name, "GetMemoryWin32HandleKHR")) return (void *)table->GetMemoryWin32HandleKHR;
  1056. #endif // VK_USE_PLATFORM_WIN32_KHR
  1057. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1058. if (!strcmp(name, "GetMemoryWin32HandlePropertiesKHR")) return (void *)table->GetMemoryWin32HandlePropertiesKHR;
  1059. #endif // VK_USE_PLATFORM_WIN32_KHR
  1060. // ---- VK_KHR_external_memory_fd extension commands
  1061. if (!strcmp(name, "GetMemoryFdKHR")) return (void *)table->GetMemoryFdKHR;
  1062. if (!strcmp(name, "GetMemoryFdPropertiesKHR")) return (void *)table->GetMemoryFdPropertiesKHR;
  1063. // ---- VK_KHR_external_semaphore_win32 extension commands
  1064. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1065. if (!strcmp(name, "ImportSemaphoreWin32HandleKHR")) return (void *)table->ImportSemaphoreWin32HandleKHR;
  1066. #endif // VK_USE_PLATFORM_WIN32_KHR
  1067. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1068. if (!strcmp(name, "GetSemaphoreWin32HandleKHR")) return (void *)table->GetSemaphoreWin32HandleKHR;
  1069. #endif // VK_USE_PLATFORM_WIN32_KHR
  1070. // ---- VK_KHR_external_semaphore_fd extension commands
  1071. if (!strcmp(name, "ImportSemaphoreFdKHR")) return (void *)table->ImportSemaphoreFdKHR;
  1072. if (!strcmp(name, "GetSemaphoreFdKHR")) return (void *)table->GetSemaphoreFdKHR;
  1073. // ---- VK_KHR_push_descriptor extension commands
  1074. if (!strcmp(name, "CmdPushDescriptorSetKHR")) return (void *)table->CmdPushDescriptorSetKHR;
  1075. if (!strcmp(name, "CmdPushDescriptorSetWithTemplateKHR")) return (void *)table->CmdPushDescriptorSetWithTemplateKHR;
  1076. // ---- VK_KHR_descriptor_update_template extension commands
  1077. if (!strcmp(name, "CreateDescriptorUpdateTemplateKHR")) return (void *)table->CreateDescriptorUpdateTemplateKHR;
  1078. if (!strcmp(name, "DestroyDescriptorUpdateTemplateKHR")) return (void *)table->DestroyDescriptorUpdateTemplateKHR;
  1079. if (!strcmp(name, "UpdateDescriptorSetWithTemplateKHR")) return (void *)table->UpdateDescriptorSetWithTemplateKHR;
  1080. // ---- VK_KHR_create_renderpass2 extension commands
  1081. if (!strcmp(name, "CreateRenderPass2KHR")) return (void *)table->CreateRenderPass2KHR;
  1082. if (!strcmp(name, "CmdBeginRenderPass2KHR")) return (void *)table->CmdBeginRenderPass2KHR;
  1083. if (!strcmp(name, "CmdNextSubpass2KHR")) return (void *)table->CmdNextSubpass2KHR;
  1084. if (!strcmp(name, "CmdEndRenderPass2KHR")) return (void *)table->CmdEndRenderPass2KHR;
  1085. // ---- VK_KHR_shared_presentable_image extension commands
  1086. if (!strcmp(name, "GetSwapchainStatusKHR")) return (void *)table->GetSwapchainStatusKHR;
  1087. // ---- VK_KHR_external_fence_win32 extension commands
  1088. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1089. if (!strcmp(name, "ImportFenceWin32HandleKHR")) return (void *)table->ImportFenceWin32HandleKHR;
  1090. #endif // VK_USE_PLATFORM_WIN32_KHR
  1091. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1092. if (!strcmp(name, "GetFenceWin32HandleKHR")) return (void *)table->GetFenceWin32HandleKHR;
  1093. #endif // VK_USE_PLATFORM_WIN32_KHR
  1094. // ---- VK_KHR_external_fence_fd extension commands
  1095. if (!strcmp(name, "ImportFenceFdKHR")) return (void *)table->ImportFenceFdKHR;
  1096. if (!strcmp(name, "GetFenceFdKHR")) return (void *)table->GetFenceFdKHR;
  1097. // ---- VK_KHR_performance_query extension commands
  1098. if (!strcmp(name, "AcquireProfilingLockKHR")) return (void *)table->AcquireProfilingLockKHR;
  1099. if (!strcmp(name, "ReleaseProfilingLockKHR")) return (void *)table->ReleaseProfilingLockKHR;
  1100. // ---- VK_KHR_get_memory_requirements2 extension commands
  1101. if (!strcmp(name, "GetImageMemoryRequirements2KHR")) return (void *)table->GetImageMemoryRequirements2KHR;
  1102. if (!strcmp(name, "GetBufferMemoryRequirements2KHR")) return (void *)table->GetBufferMemoryRequirements2KHR;
  1103. if (!strcmp(name, "GetImageSparseMemoryRequirements2KHR")) return (void *)table->GetImageSparseMemoryRequirements2KHR;
  1104. // ---- VK_KHR_sampler_ycbcr_conversion extension commands
  1105. if (!strcmp(name, "CreateSamplerYcbcrConversionKHR")) return (void *)table->CreateSamplerYcbcrConversionKHR;
  1106. if (!strcmp(name, "DestroySamplerYcbcrConversionKHR")) return (void *)table->DestroySamplerYcbcrConversionKHR;
  1107. // ---- VK_KHR_bind_memory2 extension commands
  1108. if (!strcmp(name, "BindBufferMemory2KHR")) return (void *)table->BindBufferMemory2KHR;
  1109. if (!strcmp(name, "BindImageMemory2KHR")) return (void *)table->BindImageMemory2KHR;
  1110. // ---- VK_KHR_maintenance3 extension commands
  1111. if (!strcmp(name, "GetDescriptorSetLayoutSupportKHR")) return (void *)table->GetDescriptorSetLayoutSupportKHR;
  1112. // ---- VK_KHR_draw_indirect_count extension commands
  1113. if (!strcmp(name, "CmdDrawIndirectCountKHR")) return (void *)table->CmdDrawIndirectCountKHR;
  1114. if (!strcmp(name, "CmdDrawIndexedIndirectCountKHR")) return (void *)table->CmdDrawIndexedIndirectCountKHR;
  1115. // ---- VK_KHR_timeline_semaphore extension commands
  1116. if (!strcmp(name, "GetSemaphoreCounterValueKHR")) return (void *)table->GetSemaphoreCounterValueKHR;
  1117. if (!strcmp(name, "WaitSemaphoresKHR")) return (void *)table->WaitSemaphoresKHR;
  1118. if (!strcmp(name, "SignalSemaphoreKHR")) return (void *)table->SignalSemaphoreKHR;
  1119. // ---- VK_KHR_fragment_shading_rate extension commands
  1120. if (!strcmp(name, "CmdSetFragmentShadingRateKHR")) return (void *)table->CmdSetFragmentShadingRateKHR;
  1121. // ---- VK_KHR_buffer_device_address extension commands
  1122. if (!strcmp(name, "GetBufferDeviceAddressKHR")) return (void *)table->GetBufferDeviceAddressKHR;
  1123. if (!strcmp(name, "GetBufferOpaqueCaptureAddressKHR")) return (void *)table->GetBufferOpaqueCaptureAddressKHR;
  1124. if (!strcmp(name, "GetDeviceMemoryOpaqueCaptureAddressKHR")) return (void *)table->GetDeviceMemoryOpaqueCaptureAddressKHR;
  1125. // ---- VK_KHR_deferred_host_operations extension commands
  1126. if (!strcmp(name, "CreateDeferredOperationKHR")) return (void *)table->CreateDeferredOperationKHR;
  1127. if (!strcmp(name, "DestroyDeferredOperationKHR")) return (void *)table->DestroyDeferredOperationKHR;
  1128. if (!strcmp(name, "GetDeferredOperationMaxConcurrencyKHR")) return (void *)table->GetDeferredOperationMaxConcurrencyKHR;
  1129. if (!strcmp(name, "GetDeferredOperationResultKHR")) return (void *)table->GetDeferredOperationResultKHR;
  1130. if (!strcmp(name, "DeferredOperationJoinKHR")) return (void *)table->DeferredOperationJoinKHR;
  1131. // ---- VK_KHR_pipeline_executable_properties extension commands
  1132. if (!strcmp(name, "GetPipelineExecutablePropertiesKHR")) return (void *)table->GetPipelineExecutablePropertiesKHR;
  1133. if (!strcmp(name, "GetPipelineExecutableStatisticsKHR")) return (void *)table->GetPipelineExecutableStatisticsKHR;
  1134. if (!strcmp(name, "GetPipelineExecutableInternalRepresentationsKHR")) return (void *)table->GetPipelineExecutableInternalRepresentationsKHR;
  1135. // ---- VK_KHR_copy_commands2 extension commands
  1136. if (!strcmp(name, "CmdCopyBuffer2KHR")) return (void *)table->CmdCopyBuffer2KHR;
  1137. if (!strcmp(name, "CmdCopyImage2KHR")) return (void *)table->CmdCopyImage2KHR;
  1138. if (!strcmp(name, "CmdCopyBufferToImage2KHR")) return (void *)table->CmdCopyBufferToImage2KHR;
  1139. if (!strcmp(name, "CmdCopyImageToBuffer2KHR")) return (void *)table->CmdCopyImageToBuffer2KHR;
  1140. if (!strcmp(name, "CmdBlitImage2KHR")) return (void *)table->CmdBlitImage2KHR;
  1141. if (!strcmp(name, "CmdResolveImage2KHR")) return (void *)table->CmdResolveImage2KHR;
  1142. // ---- VK_EXT_debug_marker extension commands
  1143. if (!strcmp(name, "DebugMarkerSetObjectTagEXT")) return (void *)table->DebugMarkerSetObjectTagEXT;
  1144. if (!strcmp(name, "DebugMarkerSetObjectNameEXT")) return (void *)table->DebugMarkerSetObjectNameEXT;
  1145. if (!strcmp(name, "CmdDebugMarkerBeginEXT")) return (void *)table->CmdDebugMarkerBeginEXT;
  1146. if (!strcmp(name, "CmdDebugMarkerEndEXT")) return (void *)table->CmdDebugMarkerEndEXT;
  1147. if (!strcmp(name, "CmdDebugMarkerInsertEXT")) return (void *)table->CmdDebugMarkerInsertEXT;
  1148. // ---- VK_EXT_transform_feedback extension commands
  1149. if (!strcmp(name, "CmdBindTransformFeedbackBuffersEXT")) return (void *)table->CmdBindTransformFeedbackBuffersEXT;
  1150. if (!strcmp(name, "CmdBeginTransformFeedbackEXT")) return (void *)table->CmdBeginTransformFeedbackEXT;
  1151. if (!strcmp(name, "CmdEndTransformFeedbackEXT")) return (void *)table->CmdEndTransformFeedbackEXT;
  1152. if (!strcmp(name, "CmdBeginQueryIndexedEXT")) return (void *)table->CmdBeginQueryIndexedEXT;
  1153. if (!strcmp(name, "CmdEndQueryIndexedEXT")) return (void *)table->CmdEndQueryIndexedEXT;
  1154. if (!strcmp(name, "CmdDrawIndirectByteCountEXT")) return (void *)table->CmdDrawIndirectByteCountEXT;
  1155. // ---- VK_NVX_image_view_handle extension commands
  1156. if (!strcmp(name, "GetImageViewHandleNVX")) return (void *)table->GetImageViewHandleNVX;
  1157. if (!strcmp(name, "GetImageViewAddressNVX")) return (void *)table->GetImageViewAddressNVX;
  1158. // ---- VK_AMD_draw_indirect_count extension commands
  1159. if (!strcmp(name, "CmdDrawIndirectCountAMD")) return (void *)table->CmdDrawIndirectCountAMD;
  1160. if (!strcmp(name, "CmdDrawIndexedIndirectCountAMD")) return (void *)table->CmdDrawIndexedIndirectCountAMD;
  1161. // ---- VK_AMD_shader_info extension commands
  1162. if (!strcmp(name, "GetShaderInfoAMD")) return (void *)table->GetShaderInfoAMD;
  1163. // ---- VK_NV_external_memory_win32 extension commands
  1164. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1165. if (!strcmp(name, "GetMemoryWin32HandleNV")) return (void *)table->GetMemoryWin32HandleNV;
  1166. #endif // VK_USE_PLATFORM_WIN32_KHR
  1167. // ---- VK_EXT_conditional_rendering extension commands
  1168. if (!strcmp(name, "CmdBeginConditionalRenderingEXT")) return (void *)table->CmdBeginConditionalRenderingEXT;
  1169. if (!strcmp(name, "CmdEndConditionalRenderingEXT")) return (void *)table->CmdEndConditionalRenderingEXT;
  1170. // ---- VK_NV_clip_space_w_scaling extension commands
  1171. if (!strcmp(name, "CmdSetViewportWScalingNV")) return (void *)table->CmdSetViewportWScalingNV;
  1172. // ---- VK_EXT_display_control extension commands
  1173. if (!strcmp(name, "DisplayPowerControlEXT")) return (void *)table->DisplayPowerControlEXT;
  1174. if (!strcmp(name, "RegisterDeviceEventEXT")) return (void *)table->RegisterDeviceEventEXT;
  1175. if (!strcmp(name, "RegisterDisplayEventEXT")) return (void *)table->RegisterDisplayEventEXT;
  1176. if (!strcmp(name, "GetSwapchainCounterEXT")) return (void *)table->GetSwapchainCounterEXT;
  1177. // ---- VK_GOOGLE_display_timing extension commands
  1178. if (!strcmp(name, "GetRefreshCycleDurationGOOGLE")) return (void *)table->GetRefreshCycleDurationGOOGLE;
  1179. if (!strcmp(name, "GetPastPresentationTimingGOOGLE")) return (void *)table->GetPastPresentationTimingGOOGLE;
  1180. // ---- VK_EXT_discard_rectangles extension commands
  1181. if (!strcmp(name, "CmdSetDiscardRectangleEXT")) return (void *)table->CmdSetDiscardRectangleEXT;
  1182. // ---- VK_EXT_hdr_metadata extension commands
  1183. if (!strcmp(name, "SetHdrMetadataEXT")) return (void *)table->SetHdrMetadataEXT;
  1184. // ---- VK_EXT_debug_utils extension commands
  1185. if (!strcmp(name, "SetDebugUtilsObjectNameEXT")) return (void *)table->SetDebugUtilsObjectNameEXT;
  1186. if (!strcmp(name, "SetDebugUtilsObjectTagEXT")) return (void *)table->SetDebugUtilsObjectTagEXT;
  1187. if (!strcmp(name, "QueueBeginDebugUtilsLabelEXT")) return (void *)table->QueueBeginDebugUtilsLabelEXT;
  1188. if (!strcmp(name, "QueueEndDebugUtilsLabelEXT")) return (void *)table->QueueEndDebugUtilsLabelEXT;
  1189. if (!strcmp(name, "QueueInsertDebugUtilsLabelEXT")) return (void *)table->QueueInsertDebugUtilsLabelEXT;
  1190. if (!strcmp(name, "CmdBeginDebugUtilsLabelEXT")) return (void *)table->CmdBeginDebugUtilsLabelEXT;
  1191. if (!strcmp(name, "CmdEndDebugUtilsLabelEXT")) return (void *)table->CmdEndDebugUtilsLabelEXT;
  1192. if (!strcmp(name, "CmdInsertDebugUtilsLabelEXT")) return (void *)table->CmdInsertDebugUtilsLabelEXT;
  1193. // ---- VK_ANDROID_external_memory_android_hardware_buffer extension commands
  1194. #ifdef VK_USE_PLATFORM_ANDROID_KHR
  1195. if (!strcmp(name, "GetAndroidHardwareBufferPropertiesANDROID")) return (void *)table->GetAndroidHardwareBufferPropertiesANDROID;
  1196. #endif // VK_USE_PLATFORM_ANDROID_KHR
  1197. #ifdef VK_USE_PLATFORM_ANDROID_KHR
  1198. if (!strcmp(name, "GetMemoryAndroidHardwareBufferANDROID")) return (void *)table->GetMemoryAndroidHardwareBufferANDROID;
  1199. #endif // VK_USE_PLATFORM_ANDROID_KHR
  1200. // ---- VK_EXT_sample_locations extension commands
  1201. if (!strcmp(name, "CmdSetSampleLocationsEXT")) return (void *)table->CmdSetSampleLocationsEXT;
  1202. // ---- VK_EXT_image_drm_format_modifier extension commands
  1203. if (!strcmp(name, "GetImageDrmFormatModifierPropertiesEXT")) return (void *)table->GetImageDrmFormatModifierPropertiesEXT;
  1204. // ---- VK_EXT_validation_cache extension commands
  1205. if (!strcmp(name, "CreateValidationCacheEXT")) return (void *)table->CreateValidationCacheEXT;
  1206. if (!strcmp(name, "DestroyValidationCacheEXT")) return (void *)table->DestroyValidationCacheEXT;
  1207. if (!strcmp(name, "MergeValidationCachesEXT")) return (void *)table->MergeValidationCachesEXT;
  1208. if (!strcmp(name, "GetValidationCacheDataEXT")) return (void *)table->GetValidationCacheDataEXT;
  1209. // ---- VK_NV_shading_rate_image extension commands
  1210. if (!strcmp(name, "CmdBindShadingRateImageNV")) return (void *)table->CmdBindShadingRateImageNV;
  1211. if (!strcmp(name, "CmdSetViewportShadingRatePaletteNV")) return (void *)table->CmdSetViewportShadingRatePaletteNV;
  1212. if (!strcmp(name, "CmdSetCoarseSampleOrderNV")) return (void *)table->CmdSetCoarseSampleOrderNV;
  1213. // ---- VK_NV_ray_tracing extension commands
  1214. if (!strcmp(name, "CreateAccelerationStructureNV")) return (void *)table->CreateAccelerationStructureNV;
  1215. if (!strcmp(name, "DestroyAccelerationStructureNV")) return (void *)table->DestroyAccelerationStructureNV;
  1216. if (!strcmp(name, "GetAccelerationStructureMemoryRequirementsNV")) return (void *)table->GetAccelerationStructureMemoryRequirementsNV;
  1217. if (!strcmp(name, "BindAccelerationStructureMemoryNV")) return (void *)table->BindAccelerationStructureMemoryNV;
  1218. if (!strcmp(name, "CmdBuildAccelerationStructureNV")) return (void *)table->CmdBuildAccelerationStructureNV;
  1219. if (!strcmp(name, "CmdCopyAccelerationStructureNV")) return (void *)table->CmdCopyAccelerationStructureNV;
  1220. if (!strcmp(name, "CmdTraceRaysNV")) return (void *)table->CmdTraceRaysNV;
  1221. if (!strcmp(name, "CreateRayTracingPipelinesNV")) return (void *)table->CreateRayTracingPipelinesNV;
  1222. if (!strcmp(name, "GetRayTracingShaderGroupHandlesKHR")) return (void *)table->GetRayTracingShaderGroupHandlesKHR;
  1223. if (!strcmp(name, "GetRayTracingShaderGroupHandlesNV")) return (void *)table->GetRayTracingShaderGroupHandlesNV;
  1224. if (!strcmp(name, "GetAccelerationStructureHandleNV")) return (void *)table->GetAccelerationStructureHandleNV;
  1225. if (!strcmp(name, "CmdWriteAccelerationStructuresPropertiesNV")) return (void *)table->CmdWriteAccelerationStructuresPropertiesNV;
  1226. if (!strcmp(name, "CompileDeferredNV")) return (void *)table->CompileDeferredNV;
  1227. // ---- VK_EXT_external_memory_host extension commands
  1228. if (!strcmp(name, "GetMemoryHostPointerPropertiesEXT")) return (void *)table->GetMemoryHostPointerPropertiesEXT;
  1229. // ---- VK_AMD_buffer_marker extension commands
  1230. if (!strcmp(name, "CmdWriteBufferMarkerAMD")) return (void *)table->CmdWriteBufferMarkerAMD;
  1231. // ---- VK_EXT_calibrated_timestamps extension commands
  1232. if (!strcmp(name, "GetCalibratedTimestampsEXT")) return (void *)table->GetCalibratedTimestampsEXT;
  1233. // ---- VK_NV_mesh_shader extension commands
  1234. if (!strcmp(name, "CmdDrawMeshTasksNV")) return (void *)table->CmdDrawMeshTasksNV;
  1235. if (!strcmp(name, "CmdDrawMeshTasksIndirectNV")) return (void *)table->CmdDrawMeshTasksIndirectNV;
  1236. if (!strcmp(name, "CmdDrawMeshTasksIndirectCountNV")) return (void *)table->CmdDrawMeshTasksIndirectCountNV;
  1237. // ---- VK_NV_scissor_exclusive extension commands
  1238. if (!strcmp(name, "CmdSetExclusiveScissorNV")) return (void *)table->CmdSetExclusiveScissorNV;
  1239. // ---- VK_NV_device_diagnostic_checkpoints extension commands
  1240. if (!strcmp(name, "CmdSetCheckpointNV")) return (void *)table->CmdSetCheckpointNV;
  1241. if (!strcmp(name, "GetQueueCheckpointDataNV")) return (void *)table->GetQueueCheckpointDataNV;
  1242. // ---- VK_INTEL_performance_query extension commands
  1243. if (!strcmp(name, "InitializePerformanceApiINTEL")) return (void *)table->InitializePerformanceApiINTEL;
  1244. if (!strcmp(name, "UninitializePerformanceApiINTEL")) return (void *)table->UninitializePerformanceApiINTEL;
  1245. if (!strcmp(name, "CmdSetPerformanceMarkerINTEL")) return (void *)table->CmdSetPerformanceMarkerINTEL;
  1246. if (!strcmp(name, "CmdSetPerformanceStreamMarkerINTEL")) return (void *)table->CmdSetPerformanceStreamMarkerINTEL;
  1247. if (!strcmp(name, "CmdSetPerformanceOverrideINTEL")) return (void *)table->CmdSetPerformanceOverrideINTEL;
  1248. if (!strcmp(name, "AcquirePerformanceConfigurationINTEL")) return (void *)table->AcquirePerformanceConfigurationINTEL;
  1249. if (!strcmp(name, "ReleasePerformanceConfigurationINTEL")) return (void *)table->ReleasePerformanceConfigurationINTEL;
  1250. if (!strcmp(name, "QueueSetPerformanceConfigurationINTEL")) return (void *)table->QueueSetPerformanceConfigurationINTEL;
  1251. if (!strcmp(name, "GetPerformanceParameterINTEL")) return (void *)table->GetPerformanceParameterINTEL;
  1252. // ---- VK_AMD_display_native_hdr extension commands
  1253. if (!strcmp(name, "SetLocalDimmingAMD")) return (void *)table->SetLocalDimmingAMD;
  1254. // ---- VK_EXT_buffer_device_address extension commands
  1255. if (!strcmp(name, "GetBufferDeviceAddressEXT")) return (void *)table->GetBufferDeviceAddressEXT;
  1256. // ---- VK_EXT_full_screen_exclusive extension commands
  1257. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1258. if (!strcmp(name, "AcquireFullScreenExclusiveModeEXT")) return (void *)table->AcquireFullScreenExclusiveModeEXT;
  1259. #endif // VK_USE_PLATFORM_WIN32_KHR
  1260. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1261. if (!strcmp(name, "ReleaseFullScreenExclusiveModeEXT")) return (void *)table->ReleaseFullScreenExclusiveModeEXT;
  1262. #endif // VK_USE_PLATFORM_WIN32_KHR
  1263. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1264. if (!strcmp(name, "GetDeviceGroupSurfacePresentModes2EXT")) return (void *)table->GetDeviceGroupSurfacePresentModes2EXT;
  1265. #endif // VK_USE_PLATFORM_WIN32_KHR
  1266. // ---- VK_EXT_line_rasterization extension commands
  1267. if (!strcmp(name, "CmdSetLineStippleEXT")) return (void *)table->CmdSetLineStippleEXT;
  1268. // ---- VK_EXT_host_query_reset extension commands
  1269. if (!strcmp(name, "ResetQueryPoolEXT")) return (void *)table->ResetQueryPoolEXT;
  1270. // ---- VK_EXT_extended_dynamic_state extension commands
  1271. if (!strcmp(name, "CmdSetCullModeEXT")) return (void *)table->CmdSetCullModeEXT;
  1272. if (!strcmp(name, "CmdSetFrontFaceEXT")) return (void *)table->CmdSetFrontFaceEXT;
  1273. if (!strcmp(name, "CmdSetPrimitiveTopologyEXT")) return (void *)table->CmdSetPrimitiveTopologyEXT;
  1274. if (!strcmp(name, "CmdSetViewportWithCountEXT")) return (void *)table->CmdSetViewportWithCountEXT;
  1275. if (!strcmp(name, "CmdSetScissorWithCountEXT")) return (void *)table->CmdSetScissorWithCountEXT;
  1276. if (!strcmp(name, "CmdBindVertexBuffers2EXT")) return (void *)table->CmdBindVertexBuffers2EXT;
  1277. if (!strcmp(name, "CmdSetDepthTestEnableEXT")) return (void *)table->CmdSetDepthTestEnableEXT;
  1278. if (!strcmp(name, "CmdSetDepthWriteEnableEXT")) return (void *)table->CmdSetDepthWriteEnableEXT;
  1279. if (!strcmp(name, "CmdSetDepthCompareOpEXT")) return (void *)table->CmdSetDepthCompareOpEXT;
  1280. if (!strcmp(name, "CmdSetDepthBoundsTestEnableEXT")) return (void *)table->CmdSetDepthBoundsTestEnableEXT;
  1281. if (!strcmp(name, "CmdSetStencilTestEnableEXT")) return (void *)table->CmdSetStencilTestEnableEXT;
  1282. if (!strcmp(name, "CmdSetStencilOpEXT")) return (void *)table->CmdSetStencilOpEXT;
  1283. // ---- VK_NV_device_generated_commands extension commands
  1284. if (!strcmp(name, "GetGeneratedCommandsMemoryRequirementsNV")) return (void *)table->GetGeneratedCommandsMemoryRequirementsNV;
  1285. if (!strcmp(name, "CmdPreprocessGeneratedCommandsNV")) return (void *)table->CmdPreprocessGeneratedCommandsNV;
  1286. if (!strcmp(name, "CmdExecuteGeneratedCommandsNV")) return (void *)table->CmdExecuteGeneratedCommandsNV;
  1287. if (!strcmp(name, "CmdBindPipelineShaderGroupNV")) return (void *)table->CmdBindPipelineShaderGroupNV;
  1288. if (!strcmp(name, "CreateIndirectCommandsLayoutNV")) return (void *)table->CreateIndirectCommandsLayoutNV;
  1289. if (!strcmp(name, "DestroyIndirectCommandsLayoutNV")) return (void *)table->DestroyIndirectCommandsLayoutNV;
  1290. // ---- VK_EXT_private_data extension commands
  1291. if (!strcmp(name, "CreatePrivateDataSlotEXT")) return (void *)table->CreatePrivateDataSlotEXT;
  1292. if (!strcmp(name, "DestroyPrivateDataSlotEXT")) return (void *)table->DestroyPrivateDataSlotEXT;
  1293. if (!strcmp(name, "SetPrivateDataEXT")) return (void *)table->SetPrivateDataEXT;
  1294. if (!strcmp(name, "GetPrivateDataEXT")) return (void *)table->GetPrivateDataEXT;
  1295. // ---- VK_NV_fragment_shading_rate_enums extension commands
  1296. if (!strcmp(name, "CmdSetFragmentShadingRateEnumNV")) return (void *)table->CmdSetFragmentShadingRateEnumNV;
  1297. // ---- VK_KHR_acceleration_structure extension commands
  1298. if (!strcmp(name, "CreateAccelerationStructureKHR")) return (void *)table->CreateAccelerationStructureKHR;
  1299. if (!strcmp(name, "DestroyAccelerationStructureKHR")) return (void *)table->DestroyAccelerationStructureKHR;
  1300. if (!strcmp(name, "CmdBuildAccelerationStructuresKHR")) return (void *)table->CmdBuildAccelerationStructuresKHR;
  1301. if (!strcmp(name, "CmdBuildAccelerationStructuresIndirectKHR")) return (void *)table->CmdBuildAccelerationStructuresIndirectKHR;
  1302. if (!strcmp(name, "BuildAccelerationStructuresKHR")) return (void *)table->BuildAccelerationStructuresKHR;
  1303. if (!strcmp(name, "CopyAccelerationStructureKHR")) return (void *)table->CopyAccelerationStructureKHR;
  1304. if (!strcmp(name, "CopyAccelerationStructureToMemoryKHR")) return (void *)table->CopyAccelerationStructureToMemoryKHR;
  1305. if (!strcmp(name, "CopyMemoryToAccelerationStructureKHR")) return (void *)table->CopyMemoryToAccelerationStructureKHR;
  1306. if (!strcmp(name, "WriteAccelerationStructuresPropertiesKHR")) return (void *)table->WriteAccelerationStructuresPropertiesKHR;
  1307. if (!strcmp(name, "CmdCopyAccelerationStructureKHR")) return (void *)table->CmdCopyAccelerationStructureKHR;
  1308. if (!strcmp(name, "CmdCopyAccelerationStructureToMemoryKHR")) return (void *)table->CmdCopyAccelerationStructureToMemoryKHR;
  1309. if (!strcmp(name, "CmdCopyMemoryToAccelerationStructureKHR")) return (void *)table->CmdCopyMemoryToAccelerationStructureKHR;
  1310. if (!strcmp(name, "GetAccelerationStructureDeviceAddressKHR")) return (void *)table->GetAccelerationStructureDeviceAddressKHR;
  1311. if (!strcmp(name, "CmdWriteAccelerationStructuresPropertiesKHR")) return (void *)table->CmdWriteAccelerationStructuresPropertiesKHR;
  1312. if (!strcmp(name, "GetDeviceAccelerationStructureCompatibilityKHR")) return (void *)table->GetDeviceAccelerationStructureCompatibilityKHR;
  1313. if (!strcmp(name, "GetAccelerationStructureBuildSizesKHR")) return (void *)table->GetAccelerationStructureBuildSizesKHR;
  1314. // ---- VK_KHR_ray_tracing_pipeline extension commands
  1315. if (!strcmp(name, "CmdTraceRaysKHR")) return (void *)table->CmdTraceRaysKHR;
  1316. if (!strcmp(name, "CreateRayTracingPipelinesKHR")) return (void *)table->CreateRayTracingPipelinesKHR;
  1317. if (!strcmp(name, "GetRayTracingCaptureReplayShaderGroupHandlesKHR")) return (void *)table->GetRayTracingCaptureReplayShaderGroupHandlesKHR;
  1318. if (!strcmp(name, "CmdTraceRaysIndirectKHR")) return (void *)table->CmdTraceRaysIndirectKHR;
  1319. if (!strcmp(name, "GetRayTracingShaderGroupStackSizeKHR")) return (void *)table->GetRayTracingShaderGroupStackSizeKHR;
  1320. if (!strcmp(name, "CmdSetRayTracingPipelineStackSizeKHR")) return (void *)table->CmdSetRayTracingPipelineStackSizeKHR;
  1321. return NULL;
  1322. }
  1323. // Instance command lookup function
  1324. VKAPI_ATTR void* VKAPI_CALL loader_lookup_instance_dispatch_table(const VkLayerInstanceDispatchTable *table, const char *name,
  1325. bool *found_name) {
  1326. if (!name || name[0] != 'v' || name[1] != 'k') {
  1327. *found_name = false;
  1328. return NULL;
  1329. }
  1330. *found_name = true;
  1331. name += 2;
  1332. // ---- Core 1_0 commands
  1333. if (!strcmp(name, "DestroyInstance")) return (void *)table->DestroyInstance;
  1334. if (!strcmp(name, "EnumeratePhysicalDevices")) return (void *)table->EnumeratePhysicalDevices;
  1335. if (!strcmp(name, "GetPhysicalDeviceFeatures")) return (void *)table->GetPhysicalDeviceFeatures;
  1336. if (!strcmp(name, "GetPhysicalDeviceFormatProperties")) return (void *)table->GetPhysicalDeviceFormatProperties;
  1337. if (!strcmp(name, "GetPhysicalDeviceImageFormatProperties")) return (void *)table->GetPhysicalDeviceImageFormatProperties;
  1338. if (!strcmp(name, "GetPhysicalDeviceProperties")) return (void *)table->GetPhysicalDeviceProperties;
  1339. if (!strcmp(name, "GetPhysicalDeviceQueueFamilyProperties")) return (void *)table->GetPhysicalDeviceQueueFamilyProperties;
  1340. if (!strcmp(name, "GetPhysicalDeviceMemoryProperties")) return (void *)table->GetPhysicalDeviceMemoryProperties;
  1341. if (!strcmp(name, "GetInstanceProcAddr")) return (void *)table->GetInstanceProcAddr;
  1342. if (!strcmp(name, "EnumerateDeviceExtensionProperties")) return (void *)table->EnumerateDeviceExtensionProperties;
  1343. if (!strcmp(name, "EnumerateDeviceLayerProperties")) return (void *)table->EnumerateDeviceLayerProperties;
  1344. if (!strcmp(name, "GetPhysicalDeviceSparseImageFormatProperties")) return (void *)table->GetPhysicalDeviceSparseImageFormatProperties;
  1345. // ---- Core 1_1 commands
  1346. if (!strcmp(name, "EnumeratePhysicalDeviceGroups")) return (void *)table->EnumeratePhysicalDeviceGroups;
  1347. if (!strcmp(name, "GetPhysicalDeviceFeatures2")) return (void *)table->GetPhysicalDeviceFeatures2;
  1348. if (!strcmp(name, "GetPhysicalDeviceProperties2")) return (void *)table->GetPhysicalDeviceProperties2;
  1349. if (!strcmp(name, "GetPhysicalDeviceFormatProperties2")) return (void *)table->GetPhysicalDeviceFormatProperties2;
  1350. if (!strcmp(name, "GetPhysicalDeviceImageFormatProperties2")) return (void *)table->GetPhysicalDeviceImageFormatProperties2;
  1351. if (!strcmp(name, "GetPhysicalDeviceQueueFamilyProperties2")) return (void *)table->GetPhysicalDeviceQueueFamilyProperties2;
  1352. if (!strcmp(name, "GetPhysicalDeviceMemoryProperties2")) return (void *)table->GetPhysicalDeviceMemoryProperties2;
  1353. if (!strcmp(name, "GetPhysicalDeviceSparseImageFormatProperties2")) return (void *)table->GetPhysicalDeviceSparseImageFormatProperties2;
  1354. if (!strcmp(name, "GetPhysicalDeviceExternalBufferProperties")) return (void *)table->GetPhysicalDeviceExternalBufferProperties;
  1355. if (!strcmp(name, "GetPhysicalDeviceExternalFenceProperties")) return (void *)table->GetPhysicalDeviceExternalFenceProperties;
  1356. if (!strcmp(name, "GetPhysicalDeviceExternalSemaphoreProperties")) return (void *)table->GetPhysicalDeviceExternalSemaphoreProperties;
  1357. // ---- VK_KHR_surface extension commands
  1358. if (!strcmp(name, "DestroySurfaceKHR")) return (void *)table->DestroySurfaceKHR;
  1359. if (!strcmp(name, "GetPhysicalDeviceSurfaceSupportKHR")) return (void *)table->GetPhysicalDeviceSurfaceSupportKHR;
  1360. if (!strcmp(name, "GetPhysicalDeviceSurfaceCapabilitiesKHR")) return (void *)table->GetPhysicalDeviceSurfaceCapabilitiesKHR;
  1361. if (!strcmp(name, "GetPhysicalDeviceSurfaceFormatsKHR")) return (void *)table->GetPhysicalDeviceSurfaceFormatsKHR;
  1362. if (!strcmp(name, "GetPhysicalDeviceSurfacePresentModesKHR")) return (void *)table->GetPhysicalDeviceSurfacePresentModesKHR;
  1363. // ---- VK_KHR_swapchain extension commands
  1364. if (!strcmp(name, "GetPhysicalDevicePresentRectanglesKHR")) return (void *)table->GetPhysicalDevicePresentRectanglesKHR;
  1365. // ---- VK_KHR_display extension commands
  1366. if (!strcmp(name, "GetPhysicalDeviceDisplayPropertiesKHR")) return (void *)table->GetPhysicalDeviceDisplayPropertiesKHR;
  1367. if (!strcmp(name, "GetPhysicalDeviceDisplayPlanePropertiesKHR")) return (void *)table->GetPhysicalDeviceDisplayPlanePropertiesKHR;
  1368. if (!strcmp(name, "GetDisplayPlaneSupportedDisplaysKHR")) return (void *)table->GetDisplayPlaneSupportedDisplaysKHR;
  1369. if (!strcmp(name, "GetDisplayModePropertiesKHR")) return (void *)table->GetDisplayModePropertiesKHR;
  1370. if (!strcmp(name, "CreateDisplayModeKHR")) return (void *)table->CreateDisplayModeKHR;
  1371. if (!strcmp(name, "GetDisplayPlaneCapabilitiesKHR")) return (void *)table->GetDisplayPlaneCapabilitiesKHR;
  1372. if (!strcmp(name, "CreateDisplayPlaneSurfaceKHR")) return (void *)table->CreateDisplayPlaneSurfaceKHR;
  1373. // ---- VK_KHR_xlib_surface extension commands
  1374. #ifdef VK_USE_PLATFORM_XLIB_KHR
  1375. if (!strcmp(name, "CreateXlibSurfaceKHR")) return (void *)table->CreateXlibSurfaceKHR;
  1376. #endif // VK_USE_PLATFORM_XLIB_KHR
  1377. #ifdef VK_USE_PLATFORM_XLIB_KHR
  1378. if (!strcmp(name, "GetPhysicalDeviceXlibPresentationSupportKHR")) return (void *)table->GetPhysicalDeviceXlibPresentationSupportKHR;
  1379. #endif // VK_USE_PLATFORM_XLIB_KHR
  1380. // ---- VK_KHR_xcb_surface extension commands
  1381. #ifdef VK_USE_PLATFORM_XCB_KHR
  1382. if (!strcmp(name, "CreateXcbSurfaceKHR")) return (void *)table->CreateXcbSurfaceKHR;
  1383. #endif // VK_USE_PLATFORM_XCB_KHR
  1384. #ifdef VK_USE_PLATFORM_XCB_KHR
  1385. if (!strcmp(name, "GetPhysicalDeviceXcbPresentationSupportKHR")) return (void *)table->GetPhysicalDeviceXcbPresentationSupportKHR;
  1386. #endif // VK_USE_PLATFORM_XCB_KHR
  1387. // ---- VK_KHR_wayland_surface extension commands
  1388. #ifdef VK_USE_PLATFORM_WAYLAND_KHR
  1389. if (!strcmp(name, "CreateWaylandSurfaceKHR")) return (void *)table->CreateWaylandSurfaceKHR;
  1390. #endif // VK_USE_PLATFORM_WAYLAND_KHR
  1391. #ifdef VK_USE_PLATFORM_WAYLAND_KHR
  1392. if (!strcmp(name, "GetPhysicalDeviceWaylandPresentationSupportKHR")) return (void *)table->GetPhysicalDeviceWaylandPresentationSupportKHR;
  1393. #endif // VK_USE_PLATFORM_WAYLAND_KHR
  1394. // ---- VK_KHR_android_surface extension commands
  1395. #ifdef VK_USE_PLATFORM_ANDROID_KHR
  1396. if (!strcmp(name, "CreateAndroidSurfaceKHR")) return (void *)table->CreateAndroidSurfaceKHR;
  1397. #endif // VK_USE_PLATFORM_ANDROID_KHR
  1398. // ---- VK_KHR_win32_surface extension commands
  1399. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1400. if (!strcmp(name, "CreateWin32SurfaceKHR")) return (void *)table->CreateWin32SurfaceKHR;
  1401. #endif // VK_USE_PLATFORM_WIN32_KHR
  1402. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1403. if (!strcmp(name, "GetPhysicalDeviceWin32PresentationSupportKHR")) return (void *)table->GetPhysicalDeviceWin32PresentationSupportKHR;
  1404. #endif // VK_USE_PLATFORM_WIN32_KHR
  1405. // ---- VK_KHR_get_physical_device_properties2 extension commands
  1406. if (!strcmp(name, "GetPhysicalDeviceFeatures2KHR")) return (void *)table->GetPhysicalDeviceFeatures2KHR;
  1407. if (!strcmp(name, "GetPhysicalDeviceProperties2KHR")) return (void *)table->GetPhysicalDeviceProperties2KHR;
  1408. if (!strcmp(name, "GetPhysicalDeviceFormatProperties2KHR")) return (void *)table->GetPhysicalDeviceFormatProperties2KHR;
  1409. if (!strcmp(name, "GetPhysicalDeviceImageFormatProperties2KHR")) return (void *)table->GetPhysicalDeviceImageFormatProperties2KHR;
  1410. if (!strcmp(name, "GetPhysicalDeviceQueueFamilyProperties2KHR")) return (void *)table->GetPhysicalDeviceQueueFamilyProperties2KHR;
  1411. if (!strcmp(name, "GetPhysicalDeviceMemoryProperties2KHR")) return (void *)table->GetPhysicalDeviceMemoryProperties2KHR;
  1412. if (!strcmp(name, "GetPhysicalDeviceSparseImageFormatProperties2KHR")) return (void *)table->GetPhysicalDeviceSparseImageFormatProperties2KHR;
  1413. // ---- VK_KHR_device_group_creation extension commands
  1414. if (!strcmp(name, "EnumeratePhysicalDeviceGroupsKHR")) return (void *)table->EnumeratePhysicalDeviceGroupsKHR;
  1415. // ---- VK_KHR_external_memory_capabilities extension commands
  1416. if (!strcmp(name, "GetPhysicalDeviceExternalBufferPropertiesKHR")) return (void *)table->GetPhysicalDeviceExternalBufferPropertiesKHR;
  1417. // ---- VK_KHR_external_semaphore_capabilities extension commands
  1418. if (!strcmp(name, "GetPhysicalDeviceExternalSemaphorePropertiesKHR")) return (void *)table->GetPhysicalDeviceExternalSemaphorePropertiesKHR;
  1419. // ---- VK_KHR_external_fence_capabilities extension commands
  1420. if (!strcmp(name, "GetPhysicalDeviceExternalFencePropertiesKHR")) return (void *)table->GetPhysicalDeviceExternalFencePropertiesKHR;
  1421. // ---- VK_KHR_performance_query extension commands
  1422. if (!strcmp(name, "EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR")) return (void *)table->EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR;
  1423. if (!strcmp(name, "GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR")) return (void *)table->GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR;
  1424. // ---- VK_KHR_get_surface_capabilities2 extension commands
  1425. if (!strcmp(name, "GetPhysicalDeviceSurfaceCapabilities2KHR")) return (void *)table->GetPhysicalDeviceSurfaceCapabilities2KHR;
  1426. if (!strcmp(name, "GetPhysicalDeviceSurfaceFormats2KHR")) return (void *)table->GetPhysicalDeviceSurfaceFormats2KHR;
  1427. // ---- VK_KHR_get_display_properties2 extension commands
  1428. if (!strcmp(name, "GetPhysicalDeviceDisplayProperties2KHR")) return (void *)table->GetPhysicalDeviceDisplayProperties2KHR;
  1429. if (!strcmp(name, "GetPhysicalDeviceDisplayPlaneProperties2KHR")) return (void *)table->GetPhysicalDeviceDisplayPlaneProperties2KHR;
  1430. if (!strcmp(name, "GetDisplayModeProperties2KHR")) return (void *)table->GetDisplayModeProperties2KHR;
  1431. if (!strcmp(name, "GetDisplayPlaneCapabilities2KHR")) return (void *)table->GetDisplayPlaneCapabilities2KHR;
  1432. // ---- VK_KHR_fragment_shading_rate extension commands
  1433. if (!strcmp(name, "GetPhysicalDeviceFragmentShadingRatesKHR")) return (void *)table->GetPhysicalDeviceFragmentShadingRatesKHR;
  1434. // ---- VK_EXT_debug_report extension commands
  1435. if (!strcmp(name, "CreateDebugReportCallbackEXT")) return (void *)table->CreateDebugReportCallbackEXT;
  1436. if (!strcmp(name, "DestroyDebugReportCallbackEXT")) return (void *)table->DestroyDebugReportCallbackEXT;
  1437. if (!strcmp(name, "DebugReportMessageEXT")) return (void *)table->DebugReportMessageEXT;
  1438. // ---- VK_GGP_stream_descriptor_surface extension commands
  1439. #ifdef VK_USE_PLATFORM_GGP
  1440. if (!strcmp(name, "CreateStreamDescriptorSurfaceGGP")) return (void *)table->CreateStreamDescriptorSurfaceGGP;
  1441. #endif // VK_USE_PLATFORM_GGP
  1442. // ---- VK_NV_external_memory_capabilities extension commands
  1443. if (!strcmp(name, "GetPhysicalDeviceExternalImageFormatPropertiesNV")) return (void *)table->GetPhysicalDeviceExternalImageFormatPropertiesNV;
  1444. // ---- VK_NN_vi_surface extension commands
  1445. #ifdef VK_USE_PLATFORM_VI_NN
  1446. if (!strcmp(name, "CreateViSurfaceNN")) return (void *)table->CreateViSurfaceNN;
  1447. #endif // VK_USE_PLATFORM_VI_NN
  1448. // ---- VK_EXT_direct_mode_display extension commands
  1449. if (!strcmp(name, "ReleaseDisplayEXT")) return (void *)table->ReleaseDisplayEXT;
  1450. // ---- VK_EXT_acquire_xlib_display extension commands
  1451. #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
  1452. if (!strcmp(name, "AcquireXlibDisplayEXT")) return (void *)table->AcquireXlibDisplayEXT;
  1453. #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
  1454. #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
  1455. if (!strcmp(name, "GetRandROutputDisplayEXT")) return (void *)table->GetRandROutputDisplayEXT;
  1456. #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
  1457. // ---- VK_EXT_display_surface_counter extension commands
  1458. if (!strcmp(name, "GetPhysicalDeviceSurfaceCapabilities2EXT")) return (void *)table->GetPhysicalDeviceSurfaceCapabilities2EXT;
  1459. // ---- VK_MVK_ios_surface extension commands
  1460. #ifdef VK_USE_PLATFORM_IOS_MVK
  1461. if (!strcmp(name, "CreateIOSSurfaceMVK")) return (void *)table->CreateIOSSurfaceMVK;
  1462. #endif // VK_USE_PLATFORM_IOS_MVK
  1463. // ---- VK_MVK_macos_surface extension commands
  1464. #ifdef VK_USE_PLATFORM_MACOS_MVK
  1465. if (!strcmp(name, "CreateMacOSSurfaceMVK")) return (void *)table->CreateMacOSSurfaceMVK;
  1466. #endif // VK_USE_PLATFORM_MACOS_MVK
  1467. // ---- VK_EXT_debug_utils extension commands
  1468. if (!strcmp(name, "CreateDebugUtilsMessengerEXT")) return (void *)table->CreateDebugUtilsMessengerEXT;
  1469. if (!strcmp(name, "DestroyDebugUtilsMessengerEXT")) return (void *)table->DestroyDebugUtilsMessengerEXT;
  1470. if (!strcmp(name, "SubmitDebugUtilsMessageEXT")) return (void *)table->SubmitDebugUtilsMessageEXT;
  1471. // ---- VK_EXT_sample_locations extension commands
  1472. if (!strcmp(name, "GetPhysicalDeviceMultisamplePropertiesEXT")) return (void *)table->GetPhysicalDeviceMultisamplePropertiesEXT;
  1473. // ---- VK_EXT_calibrated_timestamps extension commands
  1474. if (!strcmp(name, "GetPhysicalDeviceCalibrateableTimeDomainsEXT")) return (void *)table->GetPhysicalDeviceCalibrateableTimeDomainsEXT;
  1475. // ---- VK_FUCHSIA_imagepipe_surface extension commands
  1476. #ifdef VK_USE_PLATFORM_FUCHSIA
  1477. if (!strcmp(name, "CreateImagePipeSurfaceFUCHSIA")) return (void *)table->CreateImagePipeSurfaceFUCHSIA;
  1478. #endif // VK_USE_PLATFORM_FUCHSIA
  1479. // ---- VK_EXT_metal_surface extension commands
  1480. #ifdef VK_USE_PLATFORM_METAL_EXT
  1481. if (!strcmp(name, "CreateMetalSurfaceEXT")) return (void *)table->CreateMetalSurfaceEXT;
  1482. #endif // VK_USE_PLATFORM_METAL_EXT
  1483. // ---- VK_EXT_tooling_info extension commands
  1484. if (!strcmp(name, "GetPhysicalDeviceToolPropertiesEXT")) return (void *)table->GetPhysicalDeviceToolPropertiesEXT;
  1485. // ---- VK_NV_cooperative_matrix extension commands
  1486. if (!strcmp(name, "GetPhysicalDeviceCooperativeMatrixPropertiesNV")) return (void *)table->GetPhysicalDeviceCooperativeMatrixPropertiesNV;
  1487. // ---- VK_NV_coverage_reduction_mode extension commands
  1488. if (!strcmp(name, "GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV")) return (void *)table->GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV;
  1489. // ---- VK_EXT_full_screen_exclusive extension commands
  1490. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1491. if (!strcmp(name, "GetPhysicalDeviceSurfacePresentModes2EXT")) return (void *)table->GetPhysicalDeviceSurfacePresentModes2EXT;
  1492. #endif // VK_USE_PLATFORM_WIN32_KHR
  1493. // ---- VK_EXT_headless_surface extension commands
  1494. if (!strcmp(name, "CreateHeadlessSurfaceEXT")) return (void *)table->CreateHeadlessSurfaceEXT;
  1495. // ---- VK_EXT_directfb_surface extension commands
  1496. #ifdef VK_USE_PLATFORM_DIRECTFB_EXT
  1497. if (!strcmp(name, "CreateDirectFBSurfaceEXT")) return (void *)table->CreateDirectFBSurfaceEXT;
  1498. #endif // VK_USE_PLATFORM_DIRECTFB_EXT
  1499. #ifdef VK_USE_PLATFORM_DIRECTFB_EXT
  1500. if (!strcmp(name, "GetPhysicalDeviceDirectFBPresentationSupportEXT")) return (void *)table->GetPhysicalDeviceDirectFBPresentationSupportEXT;
  1501. #endif // VK_USE_PLATFORM_DIRECTFB_EXT
  1502. *found_name = false;
  1503. return NULL;
  1504. }
  1505. // ---- VK_KHR_device_group extension trampoline/terminators
  1506. VKAPI_ATTR void VKAPI_CALL GetDeviceGroupPeerMemoryFeaturesKHR(
  1507. VkDevice device,
  1508. uint32_t heapIndex,
  1509. uint32_t localDeviceIndex,
  1510. uint32_t remoteDeviceIndex,
  1511. VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) {
  1512. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1513. disp->GetDeviceGroupPeerMemoryFeaturesKHR(device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures);
  1514. }
  1515. VKAPI_ATTR void VKAPI_CALL CmdSetDeviceMaskKHR(
  1516. VkCommandBuffer commandBuffer,
  1517. uint32_t deviceMask) {
  1518. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  1519. disp->CmdSetDeviceMaskKHR(commandBuffer, deviceMask);
  1520. }
  1521. VKAPI_ATTR void VKAPI_CALL CmdDispatchBaseKHR(
  1522. VkCommandBuffer commandBuffer,
  1523. uint32_t baseGroupX,
  1524. uint32_t baseGroupY,
  1525. uint32_t baseGroupZ,
  1526. uint32_t groupCountX,
  1527. uint32_t groupCountY,
  1528. uint32_t groupCountZ) {
  1529. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  1530. disp->CmdDispatchBaseKHR(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ);
  1531. }
  1532. // ---- VK_KHR_maintenance1 extension trampoline/terminators
  1533. VKAPI_ATTR void VKAPI_CALL TrimCommandPoolKHR(
  1534. VkDevice device,
  1535. VkCommandPool commandPool,
  1536. VkCommandPoolTrimFlags flags) {
  1537. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1538. disp->TrimCommandPoolKHR(device, commandPool, flags);
  1539. }
  1540. // ---- VK_KHR_external_memory_win32 extension trampoline/terminators
  1541. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1542. VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleKHR(
  1543. VkDevice device,
  1544. const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
  1545. HANDLE* pHandle) {
  1546. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1547. return disp->GetMemoryWin32HandleKHR(device, pGetWin32HandleInfo, pHandle);
  1548. }
  1549. #endif // VK_USE_PLATFORM_WIN32_KHR
  1550. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1551. VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandlePropertiesKHR(
  1552. VkDevice device,
  1553. VkExternalMemoryHandleTypeFlagBits handleType,
  1554. HANDLE handle,
  1555. VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) {
  1556. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1557. return disp->GetMemoryWin32HandlePropertiesKHR(device, handleType, handle, pMemoryWin32HandleProperties);
  1558. }
  1559. #endif // VK_USE_PLATFORM_WIN32_KHR
  1560. // ---- VK_KHR_external_memory_fd extension trampoline/terminators
  1561. VKAPI_ATTR VkResult VKAPI_CALL GetMemoryFdKHR(
  1562. VkDevice device,
  1563. const VkMemoryGetFdInfoKHR* pGetFdInfo,
  1564. int* pFd) {
  1565. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1566. return disp->GetMemoryFdKHR(device, pGetFdInfo, pFd);
  1567. }
  1568. VKAPI_ATTR VkResult VKAPI_CALL GetMemoryFdPropertiesKHR(
  1569. VkDevice device,
  1570. VkExternalMemoryHandleTypeFlagBits handleType,
  1571. int fd,
  1572. VkMemoryFdPropertiesKHR* pMemoryFdProperties) {
  1573. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1574. return disp->GetMemoryFdPropertiesKHR(device, handleType, fd, pMemoryFdProperties);
  1575. }
  1576. // ---- VK_KHR_external_semaphore_win32 extension trampoline/terminators
  1577. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1578. VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreWin32HandleKHR(
  1579. VkDevice device,
  1580. const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) {
  1581. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1582. return disp->ImportSemaphoreWin32HandleKHR(device, pImportSemaphoreWin32HandleInfo);
  1583. }
  1584. #endif // VK_USE_PLATFORM_WIN32_KHR
  1585. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1586. VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreWin32HandleKHR(
  1587. VkDevice device,
  1588. const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
  1589. HANDLE* pHandle) {
  1590. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1591. return disp->GetSemaphoreWin32HandleKHR(device, pGetWin32HandleInfo, pHandle);
  1592. }
  1593. #endif // VK_USE_PLATFORM_WIN32_KHR
  1594. // ---- VK_KHR_external_semaphore_fd extension trampoline/terminators
  1595. VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreFdKHR(
  1596. VkDevice device,
  1597. const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) {
  1598. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1599. return disp->ImportSemaphoreFdKHR(device, pImportSemaphoreFdInfo);
  1600. }
  1601. VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreFdKHR(
  1602. VkDevice device,
  1603. const VkSemaphoreGetFdInfoKHR* pGetFdInfo,
  1604. int* pFd) {
  1605. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1606. return disp->GetSemaphoreFdKHR(device, pGetFdInfo, pFd);
  1607. }
  1608. // ---- VK_KHR_push_descriptor extension trampoline/terminators
  1609. VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetKHR(
  1610. VkCommandBuffer commandBuffer,
  1611. VkPipelineBindPoint pipelineBindPoint,
  1612. VkPipelineLayout layout,
  1613. uint32_t set,
  1614. uint32_t descriptorWriteCount,
  1615. const VkWriteDescriptorSet* pDescriptorWrites) {
  1616. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  1617. disp->CmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, pDescriptorWrites);
  1618. }
  1619. VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetWithTemplateKHR(
  1620. VkCommandBuffer commandBuffer,
  1621. VkDescriptorUpdateTemplate descriptorUpdateTemplate,
  1622. VkPipelineLayout layout,
  1623. uint32_t set,
  1624. const void* pData) {
  1625. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  1626. disp->CmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, pData);
  1627. }
  1628. // ---- VK_KHR_descriptor_update_template extension trampoline/terminators
  1629. VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorUpdateTemplateKHR(
  1630. VkDevice device,
  1631. const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo,
  1632. const VkAllocationCallbacks* pAllocator,
  1633. VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) {
  1634. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1635. return disp->CreateDescriptorUpdateTemplateKHR(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate);
  1636. }
  1637. VKAPI_ATTR void VKAPI_CALL DestroyDescriptorUpdateTemplateKHR(
  1638. VkDevice device,
  1639. VkDescriptorUpdateTemplate descriptorUpdateTemplate,
  1640. const VkAllocationCallbacks* pAllocator) {
  1641. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1642. disp->DestroyDescriptorUpdateTemplateKHR(device, descriptorUpdateTemplate, pAllocator);
  1643. }
  1644. VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSetWithTemplateKHR(
  1645. VkDevice device,
  1646. VkDescriptorSet descriptorSet,
  1647. VkDescriptorUpdateTemplate descriptorUpdateTemplate,
  1648. const void* pData) {
  1649. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1650. disp->UpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, pData);
  1651. }
  1652. // ---- VK_KHR_create_renderpass2 extension trampoline/terminators
  1653. VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass2KHR(
  1654. VkDevice device,
  1655. const VkRenderPassCreateInfo2* pCreateInfo,
  1656. const VkAllocationCallbacks* pAllocator,
  1657. VkRenderPass* pRenderPass) {
  1658. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1659. return disp->CreateRenderPass2KHR(device, pCreateInfo, pAllocator, pRenderPass);
  1660. }
  1661. VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass2KHR(
  1662. VkCommandBuffer commandBuffer,
  1663. const VkRenderPassBeginInfo* pRenderPassBegin,
  1664. const VkSubpassBeginInfo* pSubpassBeginInfo) {
  1665. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  1666. disp->CmdBeginRenderPass2KHR(commandBuffer, pRenderPassBegin, pSubpassBeginInfo);
  1667. }
  1668. VKAPI_ATTR void VKAPI_CALL CmdNextSubpass2KHR(
  1669. VkCommandBuffer commandBuffer,
  1670. const VkSubpassBeginInfo* pSubpassBeginInfo,
  1671. const VkSubpassEndInfo* pSubpassEndInfo) {
  1672. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  1673. disp->CmdNextSubpass2KHR(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo);
  1674. }
  1675. VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass2KHR(
  1676. VkCommandBuffer commandBuffer,
  1677. const VkSubpassEndInfo* pSubpassEndInfo) {
  1678. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  1679. disp->CmdEndRenderPass2KHR(commandBuffer, pSubpassEndInfo);
  1680. }
  1681. // ---- VK_KHR_shared_presentable_image extension trampoline/terminators
  1682. VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainStatusKHR(
  1683. VkDevice device,
  1684. VkSwapchainKHR swapchain) {
  1685. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1686. return disp->GetSwapchainStatusKHR(device, swapchain);
  1687. }
  1688. // ---- VK_KHR_external_fence_win32 extension trampoline/terminators
  1689. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1690. VKAPI_ATTR VkResult VKAPI_CALL ImportFenceWin32HandleKHR(
  1691. VkDevice device,
  1692. const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) {
  1693. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1694. return disp->ImportFenceWin32HandleKHR(device, pImportFenceWin32HandleInfo);
  1695. }
  1696. #endif // VK_USE_PLATFORM_WIN32_KHR
  1697. #ifdef VK_USE_PLATFORM_WIN32_KHR
  1698. VKAPI_ATTR VkResult VKAPI_CALL GetFenceWin32HandleKHR(
  1699. VkDevice device,
  1700. const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
  1701. HANDLE* pHandle) {
  1702. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1703. return disp->GetFenceWin32HandleKHR(device, pGetWin32HandleInfo, pHandle);
  1704. }
  1705. #endif // VK_USE_PLATFORM_WIN32_KHR
  1706. // ---- VK_KHR_external_fence_fd extension trampoline/terminators
  1707. VKAPI_ATTR VkResult VKAPI_CALL ImportFenceFdKHR(
  1708. VkDevice device,
  1709. const VkImportFenceFdInfoKHR* pImportFenceFdInfo) {
  1710. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1711. return disp->ImportFenceFdKHR(device, pImportFenceFdInfo);
  1712. }
  1713. VKAPI_ATTR VkResult VKAPI_CALL GetFenceFdKHR(
  1714. VkDevice device,
  1715. const VkFenceGetFdInfoKHR* pGetFdInfo,
  1716. int* pFd) {
  1717. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1718. return disp->GetFenceFdKHR(device, pGetFdInfo, pFd);
  1719. }
  1720. // ---- VK_KHR_performance_query extension trampoline/terminators
  1721. VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
  1722. VkPhysicalDevice physicalDevice,
  1723. uint32_t queueFamilyIndex,
  1724. uint32_t* pCounterCount,
  1725. VkPerformanceCounterKHR* pCounters,
  1726. VkPerformanceCounterDescriptionKHR* pCounterDescriptions) {
  1727. const VkLayerInstanceDispatchTable *disp;
  1728. VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
  1729. disp = loader_get_instance_layer_dispatch(physicalDevice);
  1730. return disp->EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(unwrapped_phys_dev, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions);
  1731. }
  1732. VKAPI_ATTR VkResult VKAPI_CALL terminator_EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
  1733. VkPhysicalDevice physicalDevice,
  1734. uint32_t queueFamilyIndex,
  1735. uint32_t* pCounterCount,
  1736. VkPerformanceCounterKHR* pCounters,
  1737. VkPerformanceCounterDescriptionKHR* pCounterDescriptions) {
  1738. struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
  1739. struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
  1740. if (NULL == icd_term->dispatch.EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR) {
  1741. loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
  1742. "ICD associated with VkPhysicalDevice does not support EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR");
  1743. }
  1744. return icd_term->dispatch.EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(phys_dev_term->phys_dev, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions);
  1745. }
  1746. VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(
  1747. VkPhysicalDevice physicalDevice,
  1748. const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo,
  1749. uint32_t* pNumPasses) {
  1750. const VkLayerInstanceDispatchTable *disp;
  1751. VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
  1752. disp = loader_get_instance_layer_dispatch(physicalDevice);
  1753. disp->GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(unwrapped_phys_dev, pPerformanceQueryCreateInfo, pNumPasses);
  1754. }
  1755. VKAPI_ATTR void VKAPI_CALL terminator_GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(
  1756. VkPhysicalDevice physicalDevice,
  1757. const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo,
  1758. uint32_t* pNumPasses) {
  1759. struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
  1760. struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
  1761. if (NULL == icd_term->dispatch.GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR) {
  1762. loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
  1763. "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR");
  1764. }
  1765. icd_term->dispatch.GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(phys_dev_term->phys_dev, pPerformanceQueryCreateInfo, pNumPasses);
  1766. }
  1767. VKAPI_ATTR VkResult VKAPI_CALL AcquireProfilingLockKHR(
  1768. VkDevice device,
  1769. const VkAcquireProfilingLockInfoKHR* pInfo) {
  1770. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1771. return disp->AcquireProfilingLockKHR(device, pInfo);
  1772. }
  1773. VKAPI_ATTR void VKAPI_CALL ReleaseProfilingLockKHR(
  1774. VkDevice device) {
  1775. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1776. disp->ReleaseProfilingLockKHR(device);
  1777. }
  1778. // ---- VK_KHR_get_memory_requirements2 extension trampoline/terminators
  1779. VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements2KHR(
  1780. VkDevice device,
  1781. const VkImageMemoryRequirementsInfo2* pInfo,
  1782. VkMemoryRequirements2* pMemoryRequirements) {
  1783. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1784. disp->GetImageMemoryRequirements2KHR(device, pInfo, pMemoryRequirements);
  1785. }
  1786. VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements2KHR(
  1787. VkDevice device,
  1788. const VkBufferMemoryRequirementsInfo2* pInfo,
  1789. VkMemoryRequirements2* pMemoryRequirements) {
  1790. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1791. disp->GetBufferMemoryRequirements2KHR(device, pInfo, pMemoryRequirements);
  1792. }
  1793. VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements2KHR(
  1794. VkDevice device,
  1795. const VkImageSparseMemoryRequirementsInfo2* pInfo,
  1796. uint32_t* pSparseMemoryRequirementCount,
  1797. VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) {
  1798. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1799. disp->GetImageSparseMemoryRequirements2KHR(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
  1800. }
  1801. // ---- VK_KHR_sampler_ycbcr_conversion extension trampoline/terminators
  1802. VKAPI_ATTR VkResult VKAPI_CALL CreateSamplerYcbcrConversionKHR(
  1803. VkDevice device,
  1804. const VkSamplerYcbcrConversionCreateInfo* pCreateInfo,
  1805. const VkAllocationCallbacks* pAllocator,
  1806. VkSamplerYcbcrConversion* pYcbcrConversion) {
  1807. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1808. return disp->CreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion);
  1809. }
  1810. VKAPI_ATTR void VKAPI_CALL DestroySamplerYcbcrConversionKHR(
  1811. VkDevice device,
  1812. VkSamplerYcbcrConversion ycbcrConversion,
  1813. const VkAllocationCallbacks* pAllocator) {
  1814. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1815. disp->DestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator);
  1816. }
  1817. // ---- VK_KHR_bind_memory2 extension trampoline/terminators
  1818. VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory2KHR(
  1819. VkDevice device,
  1820. uint32_t bindInfoCount,
  1821. const VkBindBufferMemoryInfo* pBindInfos) {
  1822. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1823. return disp->BindBufferMemory2KHR(device, bindInfoCount, pBindInfos);
  1824. }
  1825. VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory2KHR(
  1826. VkDevice device,
  1827. uint32_t bindInfoCount,
  1828. const VkBindImageMemoryInfo* pBindInfos) {
  1829. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1830. return disp->BindImageMemory2KHR(device, bindInfoCount, pBindInfos);
  1831. }
  1832. // ---- VK_KHR_maintenance3 extension trampoline/terminators
  1833. VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutSupportKHR(
  1834. VkDevice device,
  1835. const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
  1836. VkDescriptorSetLayoutSupport* pSupport) {
  1837. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1838. disp->GetDescriptorSetLayoutSupportKHR(device, pCreateInfo, pSupport);
  1839. }
  1840. // ---- VK_KHR_draw_indirect_count extension trampoline/terminators
  1841. VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCountKHR(
  1842. VkCommandBuffer commandBuffer,
  1843. VkBuffer buffer,
  1844. VkDeviceSize offset,
  1845. VkBuffer countBuffer,
  1846. VkDeviceSize countBufferOffset,
  1847. uint32_t maxDrawCount,
  1848. uint32_t stride) {
  1849. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  1850. disp->CmdDrawIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
  1851. }
  1852. VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountKHR(
  1853. VkCommandBuffer commandBuffer,
  1854. VkBuffer buffer,
  1855. VkDeviceSize offset,
  1856. VkBuffer countBuffer,
  1857. VkDeviceSize countBufferOffset,
  1858. uint32_t maxDrawCount,
  1859. uint32_t stride) {
  1860. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  1861. disp->CmdDrawIndexedIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
  1862. }
  1863. // ---- VK_KHR_timeline_semaphore extension trampoline/terminators
  1864. VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreCounterValueKHR(
  1865. VkDevice device,
  1866. VkSemaphore semaphore,
  1867. uint64_t* pValue) {
  1868. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1869. return disp->GetSemaphoreCounterValueKHR(device, semaphore, pValue);
  1870. }
  1871. VKAPI_ATTR VkResult VKAPI_CALL WaitSemaphoresKHR(
  1872. VkDevice device,
  1873. const VkSemaphoreWaitInfo* pWaitInfo,
  1874. uint64_t timeout) {
  1875. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1876. return disp->WaitSemaphoresKHR(device, pWaitInfo, timeout);
  1877. }
  1878. VKAPI_ATTR VkResult VKAPI_CALL SignalSemaphoreKHR(
  1879. VkDevice device,
  1880. const VkSemaphoreSignalInfo* pSignalInfo) {
  1881. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1882. return disp->SignalSemaphoreKHR(device, pSignalInfo);
  1883. }
  1884. // ---- VK_KHR_fragment_shading_rate extension trampoline/terminators
  1885. VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceFragmentShadingRatesKHR(
  1886. VkPhysicalDevice physicalDevice,
  1887. uint32_t* pFragmentShadingRateCount,
  1888. VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates) {
  1889. const VkLayerInstanceDispatchTable *disp;
  1890. VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
  1891. disp = loader_get_instance_layer_dispatch(physicalDevice);
  1892. return disp->GetPhysicalDeviceFragmentShadingRatesKHR(unwrapped_phys_dev, pFragmentShadingRateCount, pFragmentShadingRates);
  1893. }
  1894. VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceFragmentShadingRatesKHR(
  1895. VkPhysicalDevice physicalDevice,
  1896. uint32_t* pFragmentShadingRateCount,
  1897. VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates) {
  1898. struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
  1899. struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
  1900. if (NULL == icd_term->dispatch.GetPhysicalDeviceFragmentShadingRatesKHR) {
  1901. loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
  1902. "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceFragmentShadingRatesKHR");
  1903. }
  1904. return icd_term->dispatch.GetPhysicalDeviceFragmentShadingRatesKHR(phys_dev_term->phys_dev, pFragmentShadingRateCount, pFragmentShadingRates);
  1905. }
  1906. VKAPI_ATTR void VKAPI_CALL CmdSetFragmentShadingRateKHR(
  1907. VkCommandBuffer commandBuffer,
  1908. const VkExtent2D* pFragmentSize,
  1909. const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) {
  1910. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  1911. disp->CmdSetFragmentShadingRateKHR(commandBuffer, pFragmentSize, combinerOps);
  1912. }
  1913. // ---- VK_KHR_buffer_device_address extension trampoline/terminators
  1914. VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddressKHR(
  1915. VkDevice device,
  1916. const VkBufferDeviceAddressInfo* pInfo) {
  1917. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1918. return disp->GetBufferDeviceAddressKHR(device, pInfo);
  1919. }
  1920. VKAPI_ATTR uint64_t VKAPI_CALL GetBufferOpaqueCaptureAddressKHR(
  1921. VkDevice device,
  1922. const VkBufferDeviceAddressInfo* pInfo) {
  1923. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1924. return disp->GetBufferOpaqueCaptureAddressKHR(device, pInfo);
  1925. }
  1926. VKAPI_ATTR uint64_t VKAPI_CALL GetDeviceMemoryOpaqueCaptureAddressKHR(
  1927. VkDevice device,
  1928. const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) {
  1929. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1930. return disp->GetDeviceMemoryOpaqueCaptureAddressKHR(device, pInfo);
  1931. }
  1932. // ---- VK_KHR_deferred_host_operations extension trampoline/terminators
  1933. VKAPI_ATTR VkResult VKAPI_CALL CreateDeferredOperationKHR(
  1934. VkDevice device,
  1935. const VkAllocationCallbacks* pAllocator,
  1936. VkDeferredOperationKHR* pDeferredOperation) {
  1937. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1938. return disp->CreateDeferredOperationKHR(device, pAllocator, pDeferredOperation);
  1939. }
  1940. VKAPI_ATTR void VKAPI_CALL DestroyDeferredOperationKHR(
  1941. VkDevice device,
  1942. VkDeferredOperationKHR operation,
  1943. const VkAllocationCallbacks* pAllocator) {
  1944. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1945. disp->DestroyDeferredOperationKHR(device, operation, pAllocator);
  1946. }
  1947. VKAPI_ATTR uint32_t VKAPI_CALL GetDeferredOperationMaxConcurrencyKHR(
  1948. VkDevice device,
  1949. VkDeferredOperationKHR operation) {
  1950. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1951. return disp->GetDeferredOperationMaxConcurrencyKHR(device, operation);
  1952. }
  1953. VKAPI_ATTR VkResult VKAPI_CALL GetDeferredOperationResultKHR(
  1954. VkDevice device,
  1955. VkDeferredOperationKHR operation) {
  1956. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1957. return disp->GetDeferredOperationResultKHR(device, operation);
  1958. }
  1959. VKAPI_ATTR VkResult VKAPI_CALL DeferredOperationJoinKHR(
  1960. VkDevice device,
  1961. VkDeferredOperationKHR operation) {
  1962. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1963. return disp->DeferredOperationJoinKHR(device, operation);
  1964. }
  1965. // ---- VK_KHR_pipeline_executable_properties extension trampoline/terminators
  1966. VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutablePropertiesKHR(
  1967. VkDevice device,
  1968. const VkPipelineInfoKHR* pPipelineInfo,
  1969. uint32_t* pExecutableCount,
  1970. VkPipelineExecutablePropertiesKHR* pProperties) {
  1971. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1972. return disp->GetPipelineExecutablePropertiesKHR(device, pPipelineInfo, pExecutableCount, pProperties);
  1973. }
  1974. VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutableStatisticsKHR(
  1975. VkDevice device,
  1976. const VkPipelineExecutableInfoKHR* pExecutableInfo,
  1977. uint32_t* pStatisticCount,
  1978. VkPipelineExecutableStatisticKHR* pStatistics) {
  1979. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1980. return disp->GetPipelineExecutableStatisticsKHR(device, pExecutableInfo, pStatisticCount, pStatistics);
  1981. }
  1982. VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutableInternalRepresentationsKHR(
  1983. VkDevice device,
  1984. const VkPipelineExecutableInfoKHR* pExecutableInfo,
  1985. uint32_t* pInternalRepresentationCount,
  1986. VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations) {
  1987. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  1988. return disp->GetPipelineExecutableInternalRepresentationsKHR(device, pExecutableInfo, pInternalRepresentationCount, pInternalRepresentations);
  1989. }
  1990. // ---- VK_KHR_copy_commands2 extension trampoline/terminators
  1991. VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer2KHR(
  1992. VkCommandBuffer commandBuffer,
  1993. const VkCopyBufferInfo2KHR* pCopyBufferInfo) {
  1994. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  1995. disp->CmdCopyBuffer2KHR(commandBuffer, pCopyBufferInfo);
  1996. }
  1997. VKAPI_ATTR void VKAPI_CALL CmdCopyImage2KHR(
  1998. VkCommandBuffer commandBuffer,
  1999. const VkCopyImageInfo2KHR* pCopyImageInfo) {
  2000. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2001. disp->CmdCopyImage2KHR(commandBuffer, pCopyImageInfo);
  2002. }
  2003. VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage2KHR(
  2004. VkCommandBuffer commandBuffer,
  2005. const VkCopyBufferToImageInfo2KHR* pCopyBufferToImageInfo) {
  2006. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2007. disp->CmdCopyBufferToImage2KHR(commandBuffer, pCopyBufferToImageInfo);
  2008. }
  2009. VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer2KHR(
  2010. VkCommandBuffer commandBuffer,
  2011. const VkCopyImageToBufferInfo2KHR* pCopyImageToBufferInfo) {
  2012. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2013. disp->CmdCopyImageToBuffer2KHR(commandBuffer, pCopyImageToBufferInfo);
  2014. }
  2015. VKAPI_ATTR void VKAPI_CALL CmdBlitImage2KHR(
  2016. VkCommandBuffer commandBuffer,
  2017. const VkBlitImageInfo2KHR* pBlitImageInfo) {
  2018. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2019. disp->CmdBlitImage2KHR(commandBuffer, pBlitImageInfo);
  2020. }
  2021. VKAPI_ATTR void VKAPI_CALL CmdResolveImage2KHR(
  2022. VkCommandBuffer commandBuffer,
  2023. const VkResolveImageInfo2KHR* pResolveImageInfo) {
  2024. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2025. disp->CmdResolveImage2KHR(commandBuffer, pResolveImageInfo);
  2026. }
  2027. // ---- VK_EXT_debug_marker extension trampoline/terminators
  2028. VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectTagEXT(
  2029. VkDevice device,
  2030. const VkDebugMarkerObjectTagInfoEXT* pTagInfo) {
  2031. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2032. VkDebugMarkerObjectTagInfoEXT local_tag_info;
  2033. memcpy(&local_tag_info, pTagInfo, sizeof(VkDebugMarkerObjectTagInfoEXT));
  2034. // If this is a physical device, we have to replace it with the proper one for the next call.
  2035. if (pTagInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT) {
  2036. struct loader_physical_device_tramp *phys_dev_tramp = (struct loader_physical_device_tramp *)(uintptr_t)pTagInfo->object;
  2037. local_tag_info.object = (uint64_t)(uintptr_t)phys_dev_tramp->phys_dev;
  2038. }
  2039. return disp->DebugMarkerSetObjectTagEXT(device, &local_tag_info);
  2040. }
  2041. VKAPI_ATTR VkResult VKAPI_CALL terminator_DebugMarkerSetObjectTagEXT(
  2042. VkDevice device,
  2043. const VkDebugMarkerObjectTagInfoEXT* pTagInfo) {
  2044. uint32_t icd_index = 0;
  2045. struct loader_device *dev;
  2046. struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, &icd_index);
  2047. if (NULL != icd_term && NULL != icd_term->dispatch.DebugMarkerSetObjectTagEXT) {
  2048. VkDebugMarkerObjectTagInfoEXT local_tag_info;
  2049. memcpy(&local_tag_info, pTagInfo, sizeof(VkDebugMarkerObjectTagInfoEXT));
  2050. // If this is a physical device, we have to replace it with the proper one for the next call.
  2051. if (pTagInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT) {
  2052. struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)(uintptr_t)pTagInfo->object;
  2053. local_tag_info.object = (uint64_t)(uintptr_t)phys_dev_term->phys_dev;
  2054. // If this is a KHR_surface, and the ICD has created its own, we have to replace it with the proper one for the next call.
  2055. } else if (pTagInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT) {
  2056. if (NULL != icd_term && NULL != icd_term->dispatch.CreateSwapchainKHR) {
  2057. VkIcdSurface *icd_surface = (VkIcdSurface *)(uintptr_t)pTagInfo->object;
  2058. if (NULL != icd_surface->real_icd_surfaces) {
  2059. local_tag_info.object = (uint64_t)icd_surface->real_icd_surfaces[icd_index];
  2060. }
  2061. }
  2062. }
  2063. return icd_term->dispatch.DebugMarkerSetObjectTagEXT(device, &local_tag_info);
  2064. } else {
  2065. return VK_SUCCESS;
  2066. }
  2067. }
  2068. VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectNameEXT(
  2069. VkDevice device,
  2070. const VkDebugMarkerObjectNameInfoEXT* pNameInfo) {
  2071. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2072. VkDebugMarkerObjectNameInfoEXT local_name_info;
  2073. memcpy(&local_name_info, pNameInfo, sizeof(VkDebugMarkerObjectNameInfoEXT));
  2074. // If this is a physical device, we have to replace it with the proper one for the next call.
  2075. if (pNameInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT) {
  2076. struct loader_physical_device_tramp *phys_dev_tramp = (struct loader_physical_device_tramp *)(uintptr_t)pNameInfo->object;
  2077. local_name_info.object = (uint64_t)(uintptr_t)phys_dev_tramp->phys_dev;
  2078. }
  2079. return disp->DebugMarkerSetObjectNameEXT(device, &local_name_info);
  2080. }
  2081. VKAPI_ATTR VkResult VKAPI_CALL terminator_DebugMarkerSetObjectNameEXT(
  2082. VkDevice device,
  2083. const VkDebugMarkerObjectNameInfoEXT* pNameInfo) {
  2084. uint32_t icd_index = 0;
  2085. struct loader_device *dev;
  2086. struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, &icd_index);
  2087. if (NULL != icd_term && NULL != icd_term->dispatch.DebugMarkerSetObjectNameEXT) {
  2088. VkDebugMarkerObjectNameInfoEXT local_name_info;
  2089. memcpy(&local_name_info, pNameInfo, sizeof(VkDebugMarkerObjectNameInfoEXT));
  2090. // If this is a physical device, we have to replace it with the proper one for the next call.
  2091. if (pNameInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT) {
  2092. struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)(uintptr_t)pNameInfo->object;
  2093. local_name_info.object = (uint64_t)(uintptr_t)phys_dev_term->phys_dev;
  2094. // If this is a KHR_surface, and the ICD has created its own, we have to replace it with the proper one for the next call.
  2095. } else if (pNameInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT) {
  2096. if (NULL != icd_term && NULL != icd_term->dispatch.CreateSwapchainKHR) {
  2097. VkIcdSurface *icd_surface = (VkIcdSurface *)(uintptr_t)pNameInfo->object;
  2098. if (NULL != icd_surface->real_icd_surfaces) {
  2099. local_name_info.object = (uint64_t)icd_surface->real_icd_surfaces[icd_index];
  2100. }
  2101. }
  2102. }
  2103. return icd_term->dispatch.DebugMarkerSetObjectNameEXT(device, &local_name_info);
  2104. } else {
  2105. return VK_SUCCESS;
  2106. }
  2107. }
  2108. VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerBeginEXT(
  2109. VkCommandBuffer commandBuffer,
  2110. const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
  2111. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2112. disp->CmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo);
  2113. }
  2114. VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerEndEXT(
  2115. VkCommandBuffer commandBuffer) {
  2116. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2117. disp->CmdDebugMarkerEndEXT(commandBuffer);
  2118. }
  2119. VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerInsertEXT(
  2120. VkCommandBuffer commandBuffer,
  2121. const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {
  2122. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2123. disp->CmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo);
  2124. }
  2125. // ---- VK_EXT_transform_feedback extension trampoline/terminators
  2126. VKAPI_ATTR void VKAPI_CALL CmdBindTransformFeedbackBuffersEXT(
  2127. VkCommandBuffer commandBuffer,
  2128. uint32_t firstBinding,
  2129. uint32_t bindingCount,
  2130. const VkBuffer* pBuffers,
  2131. const VkDeviceSize* pOffsets,
  2132. const VkDeviceSize* pSizes) {
  2133. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2134. disp->CmdBindTransformFeedbackBuffersEXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes);
  2135. }
  2136. VKAPI_ATTR void VKAPI_CALL CmdBeginTransformFeedbackEXT(
  2137. VkCommandBuffer commandBuffer,
  2138. uint32_t firstCounterBuffer,
  2139. uint32_t counterBufferCount,
  2140. const VkBuffer* pCounterBuffers,
  2141. const VkDeviceSize* pCounterBufferOffsets) {
  2142. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2143. disp->CmdBeginTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets);
  2144. }
  2145. VKAPI_ATTR void VKAPI_CALL CmdEndTransformFeedbackEXT(
  2146. VkCommandBuffer commandBuffer,
  2147. uint32_t firstCounterBuffer,
  2148. uint32_t counterBufferCount,
  2149. const VkBuffer* pCounterBuffers,
  2150. const VkDeviceSize* pCounterBufferOffsets) {
  2151. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2152. disp->CmdEndTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets);
  2153. }
  2154. VKAPI_ATTR void VKAPI_CALL CmdBeginQueryIndexedEXT(
  2155. VkCommandBuffer commandBuffer,
  2156. VkQueryPool queryPool,
  2157. uint32_t query,
  2158. VkQueryControlFlags flags,
  2159. uint32_t index) {
  2160. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2161. disp->CmdBeginQueryIndexedEXT(commandBuffer, queryPool, query, flags, index);
  2162. }
  2163. VKAPI_ATTR void VKAPI_CALL CmdEndQueryIndexedEXT(
  2164. VkCommandBuffer commandBuffer,
  2165. VkQueryPool queryPool,
  2166. uint32_t query,
  2167. uint32_t index) {
  2168. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2169. disp->CmdEndQueryIndexedEXT(commandBuffer, queryPool, query, index);
  2170. }
  2171. VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectByteCountEXT(
  2172. VkCommandBuffer commandBuffer,
  2173. uint32_t instanceCount,
  2174. uint32_t firstInstance,
  2175. VkBuffer counterBuffer,
  2176. VkDeviceSize counterBufferOffset,
  2177. uint32_t counterOffset,
  2178. uint32_t vertexStride) {
  2179. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2180. disp->CmdDrawIndirectByteCountEXT(commandBuffer, instanceCount, firstInstance, counterBuffer, counterBufferOffset, counterOffset, vertexStride);
  2181. }
  2182. // ---- VK_NVX_image_view_handle extension trampoline/terminators
  2183. VKAPI_ATTR uint32_t VKAPI_CALL GetImageViewHandleNVX(
  2184. VkDevice device,
  2185. const VkImageViewHandleInfoNVX* pInfo) {
  2186. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2187. return disp->GetImageViewHandleNVX(device, pInfo);
  2188. }
  2189. VKAPI_ATTR VkResult VKAPI_CALL GetImageViewAddressNVX(
  2190. VkDevice device,
  2191. VkImageView imageView,
  2192. VkImageViewAddressPropertiesNVX* pProperties) {
  2193. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2194. return disp->GetImageViewAddressNVX(device, imageView, pProperties);
  2195. }
  2196. // ---- VK_AMD_draw_indirect_count extension trampoline/terminators
  2197. VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCountAMD(
  2198. VkCommandBuffer commandBuffer,
  2199. VkBuffer buffer,
  2200. VkDeviceSize offset,
  2201. VkBuffer countBuffer,
  2202. VkDeviceSize countBufferOffset,
  2203. uint32_t maxDrawCount,
  2204. uint32_t stride) {
  2205. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2206. disp->CmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
  2207. }
  2208. VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountAMD(
  2209. VkCommandBuffer commandBuffer,
  2210. VkBuffer buffer,
  2211. VkDeviceSize offset,
  2212. VkBuffer countBuffer,
  2213. VkDeviceSize countBufferOffset,
  2214. uint32_t maxDrawCount,
  2215. uint32_t stride) {
  2216. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2217. disp->CmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
  2218. }
  2219. // ---- VK_AMD_shader_info extension trampoline/terminators
  2220. VKAPI_ATTR VkResult VKAPI_CALL GetShaderInfoAMD(
  2221. VkDevice device,
  2222. VkPipeline pipeline,
  2223. VkShaderStageFlagBits shaderStage,
  2224. VkShaderInfoTypeAMD infoType,
  2225. size_t* pInfoSize,
  2226. void* pInfo) {
  2227. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2228. return disp->GetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo);
  2229. }
  2230. // ---- VK_NV_external_memory_win32 extension trampoline/terminators
  2231. #ifdef VK_USE_PLATFORM_WIN32_KHR
  2232. VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleNV(
  2233. VkDevice device,
  2234. VkDeviceMemory memory,
  2235. VkExternalMemoryHandleTypeFlagsNV handleType,
  2236. HANDLE* pHandle) {
  2237. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2238. return disp->GetMemoryWin32HandleNV(device, memory, handleType, pHandle);
  2239. }
  2240. #endif // VK_USE_PLATFORM_WIN32_KHR
  2241. // ---- VK_NN_vi_surface extension trampoline/terminators
  2242. #ifdef VK_USE_PLATFORM_VI_NN
  2243. VKAPI_ATTR VkResult VKAPI_CALL CreateViSurfaceNN(
  2244. VkInstance instance,
  2245. const VkViSurfaceCreateInfoNN* pCreateInfo,
  2246. const VkAllocationCallbacks* pAllocator,
  2247. VkSurfaceKHR* pSurface) {
  2248. #error("Not implemented. Likely needs to be manually generated!");
  2249. return disp->CreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface);
  2250. }
  2251. VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateViSurfaceNN(
  2252. VkInstance instance,
  2253. const VkViSurfaceCreateInfoNN* pCreateInfo,
  2254. const VkAllocationCallbacks* pAllocator,
  2255. VkSurfaceKHR* pSurface) {
  2256. #error("Not implemented. Likely needs to be manually generated!");
  2257. }
  2258. #endif // VK_USE_PLATFORM_VI_NN
  2259. // ---- VK_EXT_conditional_rendering extension trampoline/terminators
  2260. VKAPI_ATTR void VKAPI_CALL CmdBeginConditionalRenderingEXT(
  2261. VkCommandBuffer commandBuffer,
  2262. const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin) {
  2263. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2264. disp->CmdBeginConditionalRenderingEXT(commandBuffer, pConditionalRenderingBegin);
  2265. }
  2266. VKAPI_ATTR void VKAPI_CALL CmdEndConditionalRenderingEXT(
  2267. VkCommandBuffer commandBuffer) {
  2268. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2269. disp->CmdEndConditionalRenderingEXT(commandBuffer);
  2270. }
  2271. // ---- VK_NV_clip_space_w_scaling extension trampoline/terminators
  2272. VKAPI_ATTR void VKAPI_CALL CmdSetViewportWScalingNV(
  2273. VkCommandBuffer commandBuffer,
  2274. uint32_t firstViewport,
  2275. uint32_t viewportCount,
  2276. const VkViewportWScalingNV* pViewportWScalings) {
  2277. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2278. disp->CmdSetViewportWScalingNV(commandBuffer, firstViewport, viewportCount, pViewportWScalings);
  2279. }
  2280. // ---- VK_EXT_display_control extension trampoline/terminators
  2281. VKAPI_ATTR VkResult VKAPI_CALL DisplayPowerControlEXT(
  2282. VkDevice device,
  2283. VkDisplayKHR display,
  2284. const VkDisplayPowerInfoEXT* pDisplayPowerInfo) {
  2285. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2286. return disp->DisplayPowerControlEXT(device, display, pDisplayPowerInfo);
  2287. }
  2288. VKAPI_ATTR VkResult VKAPI_CALL RegisterDeviceEventEXT(
  2289. VkDevice device,
  2290. const VkDeviceEventInfoEXT* pDeviceEventInfo,
  2291. const VkAllocationCallbacks* pAllocator,
  2292. VkFence* pFence) {
  2293. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2294. return disp->RegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence);
  2295. }
  2296. VKAPI_ATTR VkResult VKAPI_CALL RegisterDisplayEventEXT(
  2297. VkDevice device,
  2298. VkDisplayKHR display,
  2299. const VkDisplayEventInfoEXT* pDisplayEventInfo,
  2300. const VkAllocationCallbacks* pAllocator,
  2301. VkFence* pFence) {
  2302. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2303. return disp->RegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence);
  2304. }
  2305. VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainCounterEXT(
  2306. VkDevice device,
  2307. VkSwapchainKHR swapchain,
  2308. VkSurfaceCounterFlagBitsEXT counter,
  2309. uint64_t* pCounterValue) {
  2310. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2311. return disp->GetSwapchainCounterEXT(device, swapchain, counter, pCounterValue);
  2312. }
  2313. // ---- VK_GOOGLE_display_timing extension trampoline/terminators
  2314. VKAPI_ATTR VkResult VKAPI_CALL GetRefreshCycleDurationGOOGLE(
  2315. VkDevice device,
  2316. VkSwapchainKHR swapchain,
  2317. VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) {
  2318. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2319. return disp->GetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties);
  2320. }
  2321. VKAPI_ATTR VkResult VKAPI_CALL GetPastPresentationTimingGOOGLE(
  2322. VkDevice device,
  2323. VkSwapchainKHR swapchain,
  2324. uint32_t* pPresentationTimingCount,
  2325. VkPastPresentationTimingGOOGLE* pPresentationTimings) {
  2326. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2327. return disp->GetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, pPresentationTimings);
  2328. }
  2329. // ---- VK_EXT_discard_rectangles extension trampoline/terminators
  2330. VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleEXT(
  2331. VkCommandBuffer commandBuffer,
  2332. uint32_t firstDiscardRectangle,
  2333. uint32_t discardRectangleCount,
  2334. const VkRect2D* pDiscardRectangles) {
  2335. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2336. disp->CmdSetDiscardRectangleEXT(commandBuffer, firstDiscardRectangle, discardRectangleCount, pDiscardRectangles);
  2337. }
  2338. // ---- VK_EXT_hdr_metadata extension trampoline/terminators
  2339. VKAPI_ATTR void VKAPI_CALL SetHdrMetadataEXT(
  2340. VkDevice device,
  2341. uint32_t swapchainCount,
  2342. const VkSwapchainKHR* pSwapchains,
  2343. const VkHdrMetadataEXT* pMetadata) {
  2344. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2345. disp->SetHdrMetadataEXT(device, swapchainCount, pSwapchains, pMetadata);
  2346. }
  2347. // ---- VK_EXT_debug_utils extension trampoline/terminators
  2348. VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectNameEXT(
  2349. VkDevice device,
  2350. const VkDebugUtilsObjectNameInfoEXT* pNameInfo) {
  2351. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2352. VkDebugUtilsObjectNameInfoEXT local_name_info;
  2353. memcpy(&local_name_info, pNameInfo, sizeof(VkDebugUtilsObjectNameInfoEXT));
  2354. // If this is a physical device, we have to replace it with the proper one for the next call.
  2355. if (pNameInfo->objectType == VK_OBJECT_TYPE_PHYSICAL_DEVICE) {
  2356. struct loader_physical_device_tramp *phys_dev_tramp = (struct loader_physical_device_tramp *)(uintptr_t)pNameInfo->objectHandle;
  2357. local_name_info.objectHandle = (uint64_t)(uintptr_t)phys_dev_tramp->phys_dev;
  2358. }
  2359. if (disp->SetDebugUtilsObjectNameEXT != NULL) {
  2360. return disp->SetDebugUtilsObjectNameEXT(device, &local_name_info);
  2361. } else {
  2362. return VK_SUCCESS;
  2363. }
  2364. }
  2365. VKAPI_ATTR VkResult VKAPI_CALL terminator_SetDebugUtilsObjectNameEXT(
  2366. VkDevice device,
  2367. const VkDebugUtilsObjectNameInfoEXT* pNameInfo) {
  2368. uint32_t icd_index = 0;
  2369. struct loader_device *dev;
  2370. struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, &icd_index);
  2371. if (NULL != icd_term && NULL != icd_term->dispatch.SetDebugUtilsObjectNameEXT) {
  2372. VkDebugUtilsObjectNameInfoEXT local_name_info;
  2373. memcpy(&local_name_info, pNameInfo, sizeof(VkDebugUtilsObjectNameInfoEXT));
  2374. // If this is a physical device, we have to replace it with the proper one for the next call.
  2375. if (pNameInfo->objectType == VK_OBJECT_TYPE_PHYSICAL_DEVICE) {
  2376. struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)(uintptr_t)pNameInfo->objectHandle;
  2377. local_name_info.objectHandle = (uint64_t)(uintptr_t)phys_dev_term->phys_dev;
  2378. // If this is a KHR_surface, and the ICD has created its own, we have to replace it with the proper one for the next call.
  2379. } else if (pNameInfo->objectType == VK_OBJECT_TYPE_SURFACE_KHR) {
  2380. if (NULL != icd_term && NULL != icd_term->dispatch.CreateSwapchainKHR) {
  2381. VkIcdSurface *icd_surface = (VkIcdSurface *)(uintptr_t)pNameInfo->objectHandle;
  2382. if (NULL != icd_surface->real_icd_surfaces) {
  2383. local_name_info.objectHandle = (uint64_t)icd_surface->real_icd_surfaces[icd_index];
  2384. }
  2385. }
  2386. }
  2387. return icd_term->dispatch.SetDebugUtilsObjectNameEXT(device, &local_name_info);
  2388. } else {
  2389. return VK_SUCCESS;
  2390. }
  2391. }
  2392. VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectTagEXT(
  2393. VkDevice device,
  2394. const VkDebugUtilsObjectTagInfoEXT* pTagInfo) {
  2395. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2396. VkDebugUtilsObjectTagInfoEXT local_tag_info;
  2397. memcpy(&local_tag_info, pTagInfo, sizeof(VkDebugUtilsObjectTagInfoEXT));
  2398. // If this is a physical device, we have to replace it with the proper one for the next call.
  2399. if (pTagInfo->objectType == VK_OBJECT_TYPE_PHYSICAL_DEVICE) {
  2400. struct loader_physical_device_tramp *phys_dev_tramp = (struct loader_physical_device_tramp *)(uintptr_t)pTagInfo->objectHandle;
  2401. local_tag_info.objectHandle = (uint64_t)(uintptr_t)phys_dev_tramp->phys_dev;
  2402. }
  2403. if (disp->SetDebugUtilsObjectTagEXT != NULL) {
  2404. return disp->SetDebugUtilsObjectTagEXT(device, &local_tag_info);
  2405. } else {
  2406. return VK_SUCCESS;
  2407. }
  2408. }
  2409. VKAPI_ATTR VkResult VKAPI_CALL terminator_SetDebugUtilsObjectTagEXT(
  2410. VkDevice device,
  2411. const VkDebugUtilsObjectTagInfoEXT* pTagInfo) {
  2412. uint32_t icd_index = 0;
  2413. struct loader_device *dev;
  2414. struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, &icd_index);
  2415. if (NULL != icd_term && NULL != icd_term->dispatch.SetDebugUtilsObjectTagEXT) {
  2416. VkDebugUtilsObjectTagInfoEXT local_tag_info;
  2417. memcpy(&local_tag_info, pTagInfo, sizeof(VkDebugUtilsObjectTagInfoEXT));
  2418. // If this is a physical device, we have to replace it with the proper one for the next call.
  2419. if (pTagInfo->objectType == VK_OBJECT_TYPE_PHYSICAL_DEVICE) {
  2420. struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)(uintptr_t)pTagInfo->objectHandle;
  2421. local_tag_info.objectHandle = (uint64_t)(uintptr_t)phys_dev_term->phys_dev;
  2422. // If this is a KHR_surface, and the ICD has created its own, we have to replace it with the proper one for the next call.
  2423. } else if (pTagInfo->objectType == VK_OBJECT_TYPE_SURFACE_KHR) {
  2424. if (NULL != icd_term && NULL != icd_term->dispatch.CreateSwapchainKHR) {
  2425. VkIcdSurface *icd_surface = (VkIcdSurface *)(uintptr_t)pTagInfo->objectHandle;
  2426. if (NULL != icd_surface->real_icd_surfaces) {
  2427. local_tag_info.objectHandle = (uint64_t)icd_surface->real_icd_surfaces[icd_index];
  2428. }
  2429. }
  2430. }
  2431. return icd_term->dispatch.SetDebugUtilsObjectTagEXT(device, &local_tag_info);
  2432. } else {
  2433. return VK_SUCCESS;
  2434. }
  2435. }
  2436. VKAPI_ATTR void VKAPI_CALL QueueBeginDebugUtilsLabelEXT(
  2437. VkQueue queue,
  2438. const VkDebugUtilsLabelEXT* pLabelInfo) {
  2439. const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
  2440. if (disp->QueueBeginDebugUtilsLabelEXT != NULL) {
  2441. disp->QueueBeginDebugUtilsLabelEXT(queue, pLabelInfo);
  2442. }
  2443. }
  2444. VKAPI_ATTR void VKAPI_CALL terminator_QueueBeginDebugUtilsLabelEXT(
  2445. VkQueue queue,
  2446. const VkDebugUtilsLabelEXT* pLabelInfo) {
  2447. uint32_t icd_index = 0;
  2448. struct loader_device *dev;
  2449. struct loader_icd_term *icd_term = loader_get_icd_and_device(queue, &dev, &icd_index);
  2450. if (NULL != icd_term && NULL != icd_term->dispatch.QueueBeginDebugUtilsLabelEXT) {
  2451. icd_term->dispatch.QueueBeginDebugUtilsLabelEXT(queue, pLabelInfo);
  2452. }
  2453. }
  2454. VKAPI_ATTR void VKAPI_CALL QueueEndDebugUtilsLabelEXT(
  2455. VkQueue queue) {
  2456. const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
  2457. if (disp->QueueEndDebugUtilsLabelEXT != NULL) {
  2458. disp->QueueEndDebugUtilsLabelEXT(queue);
  2459. }
  2460. }
  2461. VKAPI_ATTR void VKAPI_CALL terminator_QueueEndDebugUtilsLabelEXT(
  2462. VkQueue queue) {
  2463. uint32_t icd_index = 0;
  2464. struct loader_device *dev;
  2465. struct loader_icd_term *icd_term = loader_get_icd_and_device(queue, &dev, &icd_index);
  2466. if (NULL != icd_term && NULL != icd_term->dispatch.QueueEndDebugUtilsLabelEXT) {
  2467. icd_term->dispatch.QueueEndDebugUtilsLabelEXT(queue);
  2468. }
  2469. }
  2470. VKAPI_ATTR void VKAPI_CALL QueueInsertDebugUtilsLabelEXT(
  2471. VkQueue queue,
  2472. const VkDebugUtilsLabelEXT* pLabelInfo) {
  2473. const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
  2474. if (disp->QueueInsertDebugUtilsLabelEXT != NULL) {
  2475. disp->QueueInsertDebugUtilsLabelEXT(queue, pLabelInfo);
  2476. }
  2477. }
  2478. VKAPI_ATTR void VKAPI_CALL terminator_QueueInsertDebugUtilsLabelEXT(
  2479. VkQueue queue,
  2480. const VkDebugUtilsLabelEXT* pLabelInfo) {
  2481. uint32_t icd_index = 0;
  2482. struct loader_device *dev;
  2483. struct loader_icd_term *icd_term = loader_get_icd_and_device(queue, &dev, &icd_index);
  2484. if (NULL != icd_term && NULL != icd_term->dispatch.QueueInsertDebugUtilsLabelEXT) {
  2485. icd_term->dispatch.QueueInsertDebugUtilsLabelEXT(queue, pLabelInfo);
  2486. }
  2487. }
  2488. VKAPI_ATTR void VKAPI_CALL CmdBeginDebugUtilsLabelEXT(
  2489. VkCommandBuffer commandBuffer,
  2490. const VkDebugUtilsLabelEXT* pLabelInfo) {
  2491. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2492. if (disp->CmdBeginDebugUtilsLabelEXT != NULL) {
  2493. disp->CmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo);
  2494. }
  2495. }
  2496. VKAPI_ATTR void VKAPI_CALL terminator_CmdBeginDebugUtilsLabelEXT(
  2497. VkCommandBuffer commandBuffer,
  2498. const VkDebugUtilsLabelEXT* pLabelInfo) {
  2499. uint32_t icd_index = 0;
  2500. struct loader_device *dev;
  2501. struct loader_icd_term *icd_term = loader_get_icd_and_device(commandBuffer, &dev, &icd_index);
  2502. if (NULL != icd_term && NULL != icd_term->dispatch.CmdBeginDebugUtilsLabelEXT) {
  2503. icd_term->dispatch.CmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo);
  2504. }
  2505. }
  2506. VKAPI_ATTR void VKAPI_CALL CmdEndDebugUtilsLabelEXT(
  2507. VkCommandBuffer commandBuffer) {
  2508. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2509. if (disp->CmdEndDebugUtilsLabelEXT != NULL) {
  2510. disp->CmdEndDebugUtilsLabelEXT(commandBuffer);
  2511. }
  2512. }
  2513. VKAPI_ATTR void VKAPI_CALL terminator_CmdEndDebugUtilsLabelEXT(
  2514. VkCommandBuffer commandBuffer) {
  2515. uint32_t icd_index = 0;
  2516. struct loader_device *dev;
  2517. struct loader_icd_term *icd_term = loader_get_icd_and_device(commandBuffer, &dev, &icd_index);
  2518. if (NULL != icd_term && NULL != icd_term->dispatch.CmdEndDebugUtilsLabelEXT) {
  2519. icd_term->dispatch.CmdEndDebugUtilsLabelEXT(commandBuffer);
  2520. }
  2521. }
  2522. VKAPI_ATTR void VKAPI_CALL CmdInsertDebugUtilsLabelEXT(
  2523. VkCommandBuffer commandBuffer,
  2524. const VkDebugUtilsLabelEXT* pLabelInfo) {
  2525. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2526. if (disp->CmdInsertDebugUtilsLabelEXT != NULL) {
  2527. disp->CmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo);
  2528. }
  2529. }
  2530. VKAPI_ATTR void VKAPI_CALL terminator_CmdInsertDebugUtilsLabelEXT(
  2531. VkCommandBuffer commandBuffer,
  2532. const VkDebugUtilsLabelEXT* pLabelInfo) {
  2533. uint32_t icd_index = 0;
  2534. struct loader_device *dev;
  2535. struct loader_icd_term *icd_term = loader_get_icd_and_device(commandBuffer, &dev, &icd_index);
  2536. if (NULL != icd_term && NULL != icd_term->dispatch.CmdInsertDebugUtilsLabelEXT) {
  2537. icd_term->dispatch.CmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo);
  2538. }
  2539. }
  2540. // ---- VK_ANDROID_external_memory_android_hardware_buffer extension trampoline/terminators
  2541. #ifdef VK_USE_PLATFORM_ANDROID_KHR
  2542. VKAPI_ATTR VkResult VKAPI_CALL GetAndroidHardwareBufferPropertiesANDROID(
  2543. VkDevice device,
  2544. const struct AHardwareBuffer* buffer,
  2545. VkAndroidHardwareBufferPropertiesANDROID* pProperties) {
  2546. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2547. return disp->GetAndroidHardwareBufferPropertiesANDROID(device, buffer, pProperties);
  2548. }
  2549. #endif // VK_USE_PLATFORM_ANDROID_KHR
  2550. #ifdef VK_USE_PLATFORM_ANDROID_KHR
  2551. VKAPI_ATTR VkResult VKAPI_CALL GetMemoryAndroidHardwareBufferANDROID(
  2552. VkDevice device,
  2553. const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
  2554. struct AHardwareBuffer** pBuffer) {
  2555. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2556. return disp->GetMemoryAndroidHardwareBufferANDROID(device, pInfo, pBuffer);
  2557. }
  2558. #endif // VK_USE_PLATFORM_ANDROID_KHR
  2559. // ---- VK_EXT_sample_locations extension trampoline/terminators
  2560. VKAPI_ATTR void VKAPI_CALL CmdSetSampleLocationsEXT(
  2561. VkCommandBuffer commandBuffer,
  2562. const VkSampleLocationsInfoEXT* pSampleLocationsInfo) {
  2563. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2564. disp->CmdSetSampleLocationsEXT(commandBuffer, pSampleLocationsInfo);
  2565. }
  2566. VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMultisamplePropertiesEXT(
  2567. VkPhysicalDevice physicalDevice,
  2568. VkSampleCountFlagBits samples,
  2569. VkMultisamplePropertiesEXT* pMultisampleProperties) {
  2570. const VkLayerInstanceDispatchTable *disp;
  2571. VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
  2572. disp = loader_get_instance_layer_dispatch(physicalDevice);
  2573. disp->GetPhysicalDeviceMultisamplePropertiesEXT(unwrapped_phys_dev, samples, pMultisampleProperties);
  2574. }
  2575. VKAPI_ATTR void VKAPI_CALL terminator_GetPhysicalDeviceMultisamplePropertiesEXT(
  2576. VkPhysicalDevice physicalDevice,
  2577. VkSampleCountFlagBits samples,
  2578. VkMultisamplePropertiesEXT* pMultisampleProperties) {
  2579. struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
  2580. struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
  2581. if (NULL == icd_term->dispatch.GetPhysicalDeviceMultisamplePropertiesEXT) {
  2582. loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
  2583. "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceMultisamplePropertiesEXT");
  2584. }
  2585. icd_term->dispatch.GetPhysicalDeviceMultisamplePropertiesEXT(phys_dev_term->phys_dev, samples, pMultisampleProperties);
  2586. }
  2587. // ---- VK_EXT_image_drm_format_modifier extension trampoline/terminators
  2588. VKAPI_ATTR VkResult VKAPI_CALL GetImageDrmFormatModifierPropertiesEXT(
  2589. VkDevice device,
  2590. VkImage image,
  2591. VkImageDrmFormatModifierPropertiesEXT* pProperties) {
  2592. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2593. return disp->GetImageDrmFormatModifierPropertiesEXT(device, image, pProperties);
  2594. }
  2595. // ---- VK_EXT_validation_cache extension trampoline/terminators
  2596. VKAPI_ATTR VkResult VKAPI_CALL CreateValidationCacheEXT(
  2597. VkDevice device,
  2598. const VkValidationCacheCreateInfoEXT* pCreateInfo,
  2599. const VkAllocationCallbacks* pAllocator,
  2600. VkValidationCacheEXT* pValidationCache) {
  2601. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2602. return disp->CreateValidationCacheEXT(device, pCreateInfo, pAllocator, pValidationCache);
  2603. }
  2604. VKAPI_ATTR void VKAPI_CALL DestroyValidationCacheEXT(
  2605. VkDevice device,
  2606. VkValidationCacheEXT validationCache,
  2607. const VkAllocationCallbacks* pAllocator) {
  2608. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2609. disp->DestroyValidationCacheEXT(device, validationCache, pAllocator);
  2610. }
  2611. VKAPI_ATTR VkResult VKAPI_CALL MergeValidationCachesEXT(
  2612. VkDevice device,
  2613. VkValidationCacheEXT dstCache,
  2614. uint32_t srcCacheCount,
  2615. const VkValidationCacheEXT* pSrcCaches) {
  2616. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2617. return disp->MergeValidationCachesEXT(device, dstCache, srcCacheCount, pSrcCaches);
  2618. }
  2619. VKAPI_ATTR VkResult VKAPI_CALL GetValidationCacheDataEXT(
  2620. VkDevice device,
  2621. VkValidationCacheEXT validationCache,
  2622. size_t* pDataSize,
  2623. void* pData) {
  2624. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2625. return disp->GetValidationCacheDataEXT(device, validationCache, pDataSize, pData);
  2626. }
  2627. // ---- VK_NV_shading_rate_image extension trampoline/terminators
  2628. VKAPI_ATTR void VKAPI_CALL CmdBindShadingRateImageNV(
  2629. VkCommandBuffer commandBuffer,
  2630. VkImageView imageView,
  2631. VkImageLayout imageLayout) {
  2632. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2633. disp->CmdBindShadingRateImageNV(commandBuffer, imageView, imageLayout);
  2634. }
  2635. VKAPI_ATTR void VKAPI_CALL CmdSetViewportShadingRatePaletteNV(
  2636. VkCommandBuffer commandBuffer,
  2637. uint32_t firstViewport,
  2638. uint32_t viewportCount,
  2639. const VkShadingRatePaletteNV* pShadingRatePalettes) {
  2640. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2641. disp->CmdSetViewportShadingRatePaletteNV(commandBuffer, firstViewport, viewportCount, pShadingRatePalettes);
  2642. }
  2643. VKAPI_ATTR void VKAPI_CALL CmdSetCoarseSampleOrderNV(
  2644. VkCommandBuffer commandBuffer,
  2645. VkCoarseSampleOrderTypeNV sampleOrderType,
  2646. uint32_t customSampleOrderCount,
  2647. const VkCoarseSampleOrderCustomNV* pCustomSampleOrders) {
  2648. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2649. disp->CmdSetCoarseSampleOrderNV(commandBuffer, sampleOrderType, customSampleOrderCount, pCustomSampleOrders);
  2650. }
  2651. // ---- VK_NV_ray_tracing extension trampoline/terminators
  2652. VKAPI_ATTR VkResult VKAPI_CALL CreateAccelerationStructureNV(
  2653. VkDevice device,
  2654. const VkAccelerationStructureCreateInfoNV* pCreateInfo,
  2655. const VkAllocationCallbacks* pAllocator,
  2656. VkAccelerationStructureNV* pAccelerationStructure) {
  2657. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2658. return disp->CreateAccelerationStructureNV(device, pCreateInfo, pAllocator, pAccelerationStructure);
  2659. }
  2660. VKAPI_ATTR void VKAPI_CALL DestroyAccelerationStructureNV(
  2661. VkDevice device,
  2662. VkAccelerationStructureNV accelerationStructure,
  2663. const VkAllocationCallbacks* pAllocator) {
  2664. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2665. disp->DestroyAccelerationStructureNV(device, accelerationStructure, pAllocator);
  2666. }
  2667. VKAPI_ATTR void VKAPI_CALL GetAccelerationStructureMemoryRequirementsNV(
  2668. VkDevice device,
  2669. const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo,
  2670. VkMemoryRequirements2KHR* pMemoryRequirements) {
  2671. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2672. disp->GetAccelerationStructureMemoryRequirementsNV(device, pInfo, pMemoryRequirements);
  2673. }
  2674. VKAPI_ATTR VkResult VKAPI_CALL BindAccelerationStructureMemoryNV(
  2675. VkDevice device,
  2676. uint32_t bindInfoCount,
  2677. const VkBindAccelerationStructureMemoryInfoNV* pBindInfos) {
  2678. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2679. return disp->BindAccelerationStructureMemoryNV(device, bindInfoCount, pBindInfos);
  2680. }
  2681. VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructureNV(
  2682. VkCommandBuffer commandBuffer,
  2683. const VkAccelerationStructureInfoNV* pInfo,
  2684. VkBuffer instanceData,
  2685. VkDeviceSize instanceOffset,
  2686. VkBool32 update,
  2687. VkAccelerationStructureNV dst,
  2688. VkAccelerationStructureNV src,
  2689. VkBuffer scratch,
  2690. VkDeviceSize scratchOffset) {
  2691. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2692. disp->CmdBuildAccelerationStructureNV(commandBuffer, pInfo, instanceData, instanceOffset, update, dst, src, scratch, scratchOffset);
  2693. }
  2694. VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureNV(
  2695. VkCommandBuffer commandBuffer,
  2696. VkAccelerationStructureNV dst,
  2697. VkAccelerationStructureNV src,
  2698. VkCopyAccelerationStructureModeKHR mode) {
  2699. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2700. disp->CmdCopyAccelerationStructureNV(commandBuffer, dst, src, mode);
  2701. }
  2702. VKAPI_ATTR void VKAPI_CALL CmdTraceRaysNV(
  2703. VkCommandBuffer commandBuffer,
  2704. VkBuffer raygenShaderBindingTableBuffer,
  2705. VkDeviceSize raygenShaderBindingOffset,
  2706. VkBuffer missShaderBindingTableBuffer,
  2707. VkDeviceSize missShaderBindingOffset,
  2708. VkDeviceSize missShaderBindingStride,
  2709. VkBuffer hitShaderBindingTableBuffer,
  2710. VkDeviceSize hitShaderBindingOffset,
  2711. VkDeviceSize hitShaderBindingStride,
  2712. VkBuffer callableShaderBindingTableBuffer,
  2713. VkDeviceSize callableShaderBindingOffset,
  2714. VkDeviceSize callableShaderBindingStride,
  2715. uint32_t width,
  2716. uint32_t height,
  2717. uint32_t depth) {
  2718. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2719. disp->CmdTraceRaysNV(commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, missShaderBindingTableBuffer, missShaderBindingOffset, missShaderBindingStride, hitShaderBindingTableBuffer, hitShaderBindingOffset, hitShaderBindingStride, callableShaderBindingTableBuffer, callableShaderBindingOffset, callableShaderBindingStride, width, height, depth);
  2720. }
  2721. VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesNV(
  2722. VkDevice device,
  2723. VkPipelineCache pipelineCache,
  2724. uint32_t createInfoCount,
  2725. const VkRayTracingPipelineCreateInfoNV* pCreateInfos,
  2726. const VkAllocationCallbacks* pAllocator,
  2727. VkPipeline* pPipelines) {
  2728. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2729. return disp->CreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines);
  2730. }
  2731. VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingShaderGroupHandlesKHR(
  2732. VkDevice device,
  2733. VkPipeline pipeline,
  2734. uint32_t firstGroup,
  2735. uint32_t groupCount,
  2736. size_t dataSize,
  2737. void* pData) {
  2738. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2739. return disp->GetRayTracingShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, pData);
  2740. }
  2741. VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingShaderGroupHandlesNV(
  2742. VkDevice device,
  2743. VkPipeline pipeline,
  2744. uint32_t firstGroup,
  2745. uint32_t groupCount,
  2746. size_t dataSize,
  2747. void* pData) {
  2748. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2749. return disp->GetRayTracingShaderGroupHandlesNV(device, pipeline, firstGroup, groupCount, dataSize, pData);
  2750. }
  2751. VKAPI_ATTR VkResult VKAPI_CALL GetAccelerationStructureHandleNV(
  2752. VkDevice device,
  2753. VkAccelerationStructureNV accelerationStructure,
  2754. size_t dataSize,
  2755. void* pData) {
  2756. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2757. return disp->GetAccelerationStructureHandleNV(device, accelerationStructure, dataSize, pData);
  2758. }
  2759. VKAPI_ATTR void VKAPI_CALL CmdWriteAccelerationStructuresPropertiesNV(
  2760. VkCommandBuffer commandBuffer,
  2761. uint32_t accelerationStructureCount,
  2762. const VkAccelerationStructureNV* pAccelerationStructures,
  2763. VkQueryType queryType,
  2764. VkQueryPool queryPool,
  2765. uint32_t firstQuery) {
  2766. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2767. disp->CmdWriteAccelerationStructuresPropertiesNV(commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery);
  2768. }
  2769. VKAPI_ATTR VkResult VKAPI_CALL CompileDeferredNV(
  2770. VkDevice device,
  2771. VkPipeline pipeline,
  2772. uint32_t shader) {
  2773. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2774. return disp->CompileDeferredNV(device, pipeline, shader);
  2775. }
  2776. // ---- VK_EXT_external_memory_host extension trampoline/terminators
  2777. VKAPI_ATTR VkResult VKAPI_CALL GetMemoryHostPointerPropertiesEXT(
  2778. VkDevice device,
  2779. VkExternalMemoryHandleTypeFlagBits handleType,
  2780. const void* pHostPointer,
  2781. VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) {
  2782. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2783. return disp->GetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, pMemoryHostPointerProperties);
  2784. }
  2785. // ---- VK_AMD_buffer_marker extension trampoline/terminators
  2786. VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarkerAMD(
  2787. VkCommandBuffer commandBuffer,
  2788. VkPipelineStageFlagBits pipelineStage,
  2789. VkBuffer dstBuffer,
  2790. VkDeviceSize dstOffset,
  2791. uint32_t marker) {
  2792. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2793. disp->CmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker);
  2794. }
  2795. // ---- VK_EXT_calibrated_timestamps extension trampoline/terminators
  2796. VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCalibrateableTimeDomainsEXT(
  2797. VkPhysicalDevice physicalDevice,
  2798. uint32_t* pTimeDomainCount,
  2799. VkTimeDomainEXT* pTimeDomains) {
  2800. const VkLayerInstanceDispatchTable *disp;
  2801. VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
  2802. disp = loader_get_instance_layer_dispatch(physicalDevice);
  2803. return disp->GetPhysicalDeviceCalibrateableTimeDomainsEXT(unwrapped_phys_dev, pTimeDomainCount, pTimeDomains);
  2804. }
  2805. VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceCalibrateableTimeDomainsEXT(
  2806. VkPhysicalDevice physicalDevice,
  2807. uint32_t* pTimeDomainCount,
  2808. VkTimeDomainEXT* pTimeDomains) {
  2809. struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
  2810. struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
  2811. if (NULL == icd_term->dispatch.GetPhysicalDeviceCalibrateableTimeDomainsEXT) {
  2812. loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
  2813. "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceCalibrateableTimeDomainsEXT");
  2814. }
  2815. return icd_term->dispatch.GetPhysicalDeviceCalibrateableTimeDomainsEXT(phys_dev_term->phys_dev, pTimeDomainCount, pTimeDomains);
  2816. }
  2817. VKAPI_ATTR VkResult VKAPI_CALL GetCalibratedTimestampsEXT(
  2818. VkDevice device,
  2819. uint32_t timestampCount,
  2820. const VkCalibratedTimestampInfoEXT* pTimestampInfos,
  2821. uint64_t* pTimestamps,
  2822. uint64_t* pMaxDeviation) {
  2823. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2824. return disp->GetCalibratedTimestampsEXT(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation);
  2825. }
  2826. // ---- VK_NV_mesh_shader extension trampoline/terminators
  2827. VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksNV(
  2828. VkCommandBuffer commandBuffer,
  2829. uint32_t taskCount,
  2830. uint32_t firstTask) {
  2831. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2832. disp->CmdDrawMeshTasksNV(commandBuffer, taskCount, firstTask);
  2833. }
  2834. VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectNV(
  2835. VkCommandBuffer commandBuffer,
  2836. VkBuffer buffer,
  2837. VkDeviceSize offset,
  2838. uint32_t drawCount,
  2839. uint32_t stride) {
  2840. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2841. disp->CmdDrawMeshTasksIndirectNV(commandBuffer, buffer, offset, drawCount, stride);
  2842. }
  2843. VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectCountNV(
  2844. VkCommandBuffer commandBuffer,
  2845. VkBuffer buffer,
  2846. VkDeviceSize offset,
  2847. VkBuffer countBuffer,
  2848. VkDeviceSize countBufferOffset,
  2849. uint32_t maxDrawCount,
  2850. uint32_t stride) {
  2851. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2852. disp->CmdDrawMeshTasksIndirectCountNV(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
  2853. }
  2854. // ---- VK_NV_scissor_exclusive extension trampoline/terminators
  2855. VKAPI_ATTR void VKAPI_CALL CmdSetExclusiveScissorNV(
  2856. VkCommandBuffer commandBuffer,
  2857. uint32_t firstExclusiveScissor,
  2858. uint32_t exclusiveScissorCount,
  2859. const VkRect2D* pExclusiveScissors) {
  2860. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2861. disp->CmdSetExclusiveScissorNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissors);
  2862. }
  2863. // ---- VK_NV_device_diagnostic_checkpoints extension trampoline/terminators
  2864. VKAPI_ATTR void VKAPI_CALL CmdSetCheckpointNV(
  2865. VkCommandBuffer commandBuffer,
  2866. const void* pCheckpointMarker) {
  2867. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2868. disp->CmdSetCheckpointNV(commandBuffer, pCheckpointMarker);
  2869. }
  2870. VKAPI_ATTR void VKAPI_CALL GetQueueCheckpointDataNV(
  2871. VkQueue queue,
  2872. uint32_t* pCheckpointDataCount,
  2873. VkCheckpointDataNV* pCheckpointData) {
  2874. const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
  2875. disp->GetQueueCheckpointDataNV(queue, pCheckpointDataCount, pCheckpointData);
  2876. }
  2877. // ---- VK_INTEL_performance_query extension trampoline/terminators
  2878. VKAPI_ATTR VkResult VKAPI_CALL InitializePerformanceApiINTEL(
  2879. VkDevice device,
  2880. const VkInitializePerformanceApiInfoINTEL* pInitializeInfo) {
  2881. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2882. return disp->InitializePerformanceApiINTEL(device, pInitializeInfo);
  2883. }
  2884. VKAPI_ATTR void VKAPI_CALL UninitializePerformanceApiINTEL(
  2885. VkDevice device) {
  2886. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2887. disp->UninitializePerformanceApiINTEL(device);
  2888. }
  2889. VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceMarkerINTEL(
  2890. VkCommandBuffer commandBuffer,
  2891. const VkPerformanceMarkerInfoINTEL* pMarkerInfo) {
  2892. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2893. return disp->CmdSetPerformanceMarkerINTEL(commandBuffer, pMarkerInfo);
  2894. }
  2895. VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceStreamMarkerINTEL(
  2896. VkCommandBuffer commandBuffer,
  2897. const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo) {
  2898. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2899. return disp->CmdSetPerformanceStreamMarkerINTEL(commandBuffer, pMarkerInfo);
  2900. }
  2901. VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceOverrideINTEL(
  2902. VkCommandBuffer commandBuffer,
  2903. const VkPerformanceOverrideInfoINTEL* pOverrideInfo) {
  2904. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  2905. return disp->CmdSetPerformanceOverrideINTEL(commandBuffer, pOverrideInfo);
  2906. }
  2907. VKAPI_ATTR VkResult VKAPI_CALL AcquirePerformanceConfigurationINTEL(
  2908. VkDevice device,
  2909. const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo,
  2910. VkPerformanceConfigurationINTEL* pConfiguration) {
  2911. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2912. return disp->AcquirePerformanceConfigurationINTEL(device, pAcquireInfo, pConfiguration);
  2913. }
  2914. VKAPI_ATTR VkResult VKAPI_CALL ReleasePerformanceConfigurationINTEL(
  2915. VkDevice device,
  2916. VkPerformanceConfigurationINTEL configuration) {
  2917. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2918. return disp->ReleasePerformanceConfigurationINTEL(device, configuration);
  2919. }
  2920. VKAPI_ATTR VkResult VKAPI_CALL QueueSetPerformanceConfigurationINTEL(
  2921. VkQueue queue,
  2922. VkPerformanceConfigurationINTEL configuration) {
  2923. const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
  2924. return disp->QueueSetPerformanceConfigurationINTEL(queue, configuration);
  2925. }
  2926. VKAPI_ATTR VkResult VKAPI_CALL GetPerformanceParameterINTEL(
  2927. VkDevice device,
  2928. VkPerformanceParameterTypeINTEL parameter,
  2929. VkPerformanceValueINTEL* pValue) {
  2930. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2931. return disp->GetPerformanceParameterINTEL(device, parameter, pValue);
  2932. }
  2933. // ---- VK_AMD_display_native_hdr extension trampoline/terminators
  2934. VKAPI_ATTR void VKAPI_CALL SetLocalDimmingAMD(
  2935. VkDevice device,
  2936. VkSwapchainKHR swapChain,
  2937. VkBool32 localDimmingEnable) {
  2938. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2939. disp->SetLocalDimmingAMD(device, swapChain, localDimmingEnable);
  2940. }
  2941. // ---- VK_EXT_buffer_device_address extension trampoline/terminators
  2942. VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddressEXT(
  2943. VkDevice device,
  2944. const VkBufferDeviceAddressInfo* pInfo) {
  2945. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2946. return disp->GetBufferDeviceAddressEXT(device, pInfo);
  2947. }
  2948. // ---- VK_NV_cooperative_matrix extension trampoline/terminators
  2949. VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixPropertiesNV(
  2950. VkPhysicalDevice physicalDevice,
  2951. uint32_t* pPropertyCount,
  2952. VkCooperativeMatrixPropertiesNV* pProperties) {
  2953. const VkLayerInstanceDispatchTable *disp;
  2954. VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
  2955. disp = loader_get_instance_layer_dispatch(physicalDevice);
  2956. return disp->GetPhysicalDeviceCooperativeMatrixPropertiesNV(unwrapped_phys_dev, pPropertyCount, pProperties);
  2957. }
  2958. VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceCooperativeMatrixPropertiesNV(
  2959. VkPhysicalDevice physicalDevice,
  2960. uint32_t* pPropertyCount,
  2961. VkCooperativeMatrixPropertiesNV* pProperties) {
  2962. struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
  2963. struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
  2964. if (NULL == icd_term->dispatch.GetPhysicalDeviceCooperativeMatrixPropertiesNV) {
  2965. loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
  2966. "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceCooperativeMatrixPropertiesNV");
  2967. }
  2968. return icd_term->dispatch.GetPhysicalDeviceCooperativeMatrixPropertiesNV(phys_dev_term->phys_dev, pPropertyCount, pProperties);
  2969. }
  2970. // ---- VK_NV_coverage_reduction_mode extension trampoline/terminators
  2971. VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(
  2972. VkPhysicalDevice physicalDevice,
  2973. uint32_t* pCombinationCount,
  2974. VkFramebufferMixedSamplesCombinationNV* pCombinations) {
  2975. const VkLayerInstanceDispatchTable *disp;
  2976. VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
  2977. disp = loader_get_instance_layer_dispatch(physicalDevice);
  2978. return disp->GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(unwrapped_phys_dev, pCombinationCount, pCombinations);
  2979. }
  2980. VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(
  2981. VkPhysicalDevice physicalDevice,
  2982. uint32_t* pCombinationCount,
  2983. VkFramebufferMixedSamplesCombinationNV* pCombinations) {
  2984. struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
  2985. struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
  2986. if (NULL == icd_term->dispatch.GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV) {
  2987. loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
  2988. "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV");
  2989. }
  2990. return icd_term->dispatch.GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(phys_dev_term->phys_dev, pCombinationCount, pCombinations);
  2991. }
  2992. // ---- VK_EXT_full_screen_exclusive extension trampoline/terminators
  2993. #ifdef VK_USE_PLATFORM_WIN32_KHR
  2994. VKAPI_ATTR VkResult VKAPI_CALL AcquireFullScreenExclusiveModeEXT(
  2995. VkDevice device,
  2996. VkSwapchainKHR swapchain) {
  2997. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  2998. return disp->AcquireFullScreenExclusiveModeEXT(device, swapchain);
  2999. }
  3000. #endif // VK_USE_PLATFORM_WIN32_KHR
  3001. #ifdef VK_USE_PLATFORM_WIN32_KHR
  3002. VKAPI_ATTR VkResult VKAPI_CALL ReleaseFullScreenExclusiveModeEXT(
  3003. VkDevice device,
  3004. VkSwapchainKHR swapchain) {
  3005. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3006. return disp->ReleaseFullScreenExclusiveModeEXT(device, swapchain);
  3007. }
  3008. #endif // VK_USE_PLATFORM_WIN32_KHR
  3009. // ---- VK_EXT_line_rasterization extension trampoline/terminators
  3010. VKAPI_ATTR void VKAPI_CALL CmdSetLineStippleEXT(
  3011. VkCommandBuffer commandBuffer,
  3012. uint32_t lineStippleFactor,
  3013. uint16_t lineStipplePattern) {
  3014. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3015. disp->CmdSetLineStippleEXT(commandBuffer, lineStippleFactor, lineStipplePattern);
  3016. }
  3017. // ---- VK_EXT_host_query_reset extension trampoline/terminators
  3018. VKAPI_ATTR void VKAPI_CALL ResetQueryPoolEXT(
  3019. VkDevice device,
  3020. VkQueryPool queryPool,
  3021. uint32_t firstQuery,
  3022. uint32_t queryCount) {
  3023. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3024. disp->ResetQueryPoolEXT(device, queryPool, firstQuery, queryCount);
  3025. }
  3026. // ---- VK_EXT_extended_dynamic_state extension trampoline/terminators
  3027. VKAPI_ATTR void VKAPI_CALL CmdSetCullModeEXT(
  3028. VkCommandBuffer commandBuffer,
  3029. VkCullModeFlags cullMode) {
  3030. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3031. disp->CmdSetCullModeEXT(commandBuffer, cullMode);
  3032. }
  3033. VKAPI_ATTR void VKAPI_CALL CmdSetFrontFaceEXT(
  3034. VkCommandBuffer commandBuffer,
  3035. VkFrontFace frontFace) {
  3036. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3037. disp->CmdSetFrontFaceEXT(commandBuffer, frontFace);
  3038. }
  3039. VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveTopologyEXT(
  3040. VkCommandBuffer commandBuffer,
  3041. VkPrimitiveTopology primitiveTopology) {
  3042. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3043. disp->CmdSetPrimitiveTopologyEXT(commandBuffer, primitiveTopology);
  3044. }
  3045. VKAPI_ATTR void VKAPI_CALL CmdSetViewportWithCountEXT(
  3046. VkCommandBuffer commandBuffer,
  3047. uint32_t viewportCount,
  3048. const VkViewport* pViewports) {
  3049. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3050. disp->CmdSetViewportWithCountEXT(commandBuffer, viewportCount, pViewports);
  3051. }
  3052. VKAPI_ATTR void VKAPI_CALL CmdSetScissorWithCountEXT(
  3053. VkCommandBuffer commandBuffer,
  3054. uint32_t scissorCount,
  3055. const VkRect2D* pScissors) {
  3056. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3057. disp->CmdSetScissorWithCountEXT(commandBuffer, scissorCount, pScissors);
  3058. }
  3059. VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers2EXT(
  3060. VkCommandBuffer commandBuffer,
  3061. uint32_t firstBinding,
  3062. uint32_t bindingCount,
  3063. const VkBuffer* pBuffers,
  3064. const VkDeviceSize* pOffsets,
  3065. const VkDeviceSize* pSizes,
  3066. const VkDeviceSize* pStrides) {
  3067. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3068. disp->CmdBindVertexBuffers2EXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides);
  3069. }
  3070. VKAPI_ATTR void VKAPI_CALL CmdSetDepthTestEnableEXT(
  3071. VkCommandBuffer commandBuffer,
  3072. VkBool32 depthTestEnable) {
  3073. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3074. disp->CmdSetDepthTestEnableEXT(commandBuffer, depthTestEnable);
  3075. }
  3076. VKAPI_ATTR void VKAPI_CALL CmdSetDepthWriteEnableEXT(
  3077. VkCommandBuffer commandBuffer,
  3078. VkBool32 depthWriteEnable) {
  3079. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3080. disp->CmdSetDepthWriteEnableEXT(commandBuffer, depthWriteEnable);
  3081. }
  3082. VKAPI_ATTR void VKAPI_CALL CmdSetDepthCompareOpEXT(
  3083. VkCommandBuffer commandBuffer,
  3084. VkCompareOp depthCompareOp) {
  3085. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3086. disp->CmdSetDepthCompareOpEXT(commandBuffer, depthCompareOp);
  3087. }
  3088. VKAPI_ATTR void VKAPI_CALL CmdSetDepthBoundsTestEnableEXT(
  3089. VkCommandBuffer commandBuffer,
  3090. VkBool32 depthBoundsTestEnable) {
  3091. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3092. disp->CmdSetDepthBoundsTestEnableEXT(commandBuffer, depthBoundsTestEnable);
  3093. }
  3094. VKAPI_ATTR void VKAPI_CALL CmdSetStencilTestEnableEXT(
  3095. VkCommandBuffer commandBuffer,
  3096. VkBool32 stencilTestEnable) {
  3097. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3098. disp->CmdSetStencilTestEnableEXT(commandBuffer, stencilTestEnable);
  3099. }
  3100. VKAPI_ATTR void VKAPI_CALL CmdSetStencilOpEXT(
  3101. VkCommandBuffer commandBuffer,
  3102. VkStencilFaceFlags faceMask,
  3103. VkStencilOp failOp,
  3104. VkStencilOp passOp,
  3105. VkStencilOp depthFailOp,
  3106. VkCompareOp compareOp) {
  3107. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3108. disp->CmdSetStencilOpEXT(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp);
  3109. }
  3110. // ---- VK_NV_device_generated_commands extension trampoline/terminators
  3111. VKAPI_ATTR void VKAPI_CALL GetGeneratedCommandsMemoryRequirementsNV(
  3112. VkDevice device,
  3113. const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo,
  3114. VkMemoryRequirements2* pMemoryRequirements) {
  3115. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3116. disp->GetGeneratedCommandsMemoryRequirementsNV(device, pInfo, pMemoryRequirements);
  3117. }
  3118. VKAPI_ATTR void VKAPI_CALL CmdPreprocessGeneratedCommandsNV(
  3119. VkCommandBuffer commandBuffer,
  3120. const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) {
  3121. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3122. disp->CmdPreprocessGeneratedCommandsNV(commandBuffer, pGeneratedCommandsInfo);
  3123. }
  3124. VKAPI_ATTR void VKAPI_CALL CmdExecuteGeneratedCommandsNV(
  3125. VkCommandBuffer commandBuffer,
  3126. VkBool32 isPreprocessed,
  3127. const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) {
  3128. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3129. disp->CmdExecuteGeneratedCommandsNV(commandBuffer, isPreprocessed, pGeneratedCommandsInfo);
  3130. }
  3131. VKAPI_ATTR void VKAPI_CALL CmdBindPipelineShaderGroupNV(
  3132. VkCommandBuffer commandBuffer,
  3133. VkPipelineBindPoint pipelineBindPoint,
  3134. VkPipeline pipeline,
  3135. uint32_t groupIndex) {
  3136. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3137. disp->CmdBindPipelineShaderGroupNV(commandBuffer, pipelineBindPoint, pipeline, groupIndex);
  3138. }
  3139. VKAPI_ATTR VkResult VKAPI_CALL CreateIndirectCommandsLayoutNV(
  3140. VkDevice device,
  3141. const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo,
  3142. const VkAllocationCallbacks* pAllocator,
  3143. VkIndirectCommandsLayoutNV* pIndirectCommandsLayout) {
  3144. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3145. return disp->CreateIndirectCommandsLayoutNV(device, pCreateInfo, pAllocator, pIndirectCommandsLayout);
  3146. }
  3147. VKAPI_ATTR void VKAPI_CALL DestroyIndirectCommandsLayoutNV(
  3148. VkDevice device,
  3149. VkIndirectCommandsLayoutNV indirectCommandsLayout,
  3150. const VkAllocationCallbacks* pAllocator) {
  3151. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3152. disp->DestroyIndirectCommandsLayoutNV(device, indirectCommandsLayout, pAllocator);
  3153. }
  3154. // ---- VK_EXT_private_data extension trampoline/terminators
  3155. VKAPI_ATTR VkResult VKAPI_CALL CreatePrivateDataSlotEXT(
  3156. VkDevice device,
  3157. const VkPrivateDataSlotCreateInfoEXT* pCreateInfo,
  3158. const VkAllocationCallbacks* pAllocator,
  3159. VkPrivateDataSlotEXT* pPrivateDataSlot) {
  3160. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3161. return disp->CreatePrivateDataSlotEXT(device, pCreateInfo, pAllocator, pPrivateDataSlot);
  3162. }
  3163. VKAPI_ATTR void VKAPI_CALL DestroyPrivateDataSlotEXT(
  3164. VkDevice device,
  3165. VkPrivateDataSlotEXT privateDataSlot,
  3166. const VkAllocationCallbacks* pAllocator) {
  3167. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3168. disp->DestroyPrivateDataSlotEXT(device, privateDataSlot, pAllocator);
  3169. }
  3170. VKAPI_ATTR VkResult VKAPI_CALL SetPrivateDataEXT(
  3171. VkDevice device,
  3172. VkObjectType objectType,
  3173. uint64_t objectHandle,
  3174. VkPrivateDataSlotEXT privateDataSlot,
  3175. uint64_t data) {
  3176. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3177. return disp->SetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, data);
  3178. }
  3179. VKAPI_ATTR void VKAPI_CALL GetPrivateDataEXT(
  3180. VkDevice device,
  3181. VkObjectType objectType,
  3182. uint64_t objectHandle,
  3183. VkPrivateDataSlotEXT privateDataSlot,
  3184. uint64_t* pData) {
  3185. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3186. disp->GetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, pData);
  3187. }
  3188. // ---- VK_NV_fragment_shading_rate_enums extension trampoline/terminators
  3189. VKAPI_ATTR void VKAPI_CALL CmdSetFragmentShadingRateEnumNV(
  3190. VkCommandBuffer commandBuffer,
  3191. VkFragmentShadingRateNV shadingRate,
  3192. const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) {
  3193. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3194. disp->CmdSetFragmentShadingRateEnumNV(commandBuffer, shadingRate, combinerOps);
  3195. }
  3196. // ---- VK_KHR_acceleration_structure extension trampoline/terminators
  3197. VKAPI_ATTR VkResult VKAPI_CALL CreateAccelerationStructureKHR(
  3198. VkDevice device,
  3199. const VkAccelerationStructureCreateInfoKHR* pCreateInfo,
  3200. const VkAllocationCallbacks* pAllocator,
  3201. VkAccelerationStructureKHR* pAccelerationStructure) {
  3202. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3203. return disp->CreateAccelerationStructureKHR(device, pCreateInfo, pAllocator, pAccelerationStructure);
  3204. }
  3205. VKAPI_ATTR void VKAPI_CALL DestroyAccelerationStructureKHR(
  3206. VkDevice device,
  3207. VkAccelerationStructureKHR accelerationStructure,
  3208. const VkAllocationCallbacks* pAllocator) {
  3209. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3210. disp->DestroyAccelerationStructureKHR(device, accelerationStructure, pAllocator);
  3211. }
  3212. VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructuresKHR(
  3213. VkCommandBuffer commandBuffer,
  3214. uint32_t infoCount,
  3215. const VkAccelerationStructureBuildGeometryInfoKHR* pInfos,
  3216. const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) {
  3217. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3218. disp->CmdBuildAccelerationStructuresKHR(commandBuffer, infoCount, pInfos, ppBuildRangeInfos);
  3219. }
  3220. VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructuresIndirectKHR(
  3221. VkCommandBuffer commandBuffer,
  3222. uint32_t infoCount,
  3223. const VkAccelerationStructureBuildGeometryInfoKHR* pInfos,
  3224. const VkDeviceAddress* pIndirectDeviceAddresses,
  3225. const uint32_t* pIndirectStrides,
  3226. const uint32_t* const* ppMaxPrimitiveCounts) {
  3227. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3228. disp->CmdBuildAccelerationStructuresIndirectKHR(commandBuffer, infoCount, pInfos, pIndirectDeviceAddresses, pIndirectStrides, ppMaxPrimitiveCounts);
  3229. }
  3230. VKAPI_ATTR VkResult VKAPI_CALL BuildAccelerationStructuresKHR(
  3231. VkDevice device,
  3232. VkDeferredOperationKHR deferredOperation,
  3233. uint32_t infoCount,
  3234. const VkAccelerationStructureBuildGeometryInfoKHR* pInfos,
  3235. const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) {
  3236. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3237. return disp->BuildAccelerationStructuresKHR(device, deferredOperation, infoCount, pInfos, ppBuildRangeInfos);
  3238. }
  3239. VKAPI_ATTR VkResult VKAPI_CALL CopyAccelerationStructureKHR(
  3240. VkDevice device,
  3241. VkDeferredOperationKHR deferredOperation,
  3242. const VkCopyAccelerationStructureInfoKHR* pInfo) {
  3243. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3244. return disp->CopyAccelerationStructureKHR(device, deferredOperation, pInfo);
  3245. }
  3246. VKAPI_ATTR VkResult VKAPI_CALL CopyAccelerationStructureToMemoryKHR(
  3247. VkDevice device,
  3248. VkDeferredOperationKHR deferredOperation,
  3249. const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) {
  3250. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3251. return disp->CopyAccelerationStructureToMemoryKHR(device, deferredOperation, pInfo);
  3252. }
  3253. VKAPI_ATTR VkResult VKAPI_CALL CopyMemoryToAccelerationStructureKHR(
  3254. VkDevice device,
  3255. VkDeferredOperationKHR deferredOperation,
  3256. const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) {
  3257. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3258. return disp->CopyMemoryToAccelerationStructureKHR(device, deferredOperation, pInfo);
  3259. }
  3260. VKAPI_ATTR VkResult VKAPI_CALL WriteAccelerationStructuresPropertiesKHR(
  3261. VkDevice device,
  3262. uint32_t accelerationStructureCount,
  3263. const VkAccelerationStructureKHR* pAccelerationStructures,
  3264. VkQueryType queryType,
  3265. size_t dataSize,
  3266. void* pData,
  3267. size_t stride) {
  3268. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3269. return disp->WriteAccelerationStructuresPropertiesKHR(device, accelerationStructureCount, pAccelerationStructures, queryType, dataSize, pData, stride);
  3270. }
  3271. VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureKHR(
  3272. VkCommandBuffer commandBuffer,
  3273. const VkCopyAccelerationStructureInfoKHR* pInfo) {
  3274. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3275. disp->CmdCopyAccelerationStructureKHR(commandBuffer, pInfo);
  3276. }
  3277. VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureToMemoryKHR(
  3278. VkCommandBuffer commandBuffer,
  3279. const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) {
  3280. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3281. disp->CmdCopyAccelerationStructureToMemoryKHR(commandBuffer, pInfo);
  3282. }
  3283. VKAPI_ATTR void VKAPI_CALL CmdCopyMemoryToAccelerationStructureKHR(
  3284. VkCommandBuffer commandBuffer,
  3285. const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) {
  3286. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3287. disp->CmdCopyMemoryToAccelerationStructureKHR(commandBuffer, pInfo);
  3288. }
  3289. VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetAccelerationStructureDeviceAddressKHR(
  3290. VkDevice device,
  3291. const VkAccelerationStructureDeviceAddressInfoKHR* pInfo) {
  3292. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3293. return disp->GetAccelerationStructureDeviceAddressKHR(device, pInfo);
  3294. }
  3295. VKAPI_ATTR void VKAPI_CALL CmdWriteAccelerationStructuresPropertiesKHR(
  3296. VkCommandBuffer commandBuffer,
  3297. uint32_t accelerationStructureCount,
  3298. const VkAccelerationStructureKHR* pAccelerationStructures,
  3299. VkQueryType queryType,
  3300. VkQueryPool queryPool,
  3301. uint32_t firstQuery) {
  3302. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3303. disp->CmdWriteAccelerationStructuresPropertiesKHR(commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery);
  3304. }
  3305. VKAPI_ATTR void VKAPI_CALL GetDeviceAccelerationStructureCompatibilityKHR(
  3306. VkDevice device,
  3307. const VkAccelerationStructureVersionInfoKHR* pVersionInfo,
  3308. VkAccelerationStructureCompatibilityKHR* pCompatibility) {
  3309. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3310. disp->GetDeviceAccelerationStructureCompatibilityKHR(device, pVersionInfo, pCompatibility);
  3311. }
  3312. VKAPI_ATTR void VKAPI_CALL GetAccelerationStructureBuildSizesKHR(
  3313. VkDevice device,
  3314. VkAccelerationStructureBuildTypeKHR buildType,
  3315. const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo,
  3316. const uint32_t* pMaxPrimitiveCounts,
  3317. VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo) {
  3318. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3319. disp->GetAccelerationStructureBuildSizesKHR(device, buildType, pBuildInfo, pMaxPrimitiveCounts, pSizeInfo);
  3320. }
  3321. // ---- VK_KHR_ray_tracing_pipeline extension trampoline/terminators
  3322. VKAPI_ATTR void VKAPI_CALL CmdTraceRaysKHR(
  3323. VkCommandBuffer commandBuffer,
  3324. const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable,
  3325. const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable,
  3326. const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable,
  3327. const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable,
  3328. uint32_t width,
  3329. uint32_t height,
  3330. uint32_t depth) {
  3331. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3332. disp->CmdTraceRaysKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, pCallableShaderBindingTable, width, height, depth);
  3333. }
  3334. VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesKHR(
  3335. VkDevice device,
  3336. VkDeferredOperationKHR deferredOperation,
  3337. VkPipelineCache pipelineCache,
  3338. uint32_t createInfoCount,
  3339. const VkRayTracingPipelineCreateInfoKHR* pCreateInfos,
  3340. const VkAllocationCallbacks* pAllocator,
  3341. VkPipeline* pPipelines) {
  3342. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3343. return disp->CreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines);
  3344. }
  3345. VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingCaptureReplayShaderGroupHandlesKHR(
  3346. VkDevice device,
  3347. VkPipeline pipeline,
  3348. uint32_t firstGroup,
  3349. uint32_t groupCount,
  3350. size_t dataSize,
  3351. void* pData) {
  3352. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3353. return disp->GetRayTracingCaptureReplayShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, pData);
  3354. }
  3355. VKAPI_ATTR void VKAPI_CALL CmdTraceRaysIndirectKHR(
  3356. VkCommandBuffer commandBuffer,
  3357. const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable,
  3358. const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable,
  3359. const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable,
  3360. const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable,
  3361. VkDeviceAddress indirectDeviceAddress) {
  3362. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3363. disp->CmdTraceRaysIndirectKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, pCallableShaderBindingTable, indirectDeviceAddress);
  3364. }
  3365. VKAPI_ATTR VkDeviceSize VKAPI_CALL GetRayTracingShaderGroupStackSizeKHR(
  3366. VkDevice device,
  3367. VkPipeline pipeline,
  3368. uint32_t group,
  3369. VkShaderGroupShaderKHR groupShader) {
  3370. const VkLayerDispatchTable *disp = loader_get_dispatch(device);
  3371. return disp->GetRayTracingShaderGroupStackSizeKHR(device, pipeline, group, groupShader);
  3372. }
  3373. VKAPI_ATTR void VKAPI_CALL CmdSetRayTracingPipelineStackSizeKHR(
  3374. VkCommandBuffer commandBuffer,
  3375. uint32_t pipelineStackSize) {
  3376. const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
  3377. disp->CmdSetRayTracingPipelineStackSizeKHR(commandBuffer, pipelineStackSize);
  3378. }
  3379. // GPA helpers for extensions
  3380. bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *name, void **addr) {
  3381. *addr = NULL;
  3382. // ---- VK_KHR_get_physical_device_properties2 extension commands
  3383. if (!strcmp("vkGetPhysicalDeviceFeatures2KHR", name)) {
  3384. *addr = (ptr_instance->enabled_known_extensions.khr_get_physical_device_properties2 == 1)
  3385. ? (void *)vkGetPhysicalDeviceFeatures2
  3386. : NULL;
  3387. return true;
  3388. }
  3389. if (!strcmp("vkGetPhysicalDeviceProperties2KHR", name)) {
  3390. *addr = (ptr_instance->enabled_known_extensions.khr_get_physical_device_properties2 == 1)
  3391. ? (void *)vkGetPhysicalDeviceProperties2
  3392. : NULL;
  3393. return true;
  3394. }
  3395. if (!strcmp("vkGetPhysicalDeviceFormatProperties2KHR", name)) {
  3396. *addr = (ptr_instance->enabled_known_extensions.khr_get_physical_device_properties2 == 1)
  3397. ? (void *)vkGetPhysicalDeviceFormatProperties2
  3398. : NULL;
  3399. return true;
  3400. }
  3401. if (!strcmp("vkGetPhysicalDeviceImageFormatProperties2KHR", name)) {
  3402. *addr = (ptr_instance->enabled_known_extensions.khr_get_physical_device_properties2 == 1)
  3403. ? (void *)vkGetPhysicalDeviceImageFormatProperties2
  3404. : NULL;
  3405. return true;
  3406. }
  3407. if (!strcmp("vkGetPhysicalDeviceQueueFamilyProperties2KHR", name)) {
  3408. *addr = (ptr_instance->enabled_known_extensions.khr_get_physical_device_properties2 == 1)
  3409. ? (void *)vkGetPhysicalDeviceQueueFamilyProperties2
  3410. : NULL;
  3411. return true;
  3412. }
  3413. if (!strcmp("vkGetPhysicalDeviceMemoryProperties2KHR", name)) {
  3414. *addr = (ptr_instance->enabled_known_extensions.khr_get_physical_device_properties2 == 1)
  3415. ? (void *)vkGetPhysicalDeviceMemoryProperties2
  3416. : NULL;
  3417. return true;
  3418. }
  3419. if (!strcmp("vkGetPhysicalDeviceSparseImageFormatProperties2KHR", name)) {
  3420. *addr = (ptr_instance->enabled_known_extensions.khr_get_physical_device_properties2 == 1)
  3421. ? (void *)vkGetPhysicalDeviceSparseImageFormatProperties2
  3422. : NULL;
  3423. return true;
  3424. }
  3425. // ---- VK_KHR_device_group extension commands
  3426. if (!strcmp("vkGetDeviceGroupPeerMemoryFeaturesKHR", name)) {
  3427. *addr = (void *)GetDeviceGroupPeerMemoryFeaturesKHR;
  3428. return true;
  3429. }
  3430. if (!strcmp("vkCmdSetDeviceMaskKHR", name)) {
  3431. *addr = (void *)CmdSetDeviceMaskKHR;
  3432. return true;
  3433. }
  3434. if (!strcmp("vkCmdDispatchBaseKHR", name)) {
  3435. *addr = (void *)CmdDispatchBaseKHR;
  3436. return true;
  3437. }
  3438. // ---- VK_KHR_maintenance1 extension commands
  3439. if (!strcmp("vkTrimCommandPoolKHR", name)) {
  3440. *addr = (void *)TrimCommandPoolKHR;
  3441. return true;
  3442. }
  3443. // ---- VK_KHR_device_group_creation extension commands
  3444. if (!strcmp("vkEnumeratePhysicalDeviceGroupsKHR", name)) {
  3445. *addr = (ptr_instance->enabled_known_extensions.khr_device_group_creation == 1)
  3446. ? (void *)vkEnumeratePhysicalDeviceGroups
  3447. : NULL;
  3448. return true;
  3449. }
  3450. // ---- VK_KHR_external_memory_capabilities extension commands
  3451. if (!strcmp("vkGetPhysicalDeviceExternalBufferPropertiesKHR", name)) {
  3452. *addr = (ptr_instance->enabled_known_extensions.khr_external_memory_capabilities == 1)
  3453. ? (void *)vkGetPhysicalDeviceExternalBufferProperties
  3454. : NULL;
  3455. return true;
  3456. }
  3457. // ---- VK_KHR_external_memory_win32 extension commands
  3458. #ifdef VK_USE_PLATFORM_WIN32_KHR
  3459. if (!strcmp("vkGetMemoryWin32HandleKHR", name)) {
  3460. *addr = (void *)GetMemoryWin32HandleKHR;
  3461. return true;
  3462. }
  3463. #endif // VK_USE_PLATFORM_WIN32_KHR
  3464. #ifdef VK_USE_PLATFORM_WIN32_KHR
  3465. if (!strcmp("vkGetMemoryWin32HandlePropertiesKHR", name)) {
  3466. *addr = (void *)GetMemoryWin32HandlePropertiesKHR;
  3467. return true;
  3468. }
  3469. #endif // VK_USE_PLATFORM_WIN32_KHR
  3470. // ---- VK_KHR_external_memory_fd extension commands
  3471. if (!strcmp("vkGetMemoryFdKHR", name)) {
  3472. *addr = (void *)GetMemoryFdKHR;
  3473. return true;
  3474. }
  3475. if (!strcmp("vkGetMemoryFdPropertiesKHR", name)) {
  3476. *addr = (void *)GetMemoryFdPropertiesKHR;
  3477. return true;
  3478. }
  3479. // ---- VK_KHR_external_semaphore_capabilities extension commands
  3480. if (!strcmp("vkGetPhysicalDeviceExternalSemaphorePropertiesKHR", name)) {
  3481. *addr = (ptr_instance->enabled_known_extensions.khr_external_semaphore_capabilities == 1)
  3482. ? (void *)vkGetPhysicalDeviceExternalSemaphoreProperties
  3483. : NULL;
  3484. return true;
  3485. }
  3486. // ---- VK_KHR_external_semaphore_win32 extension commands
  3487. #ifdef VK_USE_PLATFORM_WIN32_KHR
  3488. if (!strcmp("vkImportSemaphoreWin32HandleKHR", name)) {
  3489. *addr = (void *)ImportSemaphoreWin32HandleKHR;
  3490. return true;
  3491. }
  3492. #endif // VK_USE_PLATFORM_WIN32_KHR
  3493. #ifdef VK_USE_PLATFORM_WIN32_KHR
  3494. if (!strcmp("vkGetSemaphoreWin32HandleKHR", name)) {
  3495. *addr = (void *)GetSemaphoreWin32HandleKHR;
  3496. return true;
  3497. }
  3498. #endif // VK_USE_PLATFORM_WIN32_KHR
  3499. // ---- VK_KHR_external_semaphore_fd extension commands
  3500. if (!strcmp("vkImportSemaphoreFdKHR", name)) {
  3501. *addr = (void *)ImportSemaphoreFdKHR;
  3502. return true;
  3503. }
  3504. if (!strcmp("vkGetSemaphoreFdKHR", name)) {
  3505. *addr = (void *)GetSemaphoreFdKHR;
  3506. return true;
  3507. }
  3508. // ---- VK_KHR_push_descriptor extension commands
  3509. if (!strcmp("vkCmdPushDescriptorSetKHR", name)) {
  3510. *addr = (void *)CmdPushDescriptorSetKHR;
  3511. return true;
  3512. }
  3513. if (!strcmp("vkCmdPushDescriptorSetWithTemplateKHR", name)) {
  3514. *addr = (void *)CmdPushDescriptorSetWithTemplateKHR;
  3515. return true;
  3516. }
  3517. // ---- VK_KHR_descriptor_update_template extension commands
  3518. if (!strcmp("vkCreateDescriptorUpdateTemplateKHR", name)) {
  3519. *addr = (void *)CreateDescriptorUpdateTemplateKHR;
  3520. return true;
  3521. }
  3522. if (!strcmp("vkDestroyDescriptorUpdateTemplateKHR", name)) {
  3523. *addr = (void *)DestroyDescriptorUpdateTemplateKHR;
  3524. return true;
  3525. }
  3526. if (!strcmp("vkUpdateDescriptorSetWithTemplateKHR", name)) {
  3527. *addr = (void *)UpdateDescriptorSetWithTemplateKHR;
  3528. return true;
  3529. }
  3530. // ---- VK_KHR_create_renderpass2 extension commands
  3531. if (!strcmp("vkCreateRenderPass2KHR", name)) {
  3532. *addr = (void *)CreateRenderPass2KHR;
  3533. return true;
  3534. }
  3535. if (!strcmp("vkCmdBeginRenderPass2KHR", name)) {
  3536. *addr = (void *)CmdBeginRenderPass2KHR;
  3537. return true;
  3538. }
  3539. if (!strcmp("vkCmdNextSubpass2KHR", name)) {
  3540. *addr = (void *)CmdNextSubpass2KHR;
  3541. return true;
  3542. }
  3543. if (!strcmp("vkCmdEndRenderPass2KHR", name)) {
  3544. *addr = (void *)CmdEndRenderPass2KHR;
  3545. return true;
  3546. }
  3547. // ---- VK_KHR_shared_presentable_image extension commands
  3548. if (!strcmp("vkGetSwapchainStatusKHR", name)) {
  3549. *addr = (void *)GetSwapchainStatusKHR;
  3550. return true;
  3551. }
  3552. // ---- VK_KHR_external_fence_capabilities extension commands
  3553. if (!strcmp("vkGetPhysicalDeviceExternalFencePropertiesKHR", name)) {
  3554. *addr = (ptr_instance->enabled_known_extensions.khr_external_fence_capabilities == 1)
  3555. ? (void *)vkGetPhysicalDeviceExternalFenceProperties
  3556. : NULL;
  3557. return true;
  3558. }
  3559. // ---- VK_KHR_external_fence_win32 extension commands
  3560. #ifdef VK_USE_PLATFORM_WIN32_KHR
  3561. if (!strcmp("vkImportFenceWin32HandleKHR", name)) {
  3562. *addr = (void *)ImportFenceWin32HandleKHR;
  3563. return true;
  3564. }
  3565. #endif // VK_USE_PLATFORM_WIN32_KHR
  3566. #ifdef VK_USE_PLATFORM_WIN32_KHR
  3567. if (!strcmp("vkGetFenceWin32HandleKHR", name)) {
  3568. *addr = (void *)GetFenceWin32HandleKHR;
  3569. return true;
  3570. }
  3571. #endif // VK_USE_PLATFORM_WIN32_KHR
  3572. // ---- VK_KHR_external_fence_fd extension commands
  3573. if (!strcmp("vkImportFenceFdKHR", name)) {
  3574. *addr = (void *)ImportFenceFdKHR;
  3575. return true;
  3576. }
  3577. if (!strcmp("vkGetFenceFdKHR", name)) {
  3578. *addr = (void *)GetFenceFdKHR;
  3579. return true;
  3580. }
  3581. // ---- VK_KHR_performance_query extension commands
  3582. if (!strcmp("vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR", name)) {
  3583. *addr = (void *)EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR;
  3584. return true;
  3585. }
  3586. if (!strcmp("vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR", name)) {
  3587. *addr = (void *)GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR;
  3588. return true;
  3589. }
  3590. if (!strcmp("vkAcquireProfilingLockKHR", name)) {
  3591. *addr = (void *)AcquireProfilingLockKHR;
  3592. return true;
  3593. }
  3594. if (!strcmp("vkReleaseProfilingLockKHR", name)) {
  3595. *addr = (void *)ReleaseProfilingLockKHR;
  3596. return true;
  3597. }
  3598. // ---- VK_KHR_get_memory_requirements2 extension commands
  3599. if (!strcmp("vkGetImageMemoryRequirements2KHR", name)) {
  3600. *addr = (void *)GetImageMemoryRequirements2KHR;
  3601. return true;
  3602. }
  3603. if (!strcmp("vkGetBufferMemoryRequirements2KHR", name)) {
  3604. *addr = (void *)GetBufferMemoryRequirements2KHR;
  3605. return true;
  3606. }
  3607. if (!strcmp("vkGetImageSparseMemoryRequirements2KHR", name)) {
  3608. *addr = (void *)GetImageSparseMemoryRequirements2KHR;
  3609. return true;
  3610. }
  3611. // ---- VK_KHR_sampler_ycbcr_conversion extension commands
  3612. if (!strcmp("vkCreateSamplerYcbcrConversionKHR", name)) {
  3613. *addr = (void *)CreateSamplerYcbcrConversionKHR;
  3614. return true;
  3615. }
  3616. if (!strcmp("vkDestroySamplerYcbcrConversionKHR", name)) {
  3617. *addr = (void *)DestroySamplerYcbcrConversionKHR;
  3618. return true;
  3619. }
  3620. // ---- VK_KHR_bind_memory2 extension commands
  3621. if (!strcmp("vkBindBufferMemory2KHR", name)) {
  3622. *addr = (void *)BindBufferMemory2KHR;
  3623. return true;
  3624. }
  3625. if (!strcmp("vkBindImageMemory2KHR", name)) {
  3626. *addr = (void *)BindImageMemory2KHR;
  3627. return true;
  3628. }
  3629. // ---- VK_KHR_maintenance3 extension commands
  3630. if (!strcmp("vkGetDescriptorSetLayoutSupportKHR", name)) {
  3631. *addr = (void *)GetDescriptorSetLayoutSupportKHR;
  3632. return true;
  3633. }
  3634. // ---- VK_KHR_draw_indirect_count extension commands
  3635. if (!strcmp("vkCmdDrawIndirectCountKHR", name)) {
  3636. *addr = (void *)CmdDrawIndirectCountKHR;
  3637. return true;
  3638. }
  3639. if (!strcmp("vkCmdDrawIndexedIndirectCountKHR", name)) {
  3640. *addr = (void *)CmdDrawIndexedIndirectCountKHR;
  3641. return true;
  3642. }
  3643. // ---- VK_KHR_timeline_semaphore extension commands
  3644. if (!strcmp("vkGetSemaphoreCounterValueKHR", name)) {
  3645. *addr = (void *)GetSemaphoreCounterValueKHR;
  3646. return true;
  3647. }
  3648. if (!strcmp("vkWaitSemaphoresKHR", name)) {
  3649. *addr = (void *)WaitSemaphoresKHR;
  3650. return true;
  3651. }
  3652. if (!strcmp("vkSignalSemaphoreKHR", name)) {
  3653. *addr = (void *)SignalSemaphoreKHR;
  3654. return true;
  3655. }
  3656. // ---- VK_KHR_fragment_shading_rate extension commands
  3657. if (!strcmp("vkGetPhysicalDeviceFragmentShadingRatesKHR", name)) {
  3658. *addr = (void *)GetPhysicalDeviceFragmentShadingRatesKHR;
  3659. return true;
  3660. }
  3661. if (!strcmp("vkCmdSetFragmentShadingRateKHR", name)) {
  3662. *addr = (void *)CmdSetFragmentShadingRateKHR;
  3663. return true;
  3664. }
  3665. // ---- VK_KHR_buffer_device_address extension commands
  3666. if (!strcmp("vkGetBufferDeviceAddressKHR", name)) {
  3667. *addr = (void *)GetBufferDeviceAddressKHR;
  3668. return true;
  3669. }
  3670. if (!strcmp("vkGetBufferOpaqueCaptureAddressKHR", name)) {
  3671. *addr = (void *)GetBufferOpaqueCaptureAddressKHR;
  3672. return true;
  3673. }
  3674. if (!strcmp("vkGetDeviceMemoryOpaqueCaptureAddressKHR", name)) {
  3675. *addr = (void *)GetDeviceMemoryOpaqueCaptureAddressKHR;
  3676. return true;
  3677. }
  3678. // ---- VK_KHR_deferred_host_operations extension commands
  3679. if (!strcmp("vkCreateDeferredOperationKHR", name)) {
  3680. *addr = (void *)CreateDeferredOperationKHR;
  3681. return true;
  3682. }
  3683. if (!strcmp("vkDestroyDeferredOperationKHR", name)) {
  3684. *addr = (void *)DestroyDeferredOperationKHR;
  3685. return true;
  3686. }
  3687. if (!strcmp("vkGetDeferredOperationMaxConcurrencyKHR", name)) {
  3688. *addr = (void *)GetDeferredOperationMaxConcurrencyKHR;
  3689. return true;
  3690. }
  3691. if (!strcmp("vkGetDeferredOperationResultKHR", name)) {
  3692. *addr = (void *)GetDeferredOperationResultKHR;
  3693. return true;
  3694. }
  3695. if (!strcmp("vkDeferredOperationJoinKHR", name)) {
  3696. *addr = (void *)DeferredOperationJoinKHR;
  3697. return true;
  3698. }
  3699. // ---- VK_KHR_pipeline_executable_properties extension commands
  3700. if (!strcmp("vkGetPipelineExecutablePropertiesKHR", name)) {
  3701. *addr = (void *)GetPipelineExecutablePropertiesKHR;
  3702. return true;
  3703. }
  3704. if (!strcmp("vkGetPipelineExecutableStatisticsKHR", name)) {
  3705. *addr = (void *)GetPipelineExecutableStatisticsKHR;
  3706. return true;
  3707. }
  3708. if (!strcmp("vkGetPipelineExecutableInternalRepresentationsKHR", name)) {
  3709. *addr = (void *)GetPipelineExecutableInternalRepresentationsKHR;
  3710. return true;
  3711. }
  3712. // ---- VK_KHR_copy_commands2 extension commands
  3713. if (!strcmp("vkCmdCopyBuffer2KHR", name)) {
  3714. *addr = (void *)CmdCopyBuffer2KHR;
  3715. return true;
  3716. }
  3717. if (!strcmp("vkCmdCopyImage2KHR", name)) {
  3718. *addr = (void *)CmdCopyImage2KHR;
  3719. return true;
  3720. }
  3721. if (!strcmp("vkCmdCopyBufferToImage2KHR", name)) {
  3722. *addr = (void *)CmdCopyBufferToImage2KHR;
  3723. return true;
  3724. }
  3725. if (!strcmp("vkCmdCopyImageToBuffer2KHR", name)) {
  3726. *addr = (void *)CmdCopyImageToBuffer2KHR;
  3727. return true;
  3728. }
  3729. if (!strcmp("vkCmdBlitImage2KHR", name)) {
  3730. *addr = (void *)CmdBlitImage2KHR;
  3731. return true;
  3732. }
  3733. if (!strcmp("vkCmdResolveImage2KHR", name)) {
  3734. *addr = (void *)CmdResolveImage2KHR;
  3735. return true;
  3736. }
  3737. // ---- VK_EXT_debug_marker extension commands
  3738. if (!strcmp("vkDebugMarkerSetObjectTagEXT", name)) {
  3739. *addr = (void *)DebugMarkerSetObjectTagEXT;
  3740. return true;
  3741. }
  3742. if (!strcmp("vkDebugMarkerSetObjectNameEXT", name)) {
  3743. *addr = (void *)DebugMarkerSetObjectNameEXT;
  3744. return true;
  3745. }
  3746. if (!strcmp("vkCmdDebugMarkerBeginEXT", name)) {
  3747. *addr = (void *)CmdDebugMarkerBeginEXT;
  3748. return true;
  3749. }
  3750. if (!strcmp("vkCmdDebugMarkerEndEXT", name)) {
  3751. *addr = (void *)CmdDebugMarkerEndEXT;
  3752. return true;
  3753. }
  3754. if (!strcmp("vkCmdDebugMarkerInsertEXT", name)) {
  3755. *addr = (void *)CmdDebugMarkerInsertEXT;
  3756. return true;
  3757. }
  3758. // ---- VK_EXT_transform_feedback extension commands
  3759. if (!strcmp("vkCmdBindTransformFeedbackBuffersEXT", name)) {
  3760. *addr = (void *)CmdBindTransformFeedbackBuffersEXT;
  3761. return true;
  3762. }
  3763. if (!strcmp("vkCmdBeginTransformFeedbackEXT", name)) {
  3764. *addr = (void *)CmdBeginTransformFeedbackEXT;
  3765. return true;
  3766. }
  3767. if (!strcmp("vkCmdEndTransformFeedbackEXT", name)) {
  3768. *addr = (void *)CmdEndTransformFeedbackEXT;
  3769. return true;
  3770. }
  3771. if (!strcmp("vkCmdBeginQueryIndexedEXT", name)) {
  3772. *addr = (void *)CmdBeginQueryIndexedEXT;
  3773. return true;
  3774. }
  3775. if (!strcmp("vkCmdEndQueryIndexedEXT", name)) {
  3776. *addr = (void *)CmdEndQueryIndexedEXT;
  3777. return true;
  3778. }
  3779. if (!strcmp("vkCmdDrawIndirectByteCountEXT", name)) {
  3780. *addr = (void *)CmdDrawIndirectByteCountEXT;
  3781. return true;
  3782. }
  3783. // ---- VK_NVX_image_view_handle extension commands
  3784. if (!strcmp("vkGetImageViewHandleNVX", name)) {
  3785. *addr = (void *)GetImageViewHandleNVX;
  3786. return true;
  3787. }
  3788. if (!strcmp("vkGetImageViewAddressNVX", name)) {
  3789. *addr = (void *)GetImageViewAddressNVX;
  3790. return true;
  3791. }
  3792. // ---- VK_AMD_draw_indirect_count extension commands
  3793. if (!strcmp("vkCmdDrawIndirectCountAMD", name)) {
  3794. *addr = (void *)CmdDrawIndirectCountAMD;
  3795. return true;
  3796. }
  3797. if (!strcmp("vkCmdDrawIndexedIndirectCountAMD", name)) {
  3798. *addr = (void *)CmdDrawIndexedIndirectCountAMD;
  3799. return true;
  3800. }
  3801. // ---- VK_AMD_shader_info extension commands
  3802. if (!strcmp("vkGetShaderInfoAMD", name)) {
  3803. *addr = (void *)GetShaderInfoAMD;
  3804. return true;
  3805. }
  3806. // ---- VK_NV_external_memory_capabilities extension commands
  3807. if (!strcmp("vkGetPhysicalDeviceExternalImageFormatPropertiesNV", name)) {
  3808. *addr = (ptr_instance->enabled_known_extensions.nv_external_memory_capabilities == 1)
  3809. ? (void *)GetPhysicalDeviceExternalImageFormatPropertiesNV
  3810. : NULL;
  3811. return true;
  3812. }
  3813. // ---- VK_NV_external_memory_win32 extension commands
  3814. #ifdef VK_USE_PLATFORM_WIN32_KHR
  3815. if (!strcmp("vkGetMemoryWin32HandleNV", name)) {
  3816. *addr = (void *)GetMemoryWin32HandleNV;
  3817. return true;
  3818. }
  3819. #endif // VK_USE_PLATFORM_WIN32_KHR
  3820. // ---- VK_NN_vi_surface extension commands
  3821. #ifdef VK_USE_PLATFORM_VI_NN
  3822. if (!strcmp("vkCreateViSurfaceNN", name)) {
  3823. *addr = (ptr_instance->enabled_known_extensions.nn_vi_surface == 1)
  3824. ? (void *)CreateViSurfaceNN
  3825. : NULL;
  3826. return true;
  3827. }
  3828. #endif // VK_USE_PLATFORM_VI_NN
  3829. // ---- VK_EXT_conditional_rendering extension commands
  3830. if (!strcmp("vkCmdBeginConditionalRenderingEXT", name)) {
  3831. *addr = (void *)CmdBeginConditionalRenderingEXT;
  3832. return true;
  3833. }
  3834. if (!strcmp("vkCmdEndConditionalRenderingEXT", name)) {
  3835. *addr = (void *)CmdEndConditionalRenderingEXT;
  3836. return true;
  3837. }
  3838. // ---- VK_NV_clip_space_w_scaling extension commands
  3839. if (!strcmp("vkCmdSetViewportWScalingNV", name)) {
  3840. *addr = (void *)CmdSetViewportWScalingNV;
  3841. return true;
  3842. }
  3843. // ---- VK_EXT_direct_mode_display extension commands
  3844. if (!strcmp("vkReleaseDisplayEXT", name)) {
  3845. *addr = (ptr_instance->enabled_known_extensions.ext_direct_mode_display == 1)
  3846. ? (void *)ReleaseDisplayEXT
  3847. : NULL;
  3848. return true;
  3849. }
  3850. // ---- VK_EXT_acquire_xlib_display extension commands
  3851. #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
  3852. if (!strcmp("vkAcquireXlibDisplayEXT", name)) {
  3853. *addr = (ptr_instance->enabled_known_extensions.ext_acquire_xlib_display == 1)
  3854. ? (void *)AcquireXlibDisplayEXT
  3855. : NULL;
  3856. return true;
  3857. }
  3858. #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
  3859. #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
  3860. if (!strcmp("vkGetRandROutputDisplayEXT", name)) {
  3861. *addr = (ptr_instance->enabled_known_extensions.ext_acquire_xlib_display == 1)
  3862. ? (void *)GetRandROutputDisplayEXT
  3863. : NULL;
  3864. return true;
  3865. }
  3866. #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
  3867. // ---- VK_EXT_display_surface_counter extension commands
  3868. if (!strcmp("vkGetPhysicalDeviceSurfaceCapabilities2EXT", name)) {
  3869. *addr = (ptr_instance->enabled_known_extensions.ext_display_surface_counter == 1)
  3870. ? (void *)GetPhysicalDeviceSurfaceCapabilities2EXT
  3871. : NULL;
  3872. return true;
  3873. }
  3874. // ---- VK_EXT_display_control extension commands
  3875. if (!strcmp("vkDisplayPowerControlEXT", name)) {
  3876. *addr = (void *)DisplayPowerControlEXT;
  3877. return true;
  3878. }
  3879. if (!strcmp("vkRegisterDeviceEventEXT", name)) {
  3880. *addr = (void *)RegisterDeviceEventEXT;
  3881. return true;
  3882. }
  3883. if (!strcmp("vkRegisterDisplayEventEXT", name)) {
  3884. *addr = (void *)RegisterDisplayEventEXT;
  3885. return true;
  3886. }
  3887. if (!strcmp("vkGetSwapchainCounterEXT", name)) {
  3888. *addr = (void *)GetSwapchainCounterEXT;
  3889. return true;
  3890. }
  3891. // ---- VK_GOOGLE_display_timing extension commands
  3892. if (!strcmp("vkGetRefreshCycleDurationGOOGLE", name)) {
  3893. *addr = (void *)GetRefreshCycleDurationGOOGLE;
  3894. return true;
  3895. }
  3896. if (!strcmp("vkGetPastPresentationTimingGOOGLE", name)) {
  3897. *addr = (void *)GetPastPresentationTimingGOOGLE;
  3898. return true;
  3899. }
  3900. // ---- VK_EXT_discard_rectangles extension commands
  3901. if (!strcmp("vkCmdSetDiscardRectangleEXT", name)) {
  3902. *addr = (void *)CmdSetDiscardRectangleEXT;
  3903. return true;
  3904. }
  3905. // ---- VK_EXT_hdr_metadata extension commands
  3906. if (!strcmp("vkSetHdrMetadataEXT", name)) {
  3907. *addr = (void *)SetHdrMetadataEXT;
  3908. return true;
  3909. }
  3910. // ---- VK_EXT_debug_utils extension commands
  3911. if (!strcmp("vkSetDebugUtilsObjectNameEXT", name)) {
  3912. *addr = (ptr_instance->enabled_known_extensions.ext_debug_utils == 1)
  3913. ? (void *)SetDebugUtilsObjectNameEXT
  3914. : NULL;
  3915. return true;
  3916. }
  3917. if (!strcmp("vkSetDebugUtilsObjectTagEXT", name)) {
  3918. *addr = (ptr_instance->enabled_known_extensions.ext_debug_utils == 1)
  3919. ? (void *)SetDebugUtilsObjectTagEXT
  3920. : NULL;
  3921. return true;
  3922. }
  3923. if (!strcmp("vkQueueBeginDebugUtilsLabelEXT", name)) {
  3924. *addr = (ptr_instance->enabled_known_extensions.ext_debug_utils == 1)
  3925. ? (void *)QueueBeginDebugUtilsLabelEXT
  3926. : NULL;
  3927. return true;
  3928. }
  3929. if (!strcmp("vkQueueEndDebugUtilsLabelEXT", name)) {
  3930. *addr = (ptr_instance->enabled_known_extensions.ext_debug_utils == 1)
  3931. ? (void *)QueueEndDebugUtilsLabelEXT
  3932. : NULL;
  3933. return true;
  3934. }
  3935. if (!strcmp("vkQueueInsertDebugUtilsLabelEXT", name)) {
  3936. *addr = (ptr_instance->enabled_known_extensions.ext_debug_utils == 1)
  3937. ? (void *)QueueInsertDebugUtilsLabelEXT
  3938. : NULL;
  3939. return true;
  3940. }
  3941. if (!strcmp("vkCmdBeginDebugUtilsLabelEXT", name)) {
  3942. *addr = (ptr_instance->enabled_known_extensions.ext_debug_utils == 1)
  3943. ? (void *)CmdBeginDebugUtilsLabelEXT
  3944. : NULL;
  3945. return true;
  3946. }
  3947. if (!strcmp("vkCmdEndDebugUtilsLabelEXT", name)) {
  3948. *addr = (ptr_instance->enabled_known_extensions.ext_debug_utils == 1)
  3949. ? (void *)CmdEndDebugUtilsLabelEXT
  3950. : NULL;
  3951. return true;
  3952. }
  3953. if (!strcmp("vkCmdInsertDebugUtilsLabelEXT", name)) {
  3954. *addr = (ptr_instance->enabled_known_extensions.ext_debug_utils == 1)
  3955. ? (void *)CmdInsertDebugUtilsLabelEXT
  3956. : NULL;
  3957. return true;
  3958. }
  3959. // ---- VK_ANDROID_external_memory_android_hardware_buffer extension commands
  3960. #ifdef VK_USE_PLATFORM_ANDROID_KHR
  3961. if (!strcmp("vkGetAndroidHardwareBufferPropertiesANDROID", name)) {
  3962. *addr = (void *)GetAndroidHardwareBufferPropertiesANDROID;
  3963. return true;
  3964. }
  3965. #endif // VK_USE_PLATFORM_ANDROID_KHR
  3966. #ifdef VK_USE_PLATFORM_ANDROID_KHR
  3967. if (!strcmp("vkGetMemoryAndroidHardwareBufferANDROID", name)) {
  3968. *addr = (void *)GetMemoryAndroidHardwareBufferANDROID;
  3969. return true;
  3970. }
  3971. #endif // VK_USE_PLATFORM_ANDROID_KHR
  3972. // ---- VK_EXT_sample_locations extension commands
  3973. if (!strcmp("vkCmdSetSampleLocationsEXT", name)) {
  3974. *addr = (void *)CmdSetSampleLocationsEXT;
  3975. return true;
  3976. }
  3977. if (!strcmp("vkGetPhysicalDeviceMultisamplePropertiesEXT", name)) {
  3978. *addr = (void *)GetPhysicalDeviceMultisamplePropertiesEXT;
  3979. return true;
  3980. }
  3981. // ---- VK_EXT_image_drm_format_modifier extension commands
  3982. if (!strcmp("vkGetImageDrmFormatModifierPropertiesEXT", name)) {
  3983. *addr = (void *)GetImageDrmFormatModifierPropertiesEXT;
  3984. return true;
  3985. }
  3986. // ---- VK_EXT_validation_cache extension commands
  3987. if (!strcmp("vkCreateValidationCacheEXT", name)) {
  3988. *addr = (void *)CreateValidationCacheEXT;
  3989. return true;
  3990. }
  3991. if (!strcmp("vkDestroyValidationCacheEXT", name)) {
  3992. *addr = (void *)DestroyValidationCacheEXT;
  3993. return true;
  3994. }
  3995. if (!strcmp("vkMergeValidationCachesEXT", name)) {
  3996. *addr = (void *)MergeValidationCachesEXT;
  3997. return true;
  3998. }
  3999. if (!strcmp("vkGetValidationCacheDataEXT", name)) {
  4000. *addr = (void *)GetValidationCacheDataEXT;
  4001. return true;
  4002. }
  4003. // ---- VK_NV_shading_rate_image extension commands
  4004. if (!strcmp("vkCmdBindShadingRateImageNV", name)) {
  4005. *addr = (void *)CmdBindShadingRateImageNV;
  4006. return true;
  4007. }
  4008. if (!strcmp("vkCmdSetViewportShadingRatePaletteNV", name)) {
  4009. *addr = (void *)CmdSetViewportShadingRatePaletteNV;
  4010. return true;
  4011. }
  4012. if (!strcmp("vkCmdSetCoarseSampleOrderNV", name)) {
  4013. *addr = (void *)CmdSetCoarseSampleOrderNV;
  4014. return true;
  4015. }
  4016. // ---- VK_NV_ray_tracing extension commands
  4017. if (!strcmp("vkCreateAccelerationStructureNV", name)) {
  4018. *addr = (void *)CreateAccelerationStructureNV;
  4019. return true;
  4020. }
  4021. if (!strcmp("vkDestroyAccelerationStructureNV", name)) {
  4022. *addr = (void *)DestroyAccelerationStructureNV;
  4023. return true;
  4024. }
  4025. if (!strcmp("vkGetAccelerationStructureMemoryRequirementsNV", name)) {
  4026. *addr = (void *)GetAccelerationStructureMemoryRequirementsNV;
  4027. return true;
  4028. }
  4029. if (!strcmp("vkBindAccelerationStructureMemoryNV", name)) {
  4030. *addr = (void *)BindAccelerationStructureMemoryNV;
  4031. return true;
  4032. }
  4033. if (!strcmp("vkCmdBuildAccelerationStructureNV", name)) {
  4034. *addr = (void *)CmdBuildAccelerationStructureNV;
  4035. return true;
  4036. }
  4037. if (!strcmp("vkCmdCopyAccelerationStructureNV", name)) {
  4038. *addr = (void *)CmdCopyAccelerationStructureNV;
  4039. return true;
  4040. }
  4041. if (!strcmp("vkCmdTraceRaysNV", name)) {
  4042. *addr = (void *)CmdTraceRaysNV;
  4043. return true;
  4044. }
  4045. if (!strcmp("vkCreateRayTracingPipelinesNV", name)) {
  4046. *addr = (void *)CreateRayTracingPipelinesNV;
  4047. return true;
  4048. }
  4049. if (!strcmp("vkGetRayTracingShaderGroupHandlesKHR", name)) {
  4050. *addr = (void *)GetRayTracingShaderGroupHandlesKHR;
  4051. return true;
  4052. }
  4053. if (!strcmp("vkGetRayTracingShaderGroupHandlesNV", name)) {
  4054. *addr = (void *)GetRayTracingShaderGroupHandlesNV;
  4055. return true;
  4056. }
  4057. if (!strcmp("vkGetAccelerationStructureHandleNV", name)) {
  4058. *addr = (void *)GetAccelerationStructureHandleNV;
  4059. return true;
  4060. }
  4061. if (!strcmp("vkCmdWriteAccelerationStructuresPropertiesNV", name)) {
  4062. *addr = (void *)CmdWriteAccelerationStructuresPropertiesNV;
  4063. return true;
  4064. }
  4065. if (!strcmp("vkCompileDeferredNV", name)) {
  4066. *addr = (void *)CompileDeferredNV;
  4067. return true;
  4068. }
  4069. // ---- VK_EXT_external_memory_host extension commands
  4070. if (!strcmp("vkGetMemoryHostPointerPropertiesEXT", name)) {
  4071. *addr = (void *)GetMemoryHostPointerPropertiesEXT;
  4072. return true;
  4073. }
  4074. // ---- VK_AMD_buffer_marker extension commands
  4075. if (!strcmp("vkCmdWriteBufferMarkerAMD", name)) {
  4076. *addr = (void *)CmdWriteBufferMarkerAMD;
  4077. return true;
  4078. }
  4079. // ---- VK_EXT_calibrated_timestamps extension commands
  4080. if (!strcmp("vkGetPhysicalDeviceCalibrateableTimeDomainsEXT", name)) {
  4081. *addr = (void *)GetPhysicalDeviceCalibrateableTimeDomainsEXT;
  4082. return true;
  4083. }
  4084. if (!strcmp("vkGetCalibratedTimestampsEXT", name)) {
  4085. *addr = (void *)GetCalibratedTimestampsEXT;
  4086. return true;
  4087. }
  4088. // ---- VK_NV_mesh_shader extension commands
  4089. if (!strcmp("vkCmdDrawMeshTasksNV", name)) {
  4090. *addr = (void *)CmdDrawMeshTasksNV;
  4091. return true;
  4092. }
  4093. if (!strcmp("vkCmdDrawMeshTasksIndirectNV", name)) {
  4094. *addr = (void *)CmdDrawMeshTasksIndirectNV;
  4095. return true;
  4096. }
  4097. if (!strcmp("vkCmdDrawMeshTasksIndirectCountNV", name)) {
  4098. *addr = (void *)CmdDrawMeshTasksIndirectCountNV;
  4099. return true;
  4100. }
  4101. // ---- VK_NV_scissor_exclusive extension commands
  4102. if (!strcmp("vkCmdSetExclusiveScissorNV", name)) {
  4103. *addr = (void *)CmdSetExclusiveScissorNV;
  4104. return true;
  4105. }
  4106. // ---- VK_NV_device_diagnostic_checkpoints extension commands
  4107. if (!strcmp("vkCmdSetCheckpointNV", name)) {
  4108. *addr = (void *)CmdSetCheckpointNV;
  4109. return true;
  4110. }
  4111. if (!strcmp("vkGetQueueCheckpointDataNV", name)) {
  4112. *addr = (void *)GetQueueCheckpointDataNV;
  4113. return true;
  4114. }
  4115. // ---- VK_INTEL_performance_query extension commands
  4116. if (!strcmp("vkInitializePerformanceApiINTEL", name)) {
  4117. *addr = (void *)InitializePerformanceApiINTEL;
  4118. return true;
  4119. }
  4120. if (!strcmp("vkUninitializePerformanceApiINTEL", name)) {
  4121. *addr = (void *)UninitializePerformanceApiINTEL;
  4122. return true;
  4123. }
  4124. if (!strcmp("vkCmdSetPerformanceMarkerINTEL", name)) {
  4125. *addr = (void *)CmdSetPerformanceMarkerINTEL;
  4126. return true;
  4127. }
  4128. if (!strcmp("vkCmdSetPerformanceStreamMarkerINTEL", name)) {
  4129. *addr = (void *)CmdSetPerformanceStreamMarkerINTEL;
  4130. return true;
  4131. }
  4132. if (!strcmp("vkCmdSetPerformanceOverrideINTEL", name)) {
  4133. *addr = (void *)CmdSetPerformanceOverrideINTEL;
  4134. return true;
  4135. }
  4136. if (!strcmp("vkAcquirePerformanceConfigurationINTEL", name)) {
  4137. *addr = (void *)AcquirePerformanceConfigurationINTEL;
  4138. return true;
  4139. }
  4140. if (!strcmp("vkReleasePerformanceConfigurationINTEL", name)) {
  4141. *addr = (void *)ReleasePerformanceConfigurationINTEL;
  4142. return true;
  4143. }
  4144. if (!strcmp("vkQueueSetPerformanceConfigurationINTEL", name)) {
  4145. *addr = (void *)QueueSetPerformanceConfigurationINTEL;
  4146. return true;
  4147. }
  4148. if (!strcmp("vkGetPerformanceParameterINTEL", name)) {
  4149. *addr = (void *)GetPerformanceParameterINTEL;
  4150. return true;
  4151. }
  4152. // ---- VK_AMD_display_native_hdr extension commands
  4153. if (!strcmp("vkSetLocalDimmingAMD", name)) {
  4154. *addr = (void *)SetLocalDimmingAMD;
  4155. return true;
  4156. }
  4157. // ---- VK_EXT_buffer_device_address extension commands
  4158. if (!strcmp("vkGetBufferDeviceAddressEXT", name)) {
  4159. *addr = (void *)GetBufferDeviceAddressEXT;
  4160. return true;
  4161. }
  4162. // ---- VK_EXT_tooling_info extension commands
  4163. if (!strcmp("vkGetPhysicalDeviceToolPropertiesEXT", name)) {
  4164. *addr = (void *)GetPhysicalDeviceToolPropertiesEXT;
  4165. return true;
  4166. }
  4167. // ---- VK_NV_cooperative_matrix extension commands
  4168. if (!strcmp("vkGetPhysicalDeviceCooperativeMatrixPropertiesNV", name)) {
  4169. *addr = (void *)GetPhysicalDeviceCooperativeMatrixPropertiesNV;
  4170. return true;
  4171. }
  4172. // ---- VK_NV_coverage_reduction_mode extension commands
  4173. if (!strcmp("vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV", name)) {
  4174. *addr = (void *)GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV;
  4175. return true;
  4176. }
  4177. // ---- VK_EXT_full_screen_exclusive extension commands
  4178. #ifdef VK_USE_PLATFORM_WIN32_KHR
  4179. if (!strcmp("vkGetPhysicalDeviceSurfacePresentModes2EXT", name)) {
  4180. *addr = (void *)GetPhysicalDeviceSurfacePresentModes2EXT;
  4181. return true;
  4182. }
  4183. #endif // VK_USE_PLATFORM_WIN32_KHR
  4184. #ifdef VK_USE_PLATFORM_WIN32_KHR
  4185. if (!strcmp("vkAcquireFullScreenExclusiveModeEXT", name)) {
  4186. *addr = (void *)AcquireFullScreenExclusiveModeEXT;
  4187. return true;
  4188. }
  4189. #endif // VK_USE_PLATFORM_WIN32_KHR
  4190. #ifdef VK_USE_PLATFORM_WIN32_KHR
  4191. if (!strcmp("vkReleaseFullScreenExclusiveModeEXT", name)) {
  4192. *addr = (void *)ReleaseFullScreenExclusiveModeEXT;
  4193. return true;
  4194. }
  4195. #endif // VK_USE_PLATFORM_WIN32_KHR
  4196. #ifdef VK_USE_PLATFORM_WIN32_KHR
  4197. if (!strcmp("vkGetDeviceGroupSurfacePresentModes2EXT", name)) {
  4198. *addr = (void *)GetDeviceGroupSurfacePresentModes2EXT;
  4199. return true;
  4200. }
  4201. #endif // VK_USE_PLATFORM_WIN32_KHR
  4202. // ---- VK_EXT_line_rasterization extension commands
  4203. if (!strcmp("vkCmdSetLineStippleEXT", name)) {
  4204. *addr = (void *)CmdSetLineStippleEXT;
  4205. return true;
  4206. }
  4207. // ---- VK_EXT_host_query_reset extension commands
  4208. if (!strcmp("vkResetQueryPoolEXT", name)) {
  4209. *addr = (void *)ResetQueryPoolEXT;
  4210. return true;
  4211. }
  4212. // ---- VK_EXT_extended_dynamic_state extension commands
  4213. if (!strcmp("vkCmdSetCullModeEXT", name)) {
  4214. *addr = (void *)CmdSetCullModeEXT;
  4215. return true;
  4216. }
  4217. if (!strcmp("vkCmdSetFrontFaceEXT", name)) {
  4218. *addr = (void *)CmdSetFrontFaceEXT;
  4219. return true;
  4220. }
  4221. if (!strcmp("vkCmdSetPrimitiveTopologyEXT", name)) {
  4222. *addr = (void *)CmdSetPrimitiveTopologyEXT;
  4223. return true;
  4224. }
  4225. if (!strcmp("vkCmdSetViewportWithCountEXT", name)) {
  4226. *addr = (void *)CmdSetViewportWithCountEXT;
  4227. return true;
  4228. }
  4229. if (!strcmp("vkCmdSetScissorWithCountEXT", name)) {
  4230. *addr = (void *)CmdSetScissorWithCountEXT;
  4231. return true;
  4232. }
  4233. if (!strcmp("vkCmdBindVertexBuffers2EXT", name)) {
  4234. *addr = (void *)CmdBindVertexBuffers2EXT;
  4235. return true;
  4236. }
  4237. if (!strcmp("vkCmdSetDepthTestEnableEXT", name)) {
  4238. *addr = (void *)CmdSetDepthTestEnableEXT;
  4239. return true;
  4240. }
  4241. if (!strcmp("vkCmdSetDepthWriteEnableEXT", name)) {
  4242. *addr = (void *)CmdSetDepthWriteEnableEXT;
  4243. return true;
  4244. }
  4245. if (!strcmp("vkCmdSetDepthCompareOpEXT", name)) {
  4246. *addr = (void *)CmdSetDepthCompareOpEXT;
  4247. return true;
  4248. }
  4249. if (!strcmp("vkCmdSetDepthBoundsTestEnableEXT", name)) {
  4250. *addr = (void *)CmdSetDepthBoundsTestEnableEXT;
  4251. return true;
  4252. }
  4253. if (!strcmp("vkCmdSetStencilTestEnableEXT", name)) {
  4254. *addr = (void *)CmdSetStencilTestEnableEXT;
  4255. return true;
  4256. }
  4257. if (!strcmp("vkCmdSetStencilOpEXT", name)) {
  4258. *addr = (void *)CmdSetStencilOpEXT;
  4259. return true;
  4260. }
  4261. // ---- VK_NV_device_generated_commands extension commands
  4262. if (!strcmp("vkGetGeneratedCommandsMemoryRequirementsNV", name)) {
  4263. *addr = (void *)GetGeneratedCommandsMemoryRequirementsNV;
  4264. return true;
  4265. }
  4266. if (!strcmp("vkCmdPreprocessGeneratedCommandsNV", name)) {
  4267. *addr = (void *)CmdPreprocessGeneratedCommandsNV;
  4268. return true;
  4269. }
  4270. if (!strcmp("vkCmdExecuteGeneratedCommandsNV", name)) {
  4271. *addr = (void *)CmdExecuteGeneratedCommandsNV;
  4272. return true;
  4273. }
  4274. if (!strcmp("vkCmdBindPipelineShaderGroupNV", name)) {
  4275. *addr = (void *)CmdBindPipelineShaderGroupNV;
  4276. return true;
  4277. }
  4278. if (!strcmp("vkCreateIndirectCommandsLayoutNV", name)) {
  4279. *addr = (void *)CreateIndirectCommandsLayoutNV;
  4280. return true;
  4281. }
  4282. if (!strcmp("vkDestroyIndirectCommandsLayoutNV", name)) {
  4283. *addr = (void *)DestroyIndirectCommandsLayoutNV;
  4284. return true;
  4285. }
  4286. // ---- VK_EXT_private_data extension commands
  4287. if (!strcmp("vkCreatePrivateDataSlotEXT", name)) {
  4288. *addr = (void *)CreatePrivateDataSlotEXT;
  4289. return true;
  4290. }
  4291. if (!strcmp("vkDestroyPrivateDataSlotEXT", name)) {
  4292. *addr = (void *)DestroyPrivateDataSlotEXT;
  4293. return true;
  4294. }
  4295. if (!strcmp("vkSetPrivateDataEXT", name)) {
  4296. *addr = (void *)SetPrivateDataEXT;
  4297. return true;
  4298. }
  4299. if (!strcmp("vkGetPrivateDataEXT", name)) {
  4300. *addr = (void *)GetPrivateDataEXT;
  4301. return true;
  4302. }
  4303. // ---- VK_NV_fragment_shading_rate_enums extension commands
  4304. if (!strcmp("vkCmdSetFragmentShadingRateEnumNV", name)) {
  4305. *addr = (void *)CmdSetFragmentShadingRateEnumNV;
  4306. return true;
  4307. }
  4308. // ---- VK_KHR_acceleration_structure extension commands
  4309. if (!strcmp("vkCreateAccelerationStructureKHR", name)) {
  4310. *addr = (void *)CreateAccelerationStructureKHR;
  4311. return true;
  4312. }
  4313. if (!strcmp("vkDestroyAccelerationStructureKHR", name)) {
  4314. *addr = (void *)DestroyAccelerationStructureKHR;
  4315. return true;
  4316. }
  4317. if (!strcmp("vkCmdBuildAccelerationStructuresKHR", name)) {
  4318. *addr = (void *)CmdBuildAccelerationStructuresKHR;
  4319. return true;
  4320. }
  4321. if (!strcmp("vkCmdBuildAccelerationStructuresIndirectKHR", name)) {
  4322. *addr = (void *)CmdBuildAccelerationStructuresIndirectKHR;
  4323. return true;
  4324. }
  4325. if (!strcmp("vkBuildAccelerationStructuresKHR", name)) {
  4326. *addr = (void *)BuildAccelerationStructuresKHR;
  4327. return true;
  4328. }
  4329. if (!strcmp("vkCopyAccelerationStructureKHR", name)) {
  4330. *addr = (void *)CopyAccelerationStructureKHR;
  4331. return true;
  4332. }
  4333. if (!strcmp("vkCopyAccelerationStructureToMemoryKHR", name)) {
  4334. *addr = (void *)CopyAccelerationStructureToMemoryKHR;
  4335. return true;
  4336. }
  4337. if (!strcmp("vkCopyMemoryToAccelerationStructureKHR", name)) {
  4338. *addr = (void *)CopyMemoryToAccelerationStructureKHR;
  4339. return true;
  4340. }
  4341. if (!strcmp("vkWriteAccelerationStructuresPropertiesKHR", name)) {
  4342. *addr = (void *)WriteAccelerationStructuresPropertiesKHR;
  4343. return true;
  4344. }
  4345. if (!strcmp("vkCmdCopyAccelerationStructureKHR", name)) {
  4346. *addr = (void *)CmdCopyAccelerationStructureKHR;
  4347. return true;
  4348. }
  4349. if (!strcmp("vkCmdCopyAccelerationStructureToMemoryKHR", name)) {
  4350. *addr = (void *)CmdCopyAccelerationStructureToMemoryKHR;
  4351. return true;
  4352. }
  4353. if (!strcmp("vkCmdCopyMemoryToAccelerationStructureKHR", name)) {
  4354. *addr = (void *)CmdCopyMemoryToAccelerationStructureKHR;
  4355. return true;
  4356. }
  4357. if (!strcmp("vkGetAccelerationStructureDeviceAddressKHR", name)) {
  4358. *addr = (void *)GetAccelerationStructureDeviceAddressKHR;
  4359. return true;
  4360. }
  4361. if (!strcmp("vkCmdWriteAccelerationStructuresPropertiesKHR", name)) {
  4362. *addr = (void *)CmdWriteAccelerationStructuresPropertiesKHR;
  4363. return true;
  4364. }
  4365. if (!strcmp("vkGetDeviceAccelerationStructureCompatibilityKHR", name)) {
  4366. *addr = (void *)GetDeviceAccelerationStructureCompatibilityKHR;
  4367. return true;
  4368. }
  4369. if (!strcmp("vkGetAccelerationStructureBuildSizesKHR", name)) {
  4370. *addr = (void *)GetAccelerationStructureBuildSizesKHR;
  4371. return true;
  4372. }
  4373. // ---- VK_KHR_ray_tracing_pipeline extension commands
  4374. if (!strcmp("vkCmdTraceRaysKHR", name)) {
  4375. *addr = (void *)CmdTraceRaysKHR;
  4376. return true;
  4377. }
  4378. if (!strcmp("vkCreateRayTracingPipelinesKHR", name)) {
  4379. *addr = (void *)CreateRayTracingPipelinesKHR;
  4380. return true;
  4381. }
  4382. if (!strcmp("vkGetRayTracingCaptureReplayShaderGroupHandlesKHR", name)) {
  4383. *addr = (void *)GetRayTracingCaptureReplayShaderGroupHandlesKHR;
  4384. return true;
  4385. }
  4386. if (!strcmp("vkCmdTraceRaysIndirectKHR", name)) {
  4387. *addr = (void *)CmdTraceRaysIndirectKHR;
  4388. return true;
  4389. }
  4390. if (!strcmp("vkGetRayTracingShaderGroupStackSizeKHR", name)) {
  4391. *addr = (void *)GetRayTracingShaderGroupStackSizeKHR;
  4392. return true;
  4393. }
  4394. if (!strcmp("vkCmdSetRayTracingPipelineStackSizeKHR", name)) {
  4395. *addr = (void *)CmdSetRayTracingPipelineStackSizeKHR;
  4396. return true;
  4397. }
  4398. return false;
  4399. }
  4400. // A function that can be used to query enabled extensions during a vkCreateInstance call
  4401. void extensions_create_instance(struct loader_instance *ptr_instance, const VkInstanceCreateInfo *pCreateInfo) {
  4402. for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
  4403. // ---- VK_KHR_get_physical_device_properties2 extension commands
  4404. if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)) {
  4405. ptr_instance->enabled_known_extensions.khr_get_physical_device_properties2 = 1;
  4406. // ---- VK_KHR_device_group_creation extension commands
  4407. } else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME)) {
  4408. ptr_instance->enabled_known_extensions.khr_device_group_creation = 1;
  4409. // ---- VK_KHR_external_memory_capabilities extension commands
  4410. } else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME)) {
  4411. ptr_instance->enabled_known_extensions.khr_external_memory_capabilities = 1;
  4412. // ---- VK_KHR_external_semaphore_capabilities extension commands
  4413. } else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME)) {
  4414. ptr_instance->enabled_known_extensions.khr_external_semaphore_capabilities = 1;
  4415. // ---- VK_KHR_external_fence_capabilities extension commands
  4416. } else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME)) {
  4417. ptr_instance->enabled_known_extensions.khr_external_fence_capabilities = 1;
  4418. // ---- VK_NV_external_memory_capabilities extension commands
  4419. } else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME)) {
  4420. ptr_instance->enabled_known_extensions.nv_external_memory_capabilities = 1;
  4421. // ---- VK_NN_vi_surface extension commands
  4422. #ifdef VK_USE_PLATFORM_VI_NN
  4423. } else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_NN_VI_SURFACE_EXTENSION_NAME)) {
  4424. ptr_instance->enabled_known_extensions.nn_vi_surface = 1;
  4425. #endif // VK_USE_PLATFORM_VI_NN
  4426. // ---- VK_EXT_direct_mode_display extension commands
  4427. } else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME)) {
  4428. ptr_instance->enabled_known_extensions.ext_direct_mode_display = 1;
  4429. // ---- VK_EXT_acquire_xlib_display extension commands
  4430. #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
  4431. } else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME)) {
  4432. ptr_instance->enabled_known_extensions.ext_acquire_xlib_display = 1;
  4433. #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
  4434. // ---- VK_EXT_display_surface_counter extension commands
  4435. } else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME)) {
  4436. ptr_instance->enabled_known_extensions.ext_display_surface_counter = 1;
  4437. // ---- VK_EXT_debug_utils extension commands
  4438. } else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_EXT_DEBUG_UTILS_EXTENSION_NAME)) {
  4439. ptr_instance->enabled_known_extensions.ext_debug_utils = 1;
  4440. }
  4441. }
  4442. }
  4443. // Some device commands still need a terminator because the loader needs to unwrap something about them.
  4444. // In many cases, the item needing unwrapping is a VkPhysicalDevice or VkSurfaceKHR object. But there may be other items
  4445. // in the future.
  4446. PFN_vkVoidFunction get_extension_device_proc_terminator(struct loader_device *dev, const char *pName) {
  4447. PFN_vkVoidFunction addr = NULL;
  4448. // ---- VK_KHR_swapchain extension commands
  4449. if (dev->extensions.khr_swapchain_enabled) {
  4450. if(!strcmp(pName, "vkCreateSwapchainKHR")) {
  4451. addr = (PFN_vkVoidFunction)terminator_CreateSwapchainKHR;
  4452. } else if(!strcmp(pName, "vkGetDeviceGroupSurfacePresentModesKHR")) {
  4453. addr = (PFN_vkVoidFunction)terminator_GetDeviceGroupSurfacePresentModesKHR;
  4454. }
  4455. }
  4456. // ---- VK_KHR_display_swapchain extension commands
  4457. if (dev->extensions.khr_display_swapchain_enabled) {
  4458. if(!strcmp(pName, "vkCreateSharedSwapchainsKHR")) {
  4459. addr = (PFN_vkVoidFunction)terminator_CreateSharedSwapchainsKHR;
  4460. }
  4461. }
  4462. // ---- VK_EXT_debug_marker extension commands
  4463. if (dev->extensions.ext_debug_marker_enabled) {
  4464. if(!strcmp(pName, "vkDebugMarkerSetObjectTagEXT")) {
  4465. addr = (PFN_vkVoidFunction)terminator_DebugMarkerSetObjectTagEXT;
  4466. } else if(!strcmp(pName, "vkDebugMarkerSetObjectNameEXT")) {
  4467. addr = (PFN_vkVoidFunction)terminator_DebugMarkerSetObjectNameEXT;
  4468. }
  4469. }
  4470. // ---- VK_EXT_debug_utils extension commands
  4471. if (dev->extensions.ext_debug_utils_enabled) {
  4472. if(!strcmp(pName, "vkSetDebugUtilsObjectNameEXT")) {
  4473. addr = (PFN_vkVoidFunction)terminator_SetDebugUtilsObjectNameEXT;
  4474. } else if(!strcmp(pName, "vkSetDebugUtilsObjectTagEXT")) {
  4475. addr = (PFN_vkVoidFunction)terminator_SetDebugUtilsObjectTagEXT;
  4476. } else if(!strcmp(pName, "vkQueueBeginDebugUtilsLabelEXT")) {
  4477. addr = (PFN_vkVoidFunction)terminator_QueueBeginDebugUtilsLabelEXT;
  4478. } else if(!strcmp(pName, "vkQueueEndDebugUtilsLabelEXT")) {
  4479. addr = (PFN_vkVoidFunction)terminator_QueueEndDebugUtilsLabelEXT;
  4480. } else if(!strcmp(pName, "vkQueueInsertDebugUtilsLabelEXT")) {
  4481. addr = (PFN_vkVoidFunction)terminator_QueueInsertDebugUtilsLabelEXT;
  4482. } else if(!strcmp(pName, "vkCmdBeginDebugUtilsLabelEXT")) {
  4483. addr = (PFN_vkVoidFunction)terminator_CmdBeginDebugUtilsLabelEXT;
  4484. } else if(!strcmp(pName, "vkCmdEndDebugUtilsLabelEXT")) {
  4485. addr = (PFN_vkVoidFunction)terminator_CmdEndDebugUtilsLabelEXT;
  4486. } else if(!strcmp(pName, "vkCmdInsertDebugUtilsLabelEXT")) {
  4487. addr = (PFN_vkVoidFunction)terminator_CmdInsertDebugUtilsLabelEXT;
  4488. }
  4489. }
  4490. #ifdef VK_USE_PLATFORM_WIN32_KHR
  4491. // ---- VK_EXT_full_screen_exclusive extension commands
  4492. if (dev->extensions.ext_full_screen_exclusive_enabled && dev->extensions.khr_device_group_enabled) {
  4493. if(!strcmp(pName, "vkGetDeviceGroupSurfacePresentModes2EXT")) {
  4494. addr = (PFN_vkVoidFunction)terminator_GetDeviceGroupSurfacePresentModes2EXT;
  4495. }
  4496. }
  4497. #endif // None
  4498. return addr;
  4499. }
  4500. // This table contains the loader's instance dispatch table, which contains
  4501. // default functions if no instance layers are activated. This contains
  4502. // pointers to "terminator functions".
  4503. const VkLayerInstanceDispatchTable instance_disp = {
  4504. // ---- Core 1_0 commands
  4505. .DestroyInstance = terminator_DestroyInstance,
  4506. .EnumeratePhysicalDevices = terminator_EnumeratePhysicalDevices,
  4507. .GetPhysicalDeviceFeatures = terminator_GetPhysicalDeviceFeatures,
  4508. .GetPhysicalDeviceFormatProperties = terminator_GetPhysicalDeviceFormatProperties,
  4509. .GetPhysicalDeviceImageFormatProperties = terminator_GetPhysicalDeviceImageFormatProperties,
  4510. .GetPhysicalDeviceProperties = terminator_GetPhysicalDeviceProperties,
  4511. .GetPhysicalDeviceQueueFamilyProperties = terminator_GetPhysicalDeviceQueueFamilyProperties,
  4512. .GetPhysicalDeviceMemoryProperties = terminator_GetPhysicalDeviceMemoryProperties,
  4513. .GetInstanceProcAddr = vkGetInstanceProcAddr,
  4514. .EnumerateDeviceExtensionProperties = terminator_EnumerateDeviceExtensionProperties,
  4515. .EnumerateDeviceLayerProperties = terminator_EnumerateDeviceLayerProperties,
  4516. .GetPhysicalDeviceSparseImageFormatProperties = terminator_GetPhysicalDeviceSparseImageFormatProperties,
  4517. // ---- Core 1_1 commands
  4518. .EnumeratePhysicalDeviceGroups = terminator_EnumeratePhysicalDeviceGroups,
  4519. .GetPhysicalDeviceFeatures2 = terminator_GetPhysicalDeviceFeatures2,
  4520. .GetPhysicalDeviceProperties2 = terminator_GetPhysicalDeviceProperties2,
  4521. .GetPhysicalDeviceFormatProperties2 = terminator_GetPhysicalDeviceFormatProperties2,
  4522. .GetPhysicalDeviceImageFormatProperties2 = terminator_GetPhysicalDeviceImageFormatProperties2,
  4523. .GetPhysicalDeviceQueueFamilyProperties2 = terminator_GetPhysicalDeviceQueueFamilyProperties2,
  4524. .GetPhysicalDeviceMemoryProperties2 = terminator_GetPhysicalDeviceMemoryProperties2,
  4525. .GetPhysicalDeviceSparseImageFormatProperties2 = terminator_GetPhysicalDeviceSparseImageFormatProperties2,
  4526. .GetPhysicalDeviceExternalBufferProperties = terminator_GetPhysicalDeviceExternalBufferProperties,
  4527. .GetPhysicalDeviceExternalFenceProperties = terminator_GetPhysicalDeviceExternalFenceProperties,
  4528. .GetPhysicalDeviceExternalSemaphoreProperties = terminator_GetPhysicalDeviceExternalSemaphoreProperties,
  4529. // ---- VK_KHR_surface extension commands
  4530. .DestroySurfaceKHR = terminator_DestroySurfaceKHR,
  4531. .GetPhysicalDeviceSurfaceSupportKHR = terminator_GetPhysicalDeviceSurfaceSupportKHR,
  4532. .GetPhysicalDeviceSurfaceCapabilitiesKHR = terminator_GetPhysicalDeviceSurfaceCapabilitiesKHR,
  4533. .GetPhysicalDeviceSurfaceFormatsKHR = terminator_GetPhysicalDeviceSurfaceFormatsKHR,
  4534. .GetPhysicalDeviceSurfacePresentModesKHR = terminator_GetPhysicalDeviceSurfacePresentModesKHR,
  4535. // ---- VK_KHR_swapchain extension commands
  4536. .GetPhysicalDevicePresentRectanglesKHR = terminator_GetPhysicalDevicePresentRectanglesKHR,
  4537. // ---- VK_KHR_display extension commands
  4538. .GetPhysicalDeviceDisplayPropertiesKHR = terminator_GetPhysicalDeviceDisplayPropertiesKHR,
  4539. .GetPhysicalDeviceDisplayPlanePropertiesKHR = terminator_GetPhysicalDeviceDisplayPlanePropertiesKHR,
  4540. .GetDisplayPlaneSupportedDisplaysKHR = terminator_GetDisplayPlaneSupportedDisplaysKHR,
  4541. .GetDisplayModePropertiesKHR = terminator_GetDisplayModePropertiesKHR,
  4542. .CreateDisplayModeKHR = terminator_CreateDisplayModeKHR,
  4543. .GetDisplayPlaneCapabilitiesKHR = terminator_GetDisplayPlaneCapabilitiesKHR,
  4544. .CreateDisplayPlaneSurfaceKHR = terminator_CreateDisplayPlaneSurfaceKHR,
  4545. // ---- VK_KHR_xlib_surface extension commands
  4546. #ifdef VK_USE_PLATFORM_XLIB_KHR
  4547. .CreateXlibSurfaceKHR = terminator_CreateXlibSurfaceKHR,
  4548. #endif // VK_USE_PLATFORM_XLIB_KHR
  4549. #ifdef VK_USE_PLATFORM_XLIB_KHR
  4550. .GetPhysicalDeviceXlibPresentationSupportKHR = terminator_GetPhysicalDeviceXlibPresentationSupportKHR,
  4551. #endif // VK_USE_PLATFORM_XLIB_KHR
  4552. // ---- VK_KHR_xcb_surface extension commands
  4553. #ifdef VK_USE_PLATFORM_XCB_KHR
  4554. .CreateXcbSurfaceKHR = terminator_CreateXcbSurfaceKHR,
  4555. #endif // VK_USE_PLATFORM_XCB_KHR
  4556. #ifdef VK_USE_PLATFORM_XCB_KHR
  4557. .GetPhysicalDeviceXcbPresentationSupportKHR = terminator_GetPhysicalDeviceXcbPresentationSupportKHR,
  4558. #endif // VK_USE_PLATFORM_XCB_KHR
  4559. // ---- VK_KHR_wayland_surface extension commands
  4560. #ifdef VK_USE_PLATFORM_WAYLAND_KHR
  4561. .CreateWaylandSurfaceKHR = terminator_CreateWaylandSurfaceKHR,
  4562. #endif // VK_USE_PLATFORM_WAYLAND_KHR
  4563. #ifdef VK_USE_PLATFORM_WAYLAND_KHR
  4564. .GetPhysicalDeviceWaylandPresentationSupportKHR = terminator_GetPhysicalDeviceWaylandPresentationSupportKHR,
  4565. #endif // VK_USE_PLATFORM_WAYLAND_KHR
  4566. // ---- VK_KHR_android_surface extension commands
  4567. #ifdef VK_USE_PLATFORM_ANDROID_KHR
  4568. .CreateAndroidSurfaceKHR = terminator_CreateAndroidSurfaceKHR,
  4569. #endif // VK_USE_PLATFORM_ANDROID_KHR
  4570. // ---- VK_KHR_win32_surface extension commands
  4571. #ifdef VK_USE_PLATFORM_WIN32_KHR
  4572. .CreateWin32SurfaceKHR = terminator_CreateWin32SurfaceKHR,
  4573. #endif // VK_USE_PLATFORM_WIN32_KHR
  4574. #ifdef VK_USE_PLATFORM_WIN32_KHR
  4575. .GetPhysicalDeviceWin32PresentationSupportKHR = terminator_GetPhysicalDeviceWin32PresentationSupportKHR,
  4576. #endif // VK_USE_PLATFORM_WIN32_KHR
  4577. // ---- VK_KHR_get_physical_device_properties2 extension commands
  4578. .GetPhysicalDeviceFeatures2KHR = terminator_GetPhysicalDeviceFeatures2,
  4579. .GetPhysicalDeviceProperties2KHR = terminator_GetPhysicalDeviceProperties2,
  4580. .GetPhysicalDeviceFormatProperties2KHR = terminator_GetPhysicalDeviceFormatProperties2,
  4581. .GetPhysicalDeviceImageFormatProperties2KHR = terminator_GetPhysicalDeviceImageFormatProperties2,
  4582. .GetPhysicalDeviceQueueFamilyProperties2KHR = terminator_GetPhysicalDeviceQueueFamilyProperties2,
  4583. .GetPhysicalDeviceMemoryProperties2KHR = terminator_GetPhysicalDeviceMemoryProperties2,
  4584. .GetPhysicalDeviceSparseImageFormatProperties2KHR = terminator_GetPhysicalDeviceSparseImageFormatProperties2,
  4585. // ---- VK_KHR_device_group_creation extension commands
  4586. .EnumeratePhysicalDeviceGroupsKHR = terminator_EnumeratePhysicalDeviceGroups,
  4587. // ---- VK_KHR_external_memory_capabilities extension commands
  4588. .GetPhysicalDeviceExternalBufferPropertiesKHR = terminator_GetPhysicalDeviceExternalBufferProperties,
  4589. // ---- VK_KHR_external_semaphore_capabilities extension commands
  4590. .GetPhysicalDeviceExternalSemaphorePropertiesKHR = terminator_GetPhysicalDeviceExternalSemaphoreProperties,
  4591. // ---- VK_KHR_external_fence_capabilities extension commands
  4592. .GetPhysicalDeviceExternalFencePropertiesKHR = terminator_GetPhysicalDeviceExternalFenceProperties,
  4593. // ---- VK_KHR_performance_query extension commands
  4594. .EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = terminator_EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR,
  4595. .GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = terminator_GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR,
  4596. // ---- VK_KHR_get_surface_capabilities2 extension commands
  4597. .GetPhysicalDeviceSurfaceCapabilities2KHR = terminator_GetPhysicalDeviceSurfaceCapabilities2KHR,
  4598. .GetPhysicalDeviceSurfaceFormats2KHR = terminator_GetPhysicalDeviceSurfaceFormats2KHR,
  4599. // ---- VK_KHR_get_display_properties2 extension commands
  4600. .GetPhysicalDeviceDisplayProperties2KHR = terminator_GetPhysicalDeviceDisplayProperties2KHR,
  4601. .GetPhysicalDeviceDisplayPlaneProperties2KHR = terminator_GetPhysicalDeviceDisplayPlaneProperties2KHR,
  4602. .GetDisplayModeProperties2KHR = terminator_GetDisplayModeProperties2KHR,
  4603. .GetDisplayPlaneCapabilities2KHR = terminator_GetDisplayPlaneCapabilities2KHR,
  4604. // ---- VK_KHR_fragment_shading_rate extension commands
  4605. .GetPhysicalDeviceFragmentShadingRatesKHR = terminator_GetPhysicalDeviceFragmentShadingRatesKHR,
  4606. // ---- VK_EXT_debug_report extension commands
  4607. .CreateDebugReportCallbackEXT = terminator_CreateDebugReportCallbackEXT,
  4608. .DestroyDebugReportCallbackEXT = terminator_DestroyDebugReportCallbackEXT,
  4609. .DebugReportMessageEXT = terminator_DebugReportMessageEXT,
  4610. // ---- VK_GGP_stream_descriptor_surface extension commands
  4611. #ifdef VK_USE_PLATFORM_GGP
  4612. .CreateStreamDescriptorSurfaceGGP = terminator_CreateStreamDescriptorSurfaceGGP,
  4613. #endif // VK_USE_PLATFORM_GGP
  4614. // ---- VK_NV_external_memory_capabilities extension commands
  4615. .GetPhysicalDeviceExternalImageFormatPropertiesNV = terminator_GetPhysicalDeviceExternalImageFormatPropertiesNV,
  4616. // ---- VK_NN_vi_surface extension commands
  4617. #ifdef VK_USE_PLATFORM_VI_NN
  4618. .CreateViSurfaceNN = terminator_CreateViSurfaceNN,
  4619. #endif // VK_USE_PLATFORM_VI_NN
  4620. // ---- VK_EXT_direct_mode_display extension commands
  4621. .ReleaseDisplayEXT = terminator_ReleaseDisplayEXT,
  4622. // ---- VK_EXT_acquire_xlib_display extension commands
  4623. #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
  4624. .AcquireXlibDisplayEXT = terminator_AcquireXlibDisplayEXT,
  4625. #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
  4626. #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
  4627. .GetRandROutputDisplayEXT = terminator_GetRandROutputDisplayEXT,
  4628. #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
  4629. // ---- VK_EXT_display_surface_counter extension commands
  4630. .GetPhysicalDeviceSurfaceCapabilities2EXT = terminator_GetPhysicalDeviceSurfaceCapabilities2EXT,
  4631. // ---- VK_MVK_ios_surface extension commands
  4632. #ifdef VK_USE_PLATFORM_IOS_MVK
  4633. .CreateIOSSurfaceMVK = terminator_CreateIOSSurfaceMVK,
  4634. #endif // VK_USE_PLATFORM_IOS_MVK
  4635. // ---- VK_MVK_macos_surface extension commands
  4636. #ifdef VK_USE_PLATFORM_MACOS_MVK
  4637. .CreateMacOSSurfaceMVK = terminator_CreateMacOSSurfaceMVK,
  4638. #endif // VK_USE_PLATFORM_MACOS_MVK
  4639. // ---- VK_EXT_debug_utils extension commands
  4640. .CreateDebugUtilsMessengerEXT = terminator_CreateDebugUtilsMessengerEXT,
  4641. .DestroyDebugUtilsMessengerEXT = terminator_DestroyDebugUtilsMessengerEXT,
  4642. .SubmitDebugUtilsMessageEXT = terminator_SubmitDebugUtilsMessageEXT,
  4643. // ---- VK_EXT_sample_locations extension commands
  4644. .GetPhysicalDeviceMultisamplePropertiesEXT = terminator_GetPhysicalDeviceMultisamplePropertiesEXT,
  4645. // ---- VK_EXT_calibrated_timestamps extension commands
  4646. .GetPhysicalDeviceCalibrateableTimeDomainsEXT = terminator_GetPhysicalDeviceCalibrateableTimeDomainsEXT,
  4647. // ---- VK_FUCHSIA_imagepipe_surface extension commands
  4648. #ifdef VK_USE_PLATFORM_FUCHSIA
  4649. .CreateImagePipeSurfaceFUCHSIA = terminator_CreateImagePipeSurfaceFUCHSIA,
  4650. #endif // VK_USE_PLATFORM_FUCHSIA
  4651. // ---- VK_EXT_metal_surface extension commands
  4652. #ifdef VK_USE_PLATFORM_METAL_EXT
  4653. .CreateMetalSurfaceEXT = terminator_CreateMetalSurfaceEXT,
  4654. #endif // VK_USE_PLATFORM_METAL_EXT
  4655. // ---- VK_EXT_tooling_info extension commands
  4656. .GetPhysicalDeviceToolPropertiesEXT = terminator_GetPhysicalDeviceToolPropertiesEXT,
  4657. // ---- VK_NV_cooperative_matrix extension commands
  4658. .GetPhysicalDeviceCooperativeMatrixPropertiesNV = terminator_GetPhysicalDeviceCooperativeMatrixPropertiesNV,
  4659. // ---- VK_NV_coverage_reduction_mode extension commands
  4660. .GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = terminator_GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV,
  4661. // ---- VK_EXT_full_screen_exclusive extension commands
  4662. #ifdef VK_USE_PLATFORM_WIN32_KHR
  4663. .GetPhysicalDeviceSurfacePresentModes2EXT = terminator_GetPhysicalDeviceSurfacePresentModes2EXT,
  4664. #endif // VK_USE_PLATFORM_WIN32_KHR
  4665. // ---- VK_EXT_headless_surface extension commands
  4666. .CreateHeadlessSurfaceEXT = terminator_CreateHeadlessSurfaceEXT,
  4667. // ---- VK_EXT_directfb_surface extension commands
  4668. #ifdef VK_USE_PLATFORM_DIRECTFB_EXT
  4669. .CreateDirectFBSurfaceEXT = terminator_CreateDirectFBSurfaceEXT,
  4670. #endif // VK_USE_PLATFORM_DIRECTFB_EXT
  4671. #ifdef VK_USE_PLATFORM_DIRECTFB_EXT
  4672. .GetPhysicalDeviceDirectFBPresentationSupportEXT = terminator_GetPhysicalDeviceDirectFBPresentationSupportEXT,
  4673. #endif // VK_USE_PLATFORM_DIRECTFB_EXT
  4674. };
  4675. // A null-terminated list of all of the instance extensions supported by the loader.
  4676. // If an instance extension name is not in this list, but it is exported by one or more of the
  4677. // ICDs detected by the loader, then the extension name not in the list will be filtered out
  4678. // before passing the list of extensions to the application.
  4679. const char *const LOADER_INSTANCE_EXTENSIONS[] = {
  4680. VK_KHR_SURFACE_EXTENSION_NAME,
  4681. VK_KHR_DISPLAY_EXTENSION_NAME,
  4682. #ifdef VK_USE_PLATFORM_XLIB_KHR
  4683. VK_KHR_XLIB_SURFACE_EXTENSION_NAME,
  4684. #endif // VK_USE_PLATFORM_XLIB_KHR
  4685. #ifdef VK_USE_PLATFORM_XCB_KHR
  4686. VK_KHR_XCB_SURFACE_EXTENSION_NAME,
  4687. #endif // VK_USE_PLATFORM_XCB_KHR
  4688. #ifdef VK_USE_PLATFORM_WAYLAND_KHR
  4689. VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME,
  4690. #endif // VK_USE_PLATFORM_WAYLAND_KHR
  4691. #ifdef VK_USE_PLATFORM_WIN32_KHR
  4692. VK_KHR_WIN32_SURFACE_EXTENSION_NAME,
  4693. #endif // VK_USE_PLATFORM_WIN32_KHR
  4694. VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME,
  4695. VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME,
  4696. VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME,
  4697. VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME,
  4698. VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME,
  4699. VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME,
  4700. VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME,
  4701. VK_KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME,
  4702. VK_EXT_DEBUG_REPORT_EXTENSION_NAME,
  4703. #ifdef VK_USE_PLATFORM_GGP
  4704. VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME,
  4705. #endif // VK_USE_PLATFORM_GGP
  4706. VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME,
  4707. VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME,
  4708. #ifdef VK_USE_PLATFORM_VI_NN
  4709. VK_NN_VI_SURFACE_EXTENSION_NAME,
  4710. #endif // VK_USE_PLATFORM_VI_NN
  4711. VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME,
  4712. #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
  4713. VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME,
  4714. #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
  4715. VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME,
  4716. VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME,
  4717. #ifdef VK_USE_PLATFORM_IOS_MVK
  4718. VK_MVK_IOS_SURFACE_EXTENSION_NAME,
  4719. #endif // VK_USE_PLATFORM_IOS_MVK
  4720. #ifdef VK_USE_PLATFORM_MACOS_MVK
  4721. VK_MVK_MACOS_SURFACE_EXTENSION_NAME,
  4722. #endif // VK_USE_PLATFORM_MACOS_MVK
  4723. VK_EXT_DEBUG_UTILS_EXTENSION_NAME,
  4724. #ifdef VK_USE_PLATFORM_FUCHSIA
  4725. VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME,
  4726. #endif // VK_USE_PLATFORM_FUCHSIA
  4727. #ifdef VK_USE_PLATFORM_METAL_EXT
  4728. VK_EXT_METAL_SURFACE_EXTENSION_NAME,
  4729. #endif // VK_USE_PLATFORM_METAL_EXT
  4730. VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME,
  4731. VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME,
  4732. #ifdef VK_USE_PLATFORM_DIRECTFB_EXT
  4733. VK_EXT_DIRECTFB_SURFACE_EXTENSION_NAME,
  4734. #endif // VK_USE_PLATFORM_DIRECTFB_EXT
  4735. NULL };