[{"data":1,"prerenderedAt":1580},["ShallowReactive",2],{"Jo54Fw6aYR":3},{"title":4,"description":5,"parent":6,"cmd_buf_level":7,"render_pass_scope":10,"supported_queue_types":11,"tasks":14,"type":16,"xrefs":17,"body":18,"_type":1579,"_id":4},"vkCmdPushDescriptorSetWithTemplateKHR","Pushes descriptor updates into a command buffer using a descriptor update template","VK_KHR_push_descriptor, VK_KHR_descriptor_update_template",[8,9],"primary","secondary","both",[12,13],"graphics","compute",[15],"state","protos",[],{"type":19,"children":20,"toc":1577},"root",[21,29,341,439,679,860,1571],{"type":22,"tag":23,"props":24,"children":25},"element","p",{},[26],{"type":27,"value":28},"text","It is also possible to use a descriptor update template to specify the push\ndescriptors to update.\nTo do so, call:",{"type":22,"tag":30,"props":31,"children":32},"code-group",{},[33,168],{"type":22,"tag":34,"props":35,"children":41},"pre",{"className":36,"code":37,"filename":38,"language":39,"meta":40,"style":40},"language-c shiki shiki-themes github-light-default github-dark-default","void vkCmdPushDescriptorSetWithTemplateKHR(\n VkCommandBuffer commandBuffer,\n VkDescriptorUpdateTemplate descriptorUpdateTemplate,\n VkPipelineLayout layout,\n uint32_t set,\n const void* pData);\n","C","c","",[42],{"type":22,"tag":43,"props":44,"children":45},"code",{"__ignoreMap":40},[46,70,90,108,126,144],{"type":22,"tag":47,"props":48,"children":51},"span",{"class":49,"line":50},"line",1,[52,58,64],{"type":22,"tag":47,"props":53,"children":55},{"style":54},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[56],{"type":27,"value":57},"void",{"type":22,"tag":47,"props":59,"children":61},{"style":60},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[62],{"type":27,"value":63}," vkCmdPushDescriptorSetWithTemplateKHR",{"type":22,"tag":47,"props":65,"children":67},{"style":66},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[68],{"type":27,"value":69},"(\n",{"type":22,"tag":47,"props":71,"children":73},{"class":49,"line":72},2,[74,79,85],{"type":22,"tag":47,"props":75,"children":76},{"style":66},[77],{"type":27,"value":78}," VkCommandBuffer ",{"type":22,"tag":47,"props":80,"children":82},{"style":81},"--shiki-default:#953800;--shiki-dark:#FFA657",[83],{"type":27,"value":84},"commandBuffer",{"type":22,"tag":47,"props":86,"children":87},{"style":66},[88],{"type":27,"value":89},",\n",{"type":22,"tag":47,"props":91,"children":93},{"class":49,"line":92},3,[94,99,104],{"type":22,"tag":47,"props":95,"children":96},{"style":66},[97],{"type":27,"value":98}," VkDescriptorUpdateTemplate ",{"type":22,"tag":47,"props":100,"children":101},{"style":81},[102],{"type":27,"value":103},"descriptorUpdateTemplate",{"type":22,"tag":47,"props":105,"children":106},{"style":66},[107],{"type":27,"value":89},{"type":22,"tag":47,"props":109,"children":111},{"class":49,"line":110},4,[112,117,122],{"type":22,"tag":47,"props":113,"children":114},{"style":66},[115],{"type":27,"value":116}," VkPipelineLayout ",{"type":22,"tag":47,"props":118,"children":119},{"style":81},[120],{"type":27,"value":121},"layout",{"type":22,"tag":47,"props":123,"children":124},{"style":66},[125],{"type":27,"value":89},{"type":22,"tag":47,"props":127,"children":129},{"class":49,"line":128},5,[130,135,140],{"type":22,"tag":47,"props":131,"children":132},{"style":54},[133],{"type":27,"value":134}," uint32_t",{"type":22,"tag":47,"props":136,"children":137},{"style":81},[138],{"type":27,"value":139}," set",{"type":22,"tag":47,"props":141,"children":142},{"style":66},[143],{"type":27,"value":89},{"type":22,"tag":47,"props":145,"children":147},{"class":49,"line":146},6,[148,153,158,163],{"type":22,"tag":47,"props":149,"children":150},{"style":54},[151],{"type":27,"value":152}," const",{"type":22,"tag":47,"props":154,"children":155},{"style":54},[156],{"type":27,"value":157}," void*",{"type":22,"tag":47,"props":159,"children":160},{"style":81},[161],{"type":27,"value":162}," pData",{"type":22,"tag":47,"props":164,"children":165},{"style":66},[166],{"type":27,"value":167},");\n",{"type":22,"tag":34,"props":169,"children":174},{"className":170,"code":171,"filename":172,"language":173,"meta":40,"style":40},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn cmd_push_descriptor_set_with_template_khr(\n command_buffer: vk::CommandBuffer,\n descriptor_update_template: vk::DescriptorUpdateTemplate,\n layout: vk::PipelineLayout,\n set: u32,\n p_data: *const c_void,\n);\n","Rust","rs",[175],{"type":22,"tag":43,"props":176,"children":177},{"__ignoreMap":40},[178,200,232,261,290,311,333],{"type":22,"tag":47,"props":179,"children":180},{"class":49,"line":50},[181,186,191,196],{"type":22,"tag":47,"props":182,"children":183},{"style":54},[184],{"type":27,"value":185},"pub",{"type":22,"tag":47,"props":187,"children":188},{"style":54},[189],{"type":27,"value":190}," fn",{"type":22,"tag":47,"props":192,"children":193},{"style":60},[194],{"type":27,"value":195}," cmd_push_descriptor_set_with_template_khr",{"type":22,"tag":47,"props":197,"children":198},{"style":66},[199],{"type":27,"value":69},{"type":22,"tag":47,"props":201,"children":202},{"class":49,"line":72},[203,208,213,218,223,228],{"type":22,"tag":47,"props":204,"children":205},{"style":66},[206],{"type":27,"value":207}," command_buffer",{"type":22,"tag":47,"props":209,"children":210},{"style":54},[211],{"type":27,"value":212},":",{"type":22,"tag":47,"props":214,"children":215},{"style":81},[216],{"type":27,"value":217}," vk",{"type":22,"tag":47,"props":219,"children":220},{"style":54},[221],{"type":27,"value":222},"::",{"type":22,"tag":47,"props":224,"children":225},{"style":81},[226],{"type":27,"value":227},"CommandBuffer",{"type":22,"tag":47,"props":229,"children":230},{"style":66},[231],{"type":27,"value":89},{"type":22,"tag":47,"props":233,"children":234},{"class":49,"line":92},[235,240,244,248,252,257],{"type":22,"tag":47,"props":236,"children":237},{"style":66},[238],{"type":27,"value":239}," descriptor_update_template",{"type":22,"tag":47,"props":241,"children":242},{"style":54},[243],{"type":27,"value":212},{"type":22,"tag":47,"props":245,"children":246},{"style":81},[247],{"type":27,"value":217},{"type":22,"tag":47,"props":249,"children":250},{"style":54},[251],{"type":27,"value":222},{"type":22,"tag":47,"props":253,"children":254},{"style":81},[255],{"type":27,"value":256},"DescriptorUpdateTemplate",{"type":22,"tag":47,"props":258,"children":259},{"style":66},[260],{"type":27,"value":89},{"type":22,"tag":47,"props":262,"children":263},{"class":49,"line":110},[264,269,273,277,281,286],{"type":22,"tag":47,"props":265,"children":266},{"style":66},[267],{"type":27,"value":268}," layout",{"type":22,"tag":47,"props":270,"children":271},{"style":54},[272],{"type":27,"value":212},{"type":22,"tag":47,"props":274,"children":275},{"style":81},[276],{"type":27,"value":217},{"type":22,"tag":47,"props":278,"children":279},{"style":54},[280],{"type":27,"value":222},{"type":22,"tag":47,"props":282,"children":283},{"style":81},[284],{"type":27,"value":285},"PipelineLayout",{"type":22,"tag":47,"props":287,"children":288},{"style":66},[289],{"type":27,"value":89},{"type":22,"tag":47,"props":291,"children":292},{"class":49,"line":128},[293,298,302,307],{"type":22,"tag":47,"props":294,"children":295},{"style":66},[296],{"type":27,"value":297}," set",{"type":22,"tag":47,"props":299,"children":300},{"style":54},[301],{"type":27,"value":212},{"type":22,"tag":47,"props":303,"children":304},{"style":81},[305],{"type":27,"value":306}," u32",{"type":22,"tag":47,"props":308,"children":309},{"style":66},[310],{"type":27,"value":89},{"type":22,"tag":47,"props":312,"children":313},{"class":49,"line":146},[314,319,323,328],{"type":22,"tag":47,"props":315,"children":316},{"style":66},[317],{"type":27,"value":318}," p_data",{"type":22,"tag":47,"props":320,"children":321},{"style":54},[322],{"type":27,"value":212},{"type":22,"tag":47,"props":324,"children":325},{"style":54},[326],{"type":27,"value":327}," *const",{"type":22,"tag":47,"props":329,"children":330},{"style":66},[331],{"type":27,"value":332}," c_void,\n",{"type":22,"tag":47,"props":334,"children":336},{"class":49,"line":335},7,[337],{"type":22,"tag":47,"props":338,"children":339},{"style":66},[340],{"type":27,"value":167},{"type":22,"tag":342,"props":343,"children":344},"ul",{},[345,356,374,407,429],{"type":22,"tag":346,"props":347,"children":348},"li",{},[349,354],{"type":22,"tag":43,"props":350,"children":352},{"className":351},[],[353],{"type":27,"value":84},{"type":27,"value":355}," is the command buffer that the descriptors will be\nrecorded in.",{"type":22,"tag":346,"props":357,"children":358},{},[359,364,366,372],{"type":22,"tag":43,"props":360,"children":362},{"className":361},[],[363],{"type":27,"value":103},{"type":27,"value":365}," is a descriptor update template defining\nhow to interpret the descriptor information in ",{"type":22,"tag":43,"props":367,"children":369},{"className":368},[],[370],{"type":27,"value":371},"pData",{"type":27,"value":373},".",{"type":22,"tag":346,"props":375,"children":376},{},[377,382,384,391,393,398,400,405],{"type":22,"tag":43,"props":378,"children":380},{"className":379},[],[381],{"type":27,"value":121},{"type":27,"value":383}," is a ",{"type":22,"tag":385,"props":386,"children":388},"a",{"href":387},"/man/VkPipelineLayout",[389],{"type":27,"value":390},"VkPipelineLayout",{"type":27,"value":392}," object used to program the\nbindings.\nIt ",{"type":22,"tag":394,"props":395,"children":397},"normative",{"type":396},"must",[],{"type":27,"value":399}," be compatible with the layout used to create the\n",{"type":22,"tag":43,"props":401,"children":403},{"className":402},[],[404],{"type":27,"value":103},{"type":27,"value":406}," handle.",{"type":22,"tag":346,"props":408,"children":409},{},[410,416,418,421,423,428],{"type":22,"tag":43,"props":411,"children":413},{"className":412},[],[414],{"type":27,"value":415},"set",{"type":27,"value":417}," is the set number of the descriptor set in the pipeline layout\nthat will be updated.\nThis ",{"type":22,"tag":394,"props":419,"children":420},{"type":396},[],{"type":27,"value":422}," be the same number used to create the\n",{"type":22,"tag":43,"props":424,"children":426},{"className":425},[],[427],{"type":27,"value":103},{"type":27,"value":406},{"type":22,"tag":346,"props":430,"children":431},{},[432,437],{"type":22,"tag":43,"props":433,"children":435},{"className":434},[],[436],{"type":27,"value":371},{"type":27,"value":438}," is a pointer to memory containing descriptors for the\ntemplated update.",{"type":22,"tag":440,"props":441,"children":443},"validity-group",{"name":442},"Valid Usage",[444,482,537,560,592,615,655],{"type":22,"tag":445,"props":446,"children":448},"validity-field",{"name":447},"VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-00366",[449],{"type":22,"tag":23,"props":450,"children":451},{},[452,454,460,462,465,467,472,474,480],{"type":27,"value":453},"The ",{"type":22,"tag":43,"props":455,"children":457},{"className":456},[],[458],{"type":27,"value":459},"pipelineBindPoint",{"type":27,"value":461}," specified during the creation of the\ndescriptor update template ",{"type":22,"tag":394,"props":463,"children":464},{"type":396},[],{"type":27,"value":466}," be supported by the\n",{"type":22,"tag":43,"props":468,"children":470},{"className":469},[],[471],{"type":27,"value":84},{"type":27,"value":473},"’s parent ",{"type":22,"tag":43,"props":475,"children":477},{"className":476},[],[478],{"type":27,"value":479},"VkCommandPool",{"type":27,"value":481},"’s queue family",{"type":22,"tag":445,"props":483,"children":485},{"name":484},"VUID-vkCmdPushDescriptorSetWithTemplateKHR-pData-01686",[486],{"type":22,"tag":23,"props":487,"children":488},{},[489,494,496,499,501,507,508,514,516,522,524,529,531],{"type":22,"tag":43,"props":490,"children":492},{"className":491},[],[493],{"type":27,"value":371},{"type":27,"value":495}," ",{"type":22,"tag":394,"props":497,"children":498},{"type":396},[],{"type":27,"value":500}," be a valid pointer to a memory containing one or more\nvalid instances of ",{"type":22,"tag":385,"props":502,"children":504},{"href":503},"/man/VkDescriptorImageInfo",[505],{"type":27,"value":506},"VkDescriptorImageInfo",{"type":27,"value":89},{"type":22,"tag":385,"props":509,"children":511},{"href":510},"/man/VkDescriptorBufferInfo",[512],{"type":27,"value":513},"VkDescriptorBufferInfo",{"type":27,"value":515},", or ",{"type":22,"tag":385,"props":517,"children":519},{"href":518},"/man/VkBufferView",[520],{"type":27,"value":521},"VkBufferView",{"type":27,"value":523}," in a layout defined\nby ",{"type":22,"tag":43,"props":525,"children":527},{"className":526},[],[528],{"type":27,"value":103},{"type":27,"value":530}," when it was created with\n",{"type":22,"tag":385,"props":532,"children":534},{"href":533},"/man/vkCreateDescriptorUpdateTemplate",[535],{"type":27,"value":536},"vkCreateDescriptorUpdateTemplate",{"type":22,"tag":445,"props":538,"children":540},{"name":539},"VUID-vkCmdPushDescriptorSetWithTemplateKHR-layout-07993",[541],{"type":22,"tag":23,"props":542,"children":543},{},[544,549,550,553,555],{"type":22,"tag":43,"props":545,"children":547},{"className":546},[],[548],{"type":27,"value":121},{"type":27,"value":495},{"type":22,"tag":394,"props":551,"children":552},{"type":396},[],{"type":27,"value":554}," be compatible with the layout used to create\n",{"type":22,"tag":43,"props":556,"children":558},{"className":557},[],[559],{"type":27,"value":103},{"type":22,"tag":445,"props":561,"children":563},{"name":562},"VUID-vkCmdPushDescriptorSetWithTemplateKHR-descriptorUpdateTemplate-07994",[564],{"type":22,"tag":23,"props":565,"children":566},{},[567,572,573,576,578,584,586],{"type":22,"tag":43,"props":568,"children":570},{"className":569},[],[571],{"type":27,"value":103},{"type":27,"value":495},{"type":22,"tag":394,"props":574,"children":575},{"type":396},[],{"type":27,"value":577}," have been created with a\n",{"type":22,"tag":43,"props":579,"children":581},{"className":580},[],[582],{"type":27,"value":583},"templateType",{"type":27,"value":585}," of\n",{"type":22,"tag":43,"props":587,"children":589},{"className":588},[],[590],{"type":27,"value":591},"VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR",{"type":22,"tag":445,"props":593,"children":595},{"name":594},"VUID-vkCmdPushDescriptorSetWithTemplateKHR-set-07995",[596],{"type":22,"tag":23,"props":597,"children":598},{},[599,604,605,608,610],{"type":22,"tag":43,"props":600,"children":602},{"className":601},[],[603],{"type":27,"value":415},{"type":27,"value":495},{"type":22,"tag":394,"props":606,"children":607},{"type":396},[],{"type":27,"value":609}," be the same value used to create\n",{"type":22,"tag":43,"props":611,"children":613},{"className":612},[],[614],{"type":27,"value":103},{"type":22,"tag":445,"props":616,"children":618},{"name":617},"VUID-vkCmdPushDescriptorSetWithTemplateKHR-set-07304",[619],{"type":22,"tag":23,"props":620,"children":621},{},[622,627,628,631,633,639,640,646,648,653],{"type":22,"tag":43,"props":623,"children":625},{"className":624},[],[626],{"type":27,"value":415},{"type":27,"value":495},{"type":22,"tag":394,"props":629,"children":630},{"type":396},[],{"type":27,"value":632}," be less than\n",{"type":22,"tag":385,"props":634,"children":636},{"href":635},"/man/VkPipelineLayoutCreateInfo",[637],{"type":27,"value":638},"VkPipelineLayoutCreateInfo",{"type":27,"value":222},{"type":22,"tag":43,"props":641,"children":643},{"className":642},[],[644],{"type":27,"value":645},"setLayoutCount",{"type":27,"value":647}," provided when\n",{"type":22,"tag":43,"props":649,"children":651},{"className":650},[],[652],{"type":27,"value":121},{"type":27,"value":654}," was created",{"type":22,"tag":445,"props":656,"children":658},{"name":657},"VUID-vkCmdPushDescriptorSetWithTemplateKHR-set-07305",[659],{"type":22,"tag":23,"props":660,"children":661},{},[662,667,668,671,673],{"type":22,"tag":43,"props":663,"children":665},{"className":664},[],[666],{"type":27,"value":415},{"type":27,"value":495},{"type":22,"tag":394,"props":669,"children":670},{"type":396},[],{"type":27,"value":672}," be the unique set number in the pipeline layout that\nuses a descriptor set layout that was created with\n",{"type":22,"tag":43,"props":674,"children":676},{"className":675},[],[677],{"type":27,"value":678},"VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR",{"type":22,"tag":440,"props":680,"children":682},{"name":681},"Valid Usage (Implicit)",[683,709,733,755,779,806,820],{"type":22,"tag":445,"props":684,"children":686},{"name":685},"VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-parameter",[687],{"type":22,"tag":23,"props":688,"children":689},{},[690,695,696,699,701,707],{"type":22,"tag":43,"props":691,"children":693},{"className":692},[],[694],{"type":27,"value":84},{"type":27,"value":495},{"type":22,"tag":394,"props":697,"children":698},{"type":396},[],{"type":27,"value":700}," be a valid ",{"type":22,"tag":385,"props":702,"children":704},{"href":703},"/man/VkCommandBuffer",[705],{"type":27,"value":706},"VkCommandBuffer",{"type":27,"value":708}," handle",{"type":22,"tag":445,"props":710,"children":712},{"name":711},"VUID-vkCmdPushDescriptorSetWithTemplateKHR-descriptorUpdateTemplate-parameter",[713],{"type":22,"tag":23,"props":714,"children":715},{},[716,721,722,725,726,732],{"type":22,"tag":43,"props":717,"children":719},{"className":718},[],[720],{"type":27,"value":103},{"type":27,"value":495},{"type":22,"tag":394,"props":723,"children":724},{"type":396},[],{"type":27,"value":700},{"type":22,"tag":385,"props":727,"children":729},{"href":728},"/man/VkDescriptorUpdateTemplate",[730],{"type":27,"value":731},"VkDescriptorUpdateTemplate",{"type":27,"value":708},{"type":22,"tag":445,"props":734,"children":736},{"name":735},"VUID-vkCmdPushDescriptorSetWithTemplateKHR-layout-parameter",[737],{"type":22,"tag":23,"props":738,"children":739},{},[740,745,746,749,750,754],{"type":22,"tag":43,"props":741,"children":743},{"className":742},[],[744],{"type":27,"value":121},{"type":27,"value":495},{"type":22,"tag":394,"props":747,"children":748},{"type":396},[],{"type":27,"value":700},{"type":22,"tag":385,"props":751,"children":752},{"href":387},[753],{"type":27,"value":390},{"type":27,"value":708},{"type":22,"tag":445,"props":756,"children":758},{"name":757},"VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-recording",[759],{"type":22,"tag":23,"props":760,"children":761},{},[762,767,768,771,773],{"type":22,"tag":43,"props":763,"children":765},{"className":764},[],[766],{"type":27,"value":84},{"type":27,"value":495},{"type":22,"tag":394,"props":769,"children":770},{"type":396},[],{"type":27,"value":772}," be in the ",{"type":22,"tag":385,"props":774,"children":776},{"href":775},"/chapters/commandbuffers#commandbuffers-lifecycle",[777],{"type":27,"value":778},"recording state",{"type":22,"tag":445,"props":780,"children":782},{"name":781},"VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-cmdpool",[783],{"type":22,"tag":23,"props":784,"children":785},{},[786,787,792,794,799,801,804],{"type":27,"value":453},{"type":22,"tag":43,"props":788,"children":790},{"className":789},[],[791],{"type":27,"value":479},{"type":27,"value":793}," that ",{"type":22,"tag":43,"props":795,"children":797},{"className":796},[],[798],{"type":27,"value":84},{"type":27,"value":800}," was allocated from ",{"type":22,"tag":394,"props":802,"children":803},{"type":396},[],{"type":27,"value":805}," support graphics, or compute operations",{"type":22,"tag":445,"props":807,"children":809},{"name":808},"VUID-vkCmdPushDescriptorSetWithTemplateKHR-videocoding",[810],{"type":22,"tag":23,"props":811,"children":812},{},[813,815,818],{"type":27,"value":814},"This command ",{"type":22,"tag":394,"props":816,"children":817},{"type":396},[],{"type":27,"value":819}," only be called outside of a video coding scope",{"type":22,"tag":445,"props":821,"children":823},{"name":822},"VUID-vkCmdPushDescriptorSetWithTemplateKHR-commonparent",[824],{"type":22,"tag":23,"props":825,"children":826},{},[827,829,834,836,841,843,848,849,852,854],{"type":27,"value":828},"Each of ",{"type":22,"tag":43,"props":830,"children":832},{"className":831},[],[833],{"type":27,"value":84},{"type":27,"value":835},", ",{"type":22,"tag":43,"props":837,"children":839},{"className":838},[],[840],{"type":27,"value":103},{"type":27,"value":842},", and ",{"type":22,"tag":43,"props":844,"children":846},{"className":845},[],[847],{"type":27,"value":121},{"type":27,"value":495},{"type":22,"tag":394,"props":850,"children":851},{"type":396},[],{"type":27,"value":853}," have been created, allocated, or retrieved from the same ",{"type":22,"tag":385,"props":855,"children":857},{"href":856},"/man/VkDevice",[858],{"type":27,"value":859},"VkDevice",{"type":22,"tag":861,"props":862,"children":864},"validity-box",{"name":863},"Host Synchronization",[865,906,913],{"type":22,"tag":342,"props":866,"children":867},{},[868,884],{"type":22,"tag":346,"props":869,"children":870},{},[871,873,878,879,882],{"type":27,"value":872},"Host access to ",{"type":22,"tag":43,"props":874,"children":876},{"className":875},[],[877],{"type":27,"value":84},{"type":27,"value":495},{"type":22,"tag":394,"props":880,"children":881},{"type":396},[],{"type":27,"value":883}," be externally synchronized",{"type":22,"tag":346,"props":885,"children":886},{},[887,889,894,895,900,901,904],{"type":27,"value":888},"Host access to the ",{"type":22,"tag":43,"props":890,"children":892},{"className":891},[],[893],{"type":27,"value":479},{"type":27,"value":793},{"type":22,"tag":43,"props":896,"children":898},{"className":897},[],[899],{"type":27,"value":84},{"type":27,"value":800},{"type":22,"tag":394,"props":902,"children":903},{"type":396},[],{"type":27,"value":905}," be externally synchronized\n::",{"type":22,"tag":907,"props":908,"children":910},"h1",{"id":909},"api-example",[911],{"type":27,"value":912},"API example",{"type":22,"tag":34,"props":914,"children":918},{"className":915,"code":916,"language":917,"meta":40,"style":40},"language-c++ shiki shiki-themes github-light-default github-dark-default","struct AppDataStructure\n{\n VkDescriptorImageInfo imageInfo; // a single image info\n // ... some more application-related data\n};\n\nconst VkDescriptorUpdateTemplateEntry descriptorUpdateTemplateEntries[] =\n{\n // binding to a single image descriptor\n {\n .binding = 0,\n .dstArrayElement = 0,\n .descriptorCount = 1,\n .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,\n .offset = offsetof(AppDataStructure, imageInfo),\n .stride = 0 // not required if descriptorCount is 1\n }\n};\n\n// create a descriptor update template for push descriptor set updates\nconst VkDescriptorUpdateTemplateCreateInfo createInfo =\n{\n .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO,\n .pNext = NULL,\n .flags = 0,\n .descriptorUpdateEntryCount = 1,\n .pDescriptorUpdateEntries = descriptorUpdateTemplateEntries,\n .templateType = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR,\n .descriptorSetLayout = 0, // ignored by given templateType\n .pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS,\n .pipelineLayout = myPipelineLayout,\n .set = 0,\n};\n\nVkDescriptorUpdateTemplate myDescriptorUpdateTemplate;\nmyResult = vkCreateDescriptorUpdateTemplate(\n myDevice,\n &createInfo,\n NULL,\n &myDescriptorUpdateTemplate);\n\nAppDataStructure appData;\n// fill appData here or cache it in your engine\nvkCmdPushDescriptorSetWithTemplateKHR(myCmdBuffer, myDescriptorUpdateTemplate, myPipelineLayout, 0,&appData);\n","c++",[919],{"type":22,"tag":43,"props":920,"children":921},{"__ignoreMap":40},[922,935,943,957,965,973,982,1000,1008,1017,1026,1050,1071,1093,1111,1134,1156,1165,1173,1181,1190,1207,1215,1233,1255,1276,1297,1315,1333,1360,1378,1396,1417,1425,1433,1442,1464,1473,1487,1500,1513,1521,1530,1539],{"type":22,"tag":47,"props":923,"children":924},{"class":49,"line":50},[925,930],{"type":22,"tag":47,"props":926,"children":927},{"style":54},[928],{"type":27,"value":929},"struct",{"type":22,"tag":47,"props":931,"children":932},{"style":81},[933],{"type":27,"value":934}," AppDataStructure\n",{"type":22,"tag":47,"props":936,"children":937},{"class":49,"line":72},[938],{"type":22,"tag":47,"props":939,"children":940},{"style":66},[941],{"type":27,"value":942},"{\n",{"type":22,"tag":47,"props":944,"children":945},{"class":49,"line":92},[946,951],{"type":22,"tag":47,"props":947,"children":948},{"style":66},[949],{"type":27,"value":950}," VkDescriptorImageInfo imageInfo;",{"type":22,"tag":47,"props":952,"children":954},{"style":953},"--shiki-default:#6E7781;--shiki-dark:#8B949E",[955],{"type":27,"value":956}," // a single image info\n",{"type":22,"tag":47,"props":958,"children":959},{"class":49,"line":110},[960],{"type":22,"tag":47,"props":961,"children":962},{"style":953},[963],{"type":27,"value":964}," // ... some more application-related data\n",{"type":22,"tag":47,"props":966,"children":967},{"class":49,"line":128},[968],{"type":22,"tag":47,"props":969,"children":970},{"style":66},[971],{"type":27,"value":972},"};\n",{"type":22,"tag":47,"props":974,"children":975},{"class":49,"line":146},[976],{"type":22,"tag":47,"props":977,"children":979},{"emptyLinePlaceholder":978},true,[980],{"type":27,"value":981},"\n",{"type":22,"tag":47,"props":983,"children":984},{"class":49,"line":335},[985,990,995],{"type":22,"tag":47,"props":986,"children":987},{"style":54},[988],{"type":27,"value":989},"const",{"type":22,"tag":47,"props":991,"children":992},{"style":66},[993],{"type":27,"value":994}," VkDescriptorUpdateTemplateEntry descriptorUpdateTemplateEntries[] ",{"type":22,"tag":47,"props":996,"children":997},{"style":54},[998],{"type":27,"value":999},"=\n",{"type":22,"tag":47,"props":1001,"children":1003},{"class":49,"line":1002},8,[1004],{"type":22,"tag":47,"props":1005,"children":1006},{"style":66},[1007],{"type":27,"value":942},{"type":22,"tag":47,"props":1009,"children":1011},{"class":49,"line":1010},9,[1012],{"type":22,"tag":47,"props":1013,"children":1014},{"style":953},[1015],{"type":27,"value":1016}," // binding to a single image descriptor\n",{"type":22,"tag":47,"props":1018,"children":1020},{"class":49,"line":1019},10,[1021],{"type":22,"tag":47,"props":1022,"children":1023},{"style":66},[1024],{"type":27,"value":1025}," {\n",{"type":22,"tag":47,"props":1027,"children":1029},{"class":49,"line":1028},11,[1030,1035,1040,1046],{"type":22,"tag":47,"props":1031,"children":1032},{"style":66},[1033],{"type":27,"value":1034}," .binding ",{"type":22,"tag":47,"props":1036,"children":1037},{"style":54},[1038],{"type":27,"value":1039},"=",{"type":22,"tag":47,"props":1041,"children":1043},{"style":1042},"--shiki-default:#0550AE;--shiki-dark:#79C0FF",[1044],{"type":27,"value":1045}," 0",{"type":22,"tag":47,"props":1047,"children":1048},{"style":66},[1049],{"type":27,"value":89},{"type":22,"tag":47,"props":1051,"children":1053},{"class":49,"line":1052},12,[1054,1059,1063,1067],{"type":22,"tag":47,"props":1055,"children":1056},{"style":66},[1057],{"type":27,"value":1058}," .dstArrayElement ",{"type":22,"tag":47,"props":1060,"children":1061},{"style":54},[1062],{"type":27,"value":1039},{"type":22,"tag":47,"props":1064,"children":1065},{"style":1042},[1066],{"type":27,"value":1045},{"type":22,"tag":47,"props":1068,"children":1069},{"style":66},[1070],{"type":27,"value":89},{"type":22,"tag":47,"props":1072,"children":1074},{"class":49,"line":1073},13,[1075,1080,1084,1089],{"type":22,"tag":47,"props":1076,"children":1077},{"style":66},[1078],{"type":27,"value":1079}," .descriptorCount ",{"type":22,"tag":47,"props":1081,"children":1082},{"style":54},[1083],{"type":27,"value":1039},{"type":22,"tag":47,"props":1085,"children":1086},{"style":1042},[1087],{"type":27,"value":1088}," 1",{"type":22,"tag":47,"props":1090,"children":1091},{"style":66},[1092],{"type":27,"value":89},{"type":22,"tag":47,"props":1094,"children":1096},{"class":49,"line":1095},14,[1097,1102,1106],{"type":22,"tag":47,"props":1098,"children":1099},{"style":66},[1100],{"type":27,"value":1101}," .descriptorType ",{"type":22,"tag":47,"props":1103,"children":1104},{"style":54},[1105],{"type":27,"value":1039},{"type":22,"tag":47,"props":1107,"children":1108},{"style":66},[1109],{"type":27,"value":1110}," VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,\n",{"type":22,"tag":47,"props":1112,"children":1114},{"class":49,"line":1113},15,[1115,1120,1124,1129],{"type":22,"tag":47,"props":1116,"children":1117},{"style":66},[1118],{"type":27,"value":1119}," .offset ",{"type":22,"tag":47,"props":1121,"children":1122},{"style":54},[1123],{"type":27,"value":1039},{"type":22,"tag":47,"props":1125,"children":1126},{"style":60},[1127],{"type":27,"value":1128}," offsetof",{"type":22,"tag":47,"props":1130,"children":1131},{"style":66},[1132],{"type":27,"value":1133},"(AppDataStructure, imageInfo),\n",{"type":22,"tag":47,"props":1135,"children":1137},{"class":49,"line":1136},16,[1138,1143,1147,1151],{"type":22,"tag":47,"props":1139,"children":1140},{"style":66},[1141],{"type":27,"value":1142}," .stride ",{"type":22,"tag":47,"props":1144,"children":1145},{"style":54},[1146],{"type":27,"value":1039},{"type":22,"tag":47,"props":1148,"children":1149},{"style":1042},[1150],{"type":27,"value":1045},{"type":22,"tag":47,"props":1152,"children":1153},{"style":953},[1154],{"type":27,"value":1155}," // not required if descriptorCount is 1\n",{"type":22,"tag":47,"props":1157,"children":1159},{"class":49,"line":1158},17,[1160],{"type":22,"tag":47,"props":1161,"children":1162},{"style":66},[1163],{"type":27,"value":1164}," }\n",{"type":22,"tag":47,"props":1166,"children":1168},{"class":49,"line":1167},18,[1169],{"type":22,"tag":47,"props":1170,"children":1171},{"style":66},[1172],{"type":27,"value":972},{"type":22,"tag":47,"props":1174,"children":1176},{"class":49,"line":1175},19,[1177],{"type":22,"tag":47,"props":1178,"children":1179},{"emptyLinePlaceholder":978},[1180],{"type":27,"value":981},{"type":22,"tag":47,"props":1182,"children":1184},{"class":49,"line":1183},20,[1185],{"type":22,"tag":47,"props":1186,"children":1187},{"style":953},[1188],{"type":27,"value":1189},"// create a descriptor update template for push descriptor set updates\n",{"type":22,"tag":47,"props":1191,"children":1193},{"class":49,"line":1192},21,[1194,1198,1203],{"type":22,"tag":47,"props":1195,"children":1196},{"style":54},[1197],{"type":27,"value":989},{"type":22,"tag":47,"props":1199,"children":1200},{"style":66},[1201],{"type":27,"value":1202}," VkDescriptorUpdateTemplateCreateInfo createInfo ",{"type":22,"tag":47,"props":1204,"children":1205},{"style":54},[1206],{"type":27,"value":999},{"type":22,"tag":47,"props":1208,"children":1210},{"class":49,"line":1209},22,[1211],{"type":22,"tag":47,"props":1212,"children":1213},{"style":66},[1214],{"type":27,"value":942},{"type":22,"tag":47,"props":1216,"children":1218},{"class":49,"line":1217},23,[1219,1224,1228],{"type":22,"tag":47,"props":1220,"children":1221},{"style":66},[1222],{"type":27,"value":1223}," .sType ",{"type":22,"tag":47,"props":1225,"children":1226},{"style":54},[1227],{"type":27,"value":1039},{"type":22,"tag":47,"props":1229,"children":1230},{"style":66},[1231],{"type":27,"value":1232}," VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO,\n",{"type":22,"tag":47,"props":1234,"children":1236},{"class":49,"line":1235},24,[1237,1242,1246,1251],{"type":22,"tag":47,"props":1238,"children":1239},{"style":66},[1240],{"type":27,"value":1241}," .pNext ",{"type":22,"tag":47,"props":1243,"children":1244},{"style":54},[1245],{"type":27,"value":1039},{"type":22,"tag":47,"props":1247,"children":1248},{"style":1042},[1249],{"type":27,"value":1250}," NULL",{"type":22,"tag":47,"props":1252,"children":1253},{"style":66},[1254],{"type":27,"value":89},{"type":22,"tag":47,"props":1256,"children":1258},{"class":49,"line":1257},25,[1259,1264,1268,1272],{"type":22,"tag":47,"props":1260,"children":1261},{"style":66},[1262],{"type":27,"value":1263}," .flags ",{"type":22,"tag":47,"props":1265,"children":1266},{"style":54},[1267],{"type":27,"value":1039},{"type":22,"tag":47,"props":1269,"children":1270},{"style":1042},[1271],{"type":27,"value":1045},{"type":22,"tag":47,"props":1273,"children":1274},{"style":66},[1275],{"type":27,"value":89},{"type":22,"tag":47,"props":1277,"children":1279},{"class":49,"line":1278},26,[1280,1285,1289,1293],{"type":22,"tag":47,"props":1281,"children":1282},{"style":66},[1283],{"type":27,"value":1284}," .descriptorUpdateEntryCount ",{"type":22,"tag":47,"props":1286,"children":1287},{"style":54},[1288],{"type":27,"value":1039},{"type":22,"tag":47,"props":1290,"children":1291},{"style":1042},[1292],{"type":27,"value":1088},{"type":22,"tag":47,"props":1294,"children":1295},{"style":66},[1296],{"type":27,"value":89},{"type":22,"tag":47,"props":1298,"children":1300},{"class":49,"line":1299},27,[1301,1306,1310],{"type":22,"tag":47,"props":1302,"children":1303},{"style":66},[1304],{"type":27,"value":1305}," .pDescriptorUpdateEntries ",{"type":22,"tag":47,"props":1307,"children":1308},{"style":54},[1309],{"type":27,"value":1039},{"type":22,"tag":47,"props":1311,"children":1312},{"style":66},[1313],{"type":27,"value":1314}," descriptorUpdateTemplateEntries,\n",{"type":22,"tag":47,"props":1316,"children":1318},{"class":49,"line":1317},28,[1319,1324,1328],{"type":22,"tag":47,"props":1320,"children":1321},{"style":66},[1322],{"type":27,"value":1323}," .templateType ",{"type":22,"tag":47,"props":1325,"children":1326},{"style":54},[1327],{"type":27,"value":1039},{"type":22,"tag":47,"props":1329,"children":1330},{"style":66},[1331],{"type":27,"value":1332}," VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR,\n",{"type":22,"tag":47,"props":1334,"children":1336},{"class":49,"line":1335},29,[1337,1342,1346,1350,1355],{"type":22,"tag":47,"props":1338,"children":1339},{"style":66},[1340],{"type":27,"value":1341}," .descriptorSetLayout ",{"type":22,"tag":47,"props":1343,"children":1344},{"style":54},[1345],{"type":27,"value":1039},{"type":22,"tag":47,"props":1347,"children":1348},{"style":1042},[1349],{"type":27,"value":1045},{"type":22,"tag":47,"props":1351,"children":1352},{"style":66},[1353],{"type":27,"value":1354},",",{"type":22,"tag":47,"props":1356,"children":1357},{"style":953},[1358],{"type":27,"value":1359}," // ignored by given templateType\n",{"type":22,"tag":47,"props":1361,"children":1363},{"class":49,"line":1362},30,[1364,1369,1373],{"type":22,"tag":47,"props":1365,"children":1366},{"style":66},[1367],{"type":27,"value":1368}," .pipelineBindPoint ",{"type":22,"tag":47,"props":1370,"children":1371},{"style":54},[1372],{"type":27,"value":1039},{"type":22,"tag":47,"props":1374,"children":1375},{"style":66},[1376],{"type":27,"value":1377}," VK_PIPELINE_BIND_POINT_GRAPHICS,\n",{"type":22,"tag":47,"props":1379,"children":1381},{"class":49,"line":1380},31,[1382,1387,1391],{"type":22,"tag":47,"props":1383,"children":1384},{"style":66},[1385],{"type":27,"value":1386}," .pipelineLayout ",{"type":22,"tag":47,"props":1388,"children":1389},{"style":54},[1390],{"type":27,"value":1039},{"type":22,"tag":47,"props":1392,"children":1393},{"style":66},[1394],{"type":27,"value":1395}," myPipelineLayout,\n",{"type":22,"tag":47,"props":1397,"children":1399},{"class":49,"line":1398},32,[1400,1405,1409,1413],{"type":22,"tag":47,"props":1401,"children":1402},{"style":66},[1403],{"type":27,"value":1404}," .set ",{"type":22,"tag":47,"props":1406,"children":1407},{"style":54},[1408],{"type":27,"value":1039},{"type":22,"tag":47,"props":1410,"children":1411},{"style":1042},[1412],{"type":27,"value":1045},{"type":22,"tag":47,"props":1414,"children":1415},{"style":66},[1416],{"type":27,"value":89},{"type":22,"tag":47,"props":1418,"children":1420},{"class":49,"line":1419},33,[1421],{"type":22,"tag":47,"props":1422,"children":1423},{"style":66},[1424],{"type":27,"value":972},{"type":22,"tag":47,"props":1426,"children":1428},{"class":49,"line":1427},34,[1429],{"type":22,"tag":47,"props":1430,"children":1431},{"emptyLinePlaceholder":978},[1432],{"type":27,"value":981},{"type":22,"tag":47,"props":1434,"children":1436},{"class":49,"line":1435},35,[1437],{"type":22,"tag":47,"props":1438,"children":1439},{"style":66},[1440],{"type":27,"value":1441},"VkDescriptorUpdateTemplate myDescriptorUpdateTemplate;\n",{"type":22,"tag":47,"props":1443,"children":1445},{"class":49,"line":1444},36,[1446,1451,1455,1460],{"type":22,"tag":47,"props":1447,"children":1448},{"style":66},[1449],{"type":27,"value":1450},"myResult ",{"type":22,"tag":47,"props":1452,"children":1453},{"style":54},[1454],{"type":27,"value":1039},{"type":22,"tag":47,"props":1456,"children":1457},{"style":60},[1458],{"type":27,"value":1459}," vkCreateDescriptorUpdateTemplate",{"type":22,"tag":47,"props":1461,"children":1462},{"style":66},[1463],{"type":27,"value":69},{"type":22,"tag":47,"props":1465,"children":1467},{"class":49,"line":1466},37,[1468],{"type":22,"tag":47,"props":1469,"children":1470},{"style":66},[1471],{"type":27,"value":1472}," myDevice,\n",{"type":22,"tag":47,"props":1474,"children":1476},{"class":49,"line":1475},38,[1477,1482],{"type":22,"tag":47,"props":1478,"children":1479},{"style":54},[1480],{"type":27,"value":1481}," &",{"type":22,"tag":47,"props":1483,"children":1484},{"style":66},[1485],{"type":27,"value":1486},"createInfo,\n",{"type":22,"tag":47,"props":1488,"children":1490},{"class":49,"line":1489},39,[1491,1496],{"type":22,"tag":47,"props":1492,"children":1493},{"style":1042},[1494],{"type":27,"value":1495}," NULL",{"type":22,"tag":47,"props":1497,"children":1498},{"style":66},[1499],{"type":27,"value":89},{"type":22,"tag":47,"props":1501,"children":1503},{"class":49,"line":1502},40,[1504,1508],{"type":22,"tag":47,"props":1505,"children":1506},{"style":54},[1507],{"type":27,"value":1481},{"type":22,"tag":47,"props":1509,"children":1510},{"style":66},[1511],{"type":27,"value":1512},"myDescriptorUpdateTemplate);\n",{"type":22,"tag":47,"props":1514,"children":1516},{"class":49,"line":1515},41,[1517],{"type":22,"tag":47,"props":1518,"children":1519},{"emptyLinePlaceholder":978},[1520],{"type":27,"value":981},{"type":22,"tag":47,"props":1522,"children":1524},{"class":49,"line":1523},42,[1525],{"type":22,"tag":47,"props":1526,"children":1527},{"style":66},[1528],{"type":27,"value":1529},"AppDataStructure appData;\n",{"type":22,"tag":47,"props":1531,"children":1533},{"class":49,"line":1532},43,[1534],{"type":22,"tag":47,"props":1535,"children":1536},{"style":953},[1537],{"type":27,"value":1538},"// fill appData here or cache it in your engine\n",{"type":22,"tag":47,"props":1540,"children":1542},{"class":49,"line":1541},44,[1543,1547,1552,1557,1561,1566],{"type":22,"tag":47,"props":1544,"children":1545},{"style":60},[1546],{"type":27,"value":4},{"type":22,"tag":47,"props":1548,"children":1549},{"style":66},[1550],{"type":27,"value":1551},"(myCmdBuffer, myDescriptorUpdateTemplate, myPipelineLayout, ",{"type":22,"tag":47,"props":1553,"children":1554},{"style":1042},[1555],{"type":27,"value":1556},"0",{"type":22,"tag":47,"props":1558,"children":1559},{"style":66},[1560],{"type":27,"value":1354},{"type":22,"tag":47,"props":1562,"children":1563},{"style":54},[1564],{"type":27,"value":1565},"&",{"type":22,"tag":47,"props":1567,"children":1568},{"style":66},[1569],{"type":27,"value":1570},"appData);\n",{"type":22,"tag":1572,"props":1573,"children":1574},"style",{},[1575],{"type":27,"value":1576},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":40,"searchDepth":72,"depth":72,"links":1578},[],"markdown",1725732607405]