[{"data":1,"prerenderedAt":767},["ShallowReactive",2],{"$fP1CoDywnH9IMD9zMOVPsI_redb6SpagcuOeM1vHuKx0":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":766,"_id":4},"vkWaitForPresent2KHR","Wait for presentation","VK_KHR_present_wait2","protos",[],{"type":10,"children":11,"toc":764},"root",[12,69,334,385,427,432,437,483,521,633,734,758],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17,20,27,29,34,36,42,44,50,52,58,60,67],{"type":18,"value":19},"text","When the ",{"type":13,"tag":21,"props":22,"children":24},"code",{"className":23},[],[25],{"type":18,"value":26},"VkSurfaceCapabilitiesPresentWait2KHR",{"type":18,"value":28}," surface capability is\npresent for a given surface, an application ",{"type":13,"tag":30,"props":31,"children":33},"normative",{"type":32},"can",[],{"type":18,"value":35}," wait for an image to be\npresented to the user by first specifying a ",{"type":13,"tag":21,"props":37,"children":39},{"className":38},[],[40],{"type":18,"value":41},"presentId",{"type":18,"value":43}," for the target\npresentation by adding a ",{"type":13,"tag":21,"props":45,"children":47},{"className":46},[],[48],{"type":18,"value":49},"VkPresentId2KHR",{"type":18,"value":51}," structure to the ",{"type":13,"tag":21,"props":53,"children":55},{"className":54},[],[56],{"type":18,"value":57},"pNext",{"type":18,"value":59},"\nchain of the ",{"type":13,"tag":61,"props":62,"children":64},"a",{"href":63},"/man/VkPresentInfoKHR",[65],{"type":18,"value":66},"VkPresentInfoKHR",{"type":18,"value":68}," structure and then waiting for that\npresentation to complete by calling:",{"type":13,"tag":70,"props":71,"children":72},"code-group",{},[73,175],{"type":13,"tag":74,"props":75,"children":81},"pre",{"className":76,"code":77,"filename":78,"language":79,"meta":80,"style":80},"language-c shiki shiki-themes github-light-default github-dark-default","VkResult vkWaitForPresent2KHR(\n VkDevice device,\n VkSwapchainKHR swapchain,\n const VkPresentWait2InfoKHR* pPresentWait2Info);\n","C","c","",[82],{"type":13,"tag":21,"props":83,"children":84},{"__ignoreMap":80},[85,107,127,145],{"type":13,"tag":86,"props":87,"children":90},"span",{"class":88,"line":89},"line",1,[91,97,102],{"type":13,"tag":86,"props":92,"children":94},{"style":93},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[95],{"type":18,"value":96},"VkResult ",{"type":13,"tag":86,"props":98,"children":100},{"style":99},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[101],{"type":18,"value":4},{"type":13,"tag":86,"props":103,"children":104},{"style":93},[105],{"type":18,"value":106},"(\n",{"type":13,"tag":86,"props":108,"children":110},{"class":88,"line":109},2,[111,116,122],{"type":13,"tag":86,"props":112,"children":113},{"style":93},[114],{"type":18,"value":115}," VkDevice ",{"type":13,"tag":86,"props":117,"children":119},{"style":118},"--shiki-default:#953800;--shiki-dark:#FFA657",[120],{"type":18,"value":121},"device",{"type":13,"tag":86,"props":123,"children":124},{"style":93},[125],{"type":18,"value":126},",\n",{"type":13,"tag":86,"props":128,"children":130},{"class":88,"line":129},3,[131,136,141],{"type":13,"tag":86,"props":132,"children":133},{"style":93},[134],{"type":18,"value":135}," VkSwapchainKHR ",{"type":13,"tag":86,"props":137,"children":138},{"style":118},[139],{"type":18,"value":140},"swapchain",{"type":13,"tag":86,"props":142,"children":143},{"style":93},[144],{"type":18,"value":126},{"type":13,"tag":86,"props":146,"children":148},{"class":88,"line":147},4,[149,155,160,165,170],{"type":13,"tag":86,"props":150,"children":152},{"style":151},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[153],{"type":18,"value":154}," const",{"type":13,"tag":86,"props":156,"children":157},{"style":93},[158],{"type":18,"value":159}," VkPresentWait2InfoKHR",{"type":13,"tag":86,"props":161,"children":162},{"style":151},[163],{"type":18,"value":164},"*",{"type":13,"tag":86,"props":166,"children":167},{"style":118},[168],{"type":18,"value":169}," pPresentWait2Info",{"type":13,"tag":86,"props":171,"children":172},{"style":93},[173],{"type":18,"value":174},");\n",{"type":13,"tag":74,"props":176,"children":181},{"className":177,"code":178,"filename":179,"language":180,"meta":80,"style":80},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn wait_for_present2_khr(\n device: vk::Device,\n swapchain: vk::SwapchainKHR,\n p_present_wait2_info: *const vk::PresentWait2InfoKHR,\n) -> vk::Result;\n","Rust","rs",[182],{"type":13,"tag":21,"props":183,"children":184},{"__ignoreMap":80},[185,207,239,268,302],{"type":13,"tag":86,"props":186,"children":187},{"class":88,"line":89},[188,193,198,203],{"type":13,"tag":86,"props":189,"children":190},{"style":151},[191],{"type":18,"value":192},"pub",{"type":13,"tag":86,"props":194,"children":195},{"style":151},[196],{"type":18,"value":197}," fn",{"type":13,"tag":86,"props":199,"children":200},{"style":99},[201],{"type":18,"value":202}," wait_for_present2_khr",{"type":13,"tag":86,"props":204,"children":205},{"style":93},[206],{"type":18,"value":106},{"type":13,"tag":86,"props":208,"children":209},{"class":88,"line":109},[210,215,220,225,230,235],{"type":13,"tag":86,"props":211,"children":212},{"style":93},[213],{"type":18,"value":214}," device",{"type":13,"tag":86,"props":216,"children":217},{"style":151},[218],{"type":18,"value":219},":",{"type":13,"tag":86,"props":221,"children":222},{"style":118},[223],{"type":18,"value":224}," vk",{"type":13,"tag":86,"props":226,"children":227},{"style":151},[228],{"type":18,"value":229},"::",{"type":13,"tag":86,"props":231,"children":232},{"style":118},[233],{"type":18,"value":234},"Device",{"type":13,"tag":86,"props":236,"children":237},{"style":93},[238],{"type":18,"value":126},{"type":13,"tag":86,"props":240,"children":241},{"class":88,"line":129},[242,247,251,255,259,264],{"type":13,"tag":86,"props":243,"children":244},{"style":93},[245],{"type":18,"value":246}," swapchain",{"type":13,"tag":86,"props":248,"children":249},{"style":151},[250],{"type":18,"value":219},{"type":13,"tag":86,"props":252,"children":253},{"style":118},[254],{"type":18,"value":224},{"type":13,"tag":86,"props":256,"children":257},{"style":151},[258],{"type":18,"value":229},{"type":13,"tag":86,"props":260,"children":261},{"style":118},[262],{"type":18,"value":263},"SwapchainKHR",{"type":13,"tag":86,"props":265,"children":266},{"style":93},[267],{"type":18,"value":126},{"type":13,"tag":86,"props":269,"children":270},{"class":88,"line":147},[271,276,280,285,289,293,298],{"type":13,"tag":86,"props":272,"children":273},{"style":93},[274],{"type":18,"value":275}," p_present_wait2_info",{"type":13,"tag":86,"props":277,"children":278},{"style":151},[279],{"type":18,"value":219},{"type":13,"tag":86,"props":281,"children":282},{"style":151},[283],{"type":18,"value":284}," *const",{"type":13,"tag":86,"props":286,"children":287},{"style":118},[288],{"type":18,"value":224},{"type":13,"tag":86,"props":290,"children":291},{"style":151},[292],{"type":18,"value":229},{"type":13,"tag":86,"props":294,"children":295},{"style":118},[296],{"type":18,"value":297},"PresentWait2InfoKHR",{"type":13,"tag":86,"props":299,"children":300},{"style":93},[301],{"type":18,"value":126},{"type":13,"tag":86,"props":303,"children":305},{"class":88,"line":304},5,[306,311,316,320,324,329],{"type":13,"tag":86,"props":307,"children":308},{"style":93},[309],{"type":18,"value":310},") ",{"type":13,"tag":86,"props":312,"children":313},{"style":151},[314],{"type":18,"value":315},"->",{"type":13,"tag":86,"props":317,"children":318},{"style":118},[319],{"type":18,"value":224},{"type":13,"tag":86,"props":321,"children":322},{"style":151},[323],{"type":18,"value":229},{"type":13,"tag":86,"props":325,"children":326},{"style":118},[327],{"type":18,"value":328},"Result",{"type":13,"tag":86,"props":330,"children":331},{"style":93},[332],{"type":18,"value":333},";\n",{"type":13,"tag":335,"props":336,"children":337},"ul",{},[338,356,366],{"type":13,"tag":339,"props":340,"children":341},"li",{},[342,347,349,354],{"type":13,"tag":21,"props":343,"children":345},{"className":344},[],[346],{"type":18,"value":121},{"type":18,"value":348}," is the device associated with ",{"type":13,"tag":21,"props":350,"children":352},{"className":351},[],[353],{"type":18,"value":140},{"type":18,"value":355},".",{"type":13,"tag":339,"props":357,"children":358},{},[359,364],{"type":13,"tag":21,"props":360,"children":362},{"className":361},[],[363],{"type":18,"value":140},{"type":18,"value":365}," is the non-retired swapchain on which an image was\nqueued for presentation.",{"type":13,"tag":339,"props":367,"children":368},{},[369,375,377,383],{"type":13,"tag":21,"props":370,"children":372},{"className":371},[],[373],{"type":18,"value":374},"pPresentWait2Info",{"type":18,"value":376}," is a pointer to a ",{"type":13,"tag":61,"props":378,"children":380},{"href":379},"/man/VkPresentWait2InfoKHR",[381],{"type":18,"value":382},"VkPresentWait2InfoKHR",{"type":18,"value":384},"\nstructure specifying the parameters of the wait.",{"type":13,"tag":14,"props":386,"children":387},{},[388,393,395,399,400,405,407,412,414,418,419,425],{"type":13,"tag":21,"props":389,"children":391},{"className":390},[],[392],{"type":18,"value":4},{"type":18,"value":394}," waits for the presentation engine to have begun\npresentation of the presentation request associated with the\n",{"type":13,"tag":61,"props":396,"children":397},{"href":379},[398],{"type":18,"value":382},{"type":18,"value":229},{"type":13,"tag":21,"props":401,"children":403},{"className":402},[],[404],{"type":18,"value":41},{"type":18,"value":406}," on ",{"type":13,"tag":21,"props":408,"children":410},{"className":409},[],[411],{"type":18,"value":140},{"type":18,"value":413},", or for\n",{"type":13,"tag":61,"props":415,"children":416},{"href":379},[417],{"type":18,"value":382},{"type":18,"value":229},{"type":13,"tag":21,"props":420,"children":422},{"className":421},[],[423],{"type":18,"value":424},"timeout",{"type":18,"value":426}," to have expired.",{"type":13,"tag":14,"props":428,"children":429},{},[430],{"type":18,"value":431},"The wait request will complete when the timeout expires, or after the\ncorresponding presentation request has either taken effect within the\npresentation engine or has been replaced without presentation.",{"type":13,"tag":14,"props":433,"children":434},{},[435],{"type":18,"value":436},"The timing relationship between the presentation of the image to the user\nand the wait request completing is implementation-dependent due to\nvariations in window system implementations.",{"type":13,"tag":14,"props":438,"children":439},{},[440,442,447,449,455,457,461,463,469,471,474,476,481],{"type":18,"value":441},"If the ",{"type":13,"tag":21,"props":443,"children":445},{"className":444},[],[446],{"type":18,"value":140},{"type":18,"value":448}," becomes ",{"type":13,"tag":21,"props":450,"children":452},{"className":451},[],[453],{"type":18,"value":454},"VK_ERROR_OUT_OF_DATE_KHR",{"type":18,"value":456}," either before\nor during this call, the call ",{"type":13,"tag":30,"props":458,"children":460},{"type":459},"may",[],{"type":18,"value":462}," either return ",{"type":13,"tag":21,"props":464,"children":466},{"className":465},[],[467],{"type":18,"value":468},"VK_SUCCESS",{"type":18,"value":470}," (if the\nimage was delivered to the presentation engine and ",{"type":13,"tag":30,"props":472,"children":473},{"type":459},[],{"type":18,"value":475}," have been presented\nto the user) or return early with status ",{"type":13,"tag":21,"props":477,"children":479},{"className":478},[],[480],{"type":18,"value":454},{"type":18,"value":482}," (if\nthe image could not be presented to the user).",{"type":13,"tag":14,"props":484,"children":485},{},[486,488,493,495,500,502,505,507,513,515,519],{"type":18,"value":487},"As an exception to the normal rules for objects which are externally\nsynchronized, the ",{"type":13,"tag":21,"props":489,"children":491},{"className":490},[],[492],{"type":18,"value":140},{"type":18,"value":494}," passed to ",{"type":13,"tag":21,"props":496,"children":498},{"className":497},[],[499],{"type":18,"value":4},{"type":18,"value":501}," ",{"type":13,"tag":30,"props":503,"children":504},{"type":459},[],{"type":18,"value":506},"\nbe simultaneously used by other threads in calls to functions other than\n",{"type":13,"tag":61,"props":508,"children":510},{"href":509},"/man/vkDestroySwapchainKHR",[511],{"type":18,"value":512},"vkDestroySwapchainKHR",{"type":18,"value":514},".\nAccess to the swapchain data associated with this extension ",{"type":13,"tag":30,"props":516,"children":518},{"type":517},"must",[],{"type":18,"value":520}," be atomic\nwithin the implementation.",{"type":13,"tag":522,"props":523,"children":525},"validity-group",{"name":524},"Valid Usage",[526,553,573,598],{"type":13,"tag":527,"props":528,"children":530},"validity-field",{"name":529},"VUID-vkWaitForPresent2KHR-presentWait2-10814",[531],{"type":13,"tag":14,"props":532,"children":533},{},[534,536,546,548,551],{"type":18,"value":535},"The ",{"type":13,"tag":61,"props":537,"children":539},{"href":538},"/man/VkPhysicalDevicePresentWait2FeaturesKHR#features-presentWait2",[540],{"type":13,"tag":21,"props":541,"children":543},{"className":542},[],[544],{"type":18,"value":545},"presentWait2",{"type":18,"value":547}," feature ",{"type":13,"tag":30,"props":549,"children":550},{"type":517},[],{"type":18,"value":552}," be\nenabled",{"type":13,"tag":527,"props":554,"children":556},{"name":555},"VUID-vkWaitForPresent2KHR-None-10815",[557],{"type":13,"tag":14,"props":558,"children":559},{},[560,561,566,568,571],{"type":18,"value":535},{"type":13,"tag":61,"props":562,"children":564},{"href":563},"/man/VkSurfaceCapabilitiesPresentWait2KHR",[565],{"type":18,"value":26},{"type":18,"value":567}," surface capability ",{"type":13,"tag":30,"props":569,"children":570},{"type":517},[],{"type":18,"value":572},"\nbe present for the underlying surface",{"type":13,"tag":527,"props":574,"children":576},{"name":575},"VUID-vkWaitForPresent2KHR-None-10816",[577],{"type":13,"tag":14,"props":578,"children":579},{},[580,582,588,590,596],{"type":18,"value":581},"The swapchain must have been created with\n",{"type":13,"tag":21,"props":583,"children":585},{"className":584},[],[586],{"type":18,"value":587},"VK_SWAPCHAIN_CREATE_PRESENT_WAIT_2_BIT_KHR",{"type":18,"value":589}," bit set in the\n",{"type":13,"tag":21,"props":591,"children":593},{"className":592},[],[594],{"type":18,"value":595},"VkSwapchainCreateFlagBitsKHR",{"type":18,"value":597}," field",{"type":13,"tag":527,"props":599,"children":601},{"name":600},"VUID-vkWaitForPresent2KHR-presentId-10817",[602],{"type":13,"tag":14,"props":603,"children":604},{},[605,606,611,613,616,618,624,626,631],{"type":18,"value":535},{"type":13,"tag":21,"props":607,"children":609},{"className":608},[],[610],{"type":18,"value":41},{"type":18,"value":612}," value ",{"type":13,"tag":30,"props":614,"children":615},{"type":517},[],{"type":18,"value":617}," have been associated with a\n",{"type":13,"tag":61,"props":619,"children":621},{"href":620},"/man/vkQueuePresentKHR",[622],{"type":18,"value":623},"vkQueuePresentKHR",{"type":18,"value":625}," request on the ",{"type":13,"tag":21,"props":627,"children":629},{"className":628},[],[630],{"type":18,"value":140},{"type":18,"value":632}," which returned a\nnon-error value",{"type":13,"tag":522,"props":634,"children":636},{"name":635},"Valid Usage (Implicit)",[637,663,687,711],{"type":13,"tag":527,"props":638,"children":640},{"name":639},"VUID-vkWaitForPresent2KHR-device-parameter",[641],{"type":13,"tag":14,"props":642,"children":643},{},[644,649,650,653,655,661],{"type":13,"tag":21,"props":645,"children":647},{"className":646},[],[648],{"type":18,"value":121},{"type":18,"value":501},{"type":13,"tag":30,"props":651,"children":652},{"type":517},[],{"type":18,"value":654}," be a valid ",{"type":13,"tag":61,"props":656,"children":658},{"href":657},"/man/VkDevice",[659],{"type":18,"value":660},"VkDevice",{"type":18,"value":662}," handle",{"type":13,"tag":527,"props":664,"children":666},{"name":665},"VUID-vkWaitForPresent2KHR-swapchain-parameter",[667],{"type":13,"tag":14,"props":668,"children":669},{},[670,675,676,679,680,686],{"type":13,"tag":21,"props":671,"children":673},{"className":672},[],[674],{"type":18,"value":140},{"type":18,"value":501},{"type":13,"tag":30,"props":677,"children":678},{"type":517},[],{"type":18,"value":654},{"type":13,"tag":61,"props":681,"children":683},{"href":682},"/man/VkSwapchainKHR",[684],{"type":18,"value":685},"VkSwapchainKHR",{"type":18,"value":662},{"type":13,"tag":527,"props":688,"children":690},{"name":689},"VUID-vkWaitForPresent2KHR-pPresentWait2Info-parameter",[691],{"type":13,"tag":14,"props":692,"children":693},{},[694,699,700,703,705,709],{"type":13,"tag":21,"props":695,"children":697},{"className":696},[],[698],{"type":18,"value":374},{"type":18,"value":501},{"type":13,"tag":30,"props":701,"children":702},{"type":517},[],{"type":18,"value":704}," be a valid pointer to a valid ",{"type":13,"tag":61,"props":706,"children":707},{"href":379},[708],{"type":18,"value":382},{"type":18,"value":710}," structure",{"type":13,"tag":527,"props":712,"children":714},{"name":713},"VUID-vkWaitForPresent2KHR-swapchain-parent",[715],{"type":13,"tag":14,"props":716,"children":717},{},[718,723,724,727,729],{"type":13,"tag":21,"props":719,"children":721},{"className":720},[],[722],{"type":18,"value":140},{"type":18,"value":501},{"type":13,"tag":30,"props":725,"children":726},{"type":517},[],{"type":18,"value":728}," have been created, allocated, or retrieved from ",{"type":13,"tag":21,"props":730,"children":732},{"className":731},[],[733],{"type":18,"value":121},{"type":13,"tag":735,"props":736,"children":738},"validity-box",{"name":737},"Host Synchronization",[739],{"type":13,"tag":335,"props":740,"children":741},{},[742],{"type":13,"tag":339,"props":743,"children":744},{},[745,747,752,753,756],{"type":18,"value":746},"Host access to ",{"type":13,"tag":21,"props":748,"children":750},{"className":749},[],[751],{"type":18,"value":140},{"type":18,"value":501},{"type":13,"tag":30,"props":754,"children":755},{"type":517},[],{"type":18,"value":757}," be externally synchronized",{"type":13,"tag":759,"props":760,"children":761},"style",{},[762],{"type":18,"value":763},"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":80,"searchDepth":109,"depth":109,"links":765},[],"markdown",1773054812807]