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