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