[{"data":1,"prerenderedAt":544},["ShallowReactive",2],{"Tyyt51JIXw":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":543,"_id":4},"vkAcquireNextImage2KHR","Retrieve the index of the next available presentable image","VK_KHR_swapchain, VK_KHR_device_group","protos",[],{"type":10,"children":11,"toc":541},"root",[12,20,302,363,390,456,535],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17],{"type":18,"value":19},"text","To acquire an available presentable image to use, and retrieve the index of\nthat image, call:",{"type":13,"tag":21,"props":22,"children":23},"code-group",{},[24,127],{"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","VkResult vkAcquireNextImage2KHR(\n VkDevice device,\n const VkAcquireNextImageInfoKHR* pAcquireInfo,\n uint32_t* pImageIndex);\n","C","c","",[33],{"type":13,"tag":34,"props":35,"children":36},"code",{"__ignoreMap":31},[37,59,79,108],{"type":13,"tag":38,"props":39,"children":42},"span",{"class":40,"line":41},"line",1,[43,49,54],{"type":13,"tag":38,"props":44,"children":46},{"style":45},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[47],{"type":18,"value":48},"VkResult ",{"type":13,"tag":38,"props":50,"children":52},{"style":51},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[53],{"type":18,"value":4},{"type":13,"tag":38,"props":55,"children":56},{"style":45},[57],{"type":18,"value":58},"(\n",{"type":13,"tag":38,"props":60,"children":62},{"class":40,"line":61},2,[63,68,74],{"type":13,"tag":38,"props":64,"children":65},{"style":45},[66],{"type":18,"value":67}," VkDevice ",{"type":13,"tag":38,"props":69,"children":71},{"style":70},"--shiki-default:#953800;--shiki-dark:#FFA657",[72],{"type":18,"value":73},"device",{"type":13,"tag":38,"props":75,"children":76},{"style":45},[77],{"type":18,"value":78},",\n",{"type":13,"tag":38,"props":80,"children":82},{"class":40,"line":81},3,[83,89,94,99,104],{"type":13,"tag":38,"props":84,"children":86},{"style":85},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[87],{"type":18,"value":88}," const",{"type":13,"tag":38,"props":90,"children":91},{"style":45},[92],{"type":18,"value":93}," VkAcquireNextImageInfoKHR",{"type":13,"tag":38,"props":95,"children":96},{"style":85},[97],{"type":18,"value":98},"*",{"type":13,"tag":38,"props":100,"children":101},{"style":70},[102],{"type":18,"value":103}," pAcquireInfo",{"type":13,"tag":38,"props":105,"children":106},{"style":45},[107],{"type":18,"value":78},{"type":13,"tag":38,"props":109,"children":111},{"class":40,"line":110},4,[112,117,122],{"type":13,"tag":38,"props":113,"children":114},{"style":85},[115],{"type":18,"value":116}," uint32_t*",{"type":13,"tag":38,"props":118,"children":119},{"style":70},[120],{"type":18,"value":121}," pImageIndex",{"type":13,"tag":38,"props":123,"children":124},{"style":45},[125],{"type":18,"value":126},");\n",{"type":13,"tag":25,"props":128,"children":133},{"className":129,"code":130,"filename":131,"language":132,"meta":31,"style":31},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn acquire_next_image2_khr(\n device: crate :: vk :: vk::Device,\n p_acquire_info: *const vk::AcquireNextImageInfoKHR,\n p_image_index: *mut u32,\n) -> vk::Result;\n","Rust","rs",[134],{"type":13,"tag":34,"props":135,"children":136},{"__ignoreMap":31},[137,159,210,244,270],{"type":13,"tag":38,"props":138,"children":139},{"class":40,"line":41},[140,145,150,155],{"type":13,"tag":38,"props":141,"children":142},{"style":85},[143],{"type":18,"value":144},"pub",{"type":13,"tag":38,"props":146,"children":147},{"style":85},[148],{"type":18,"value":149}," fn",{"type":13,"tag":38,"props":151,"children":152},{"style":51},[153],{"type":18,"value":154}," acquire_next_image2_khr",{"type":13,"tag":38,"props":156,"children":157},{"style":45},[158],{"type":18,"value":58},{"type":13,"tag":38,"props":160,"children":161},{"class":40,"line":61},[162,167,172,177,182,187,192,197,201,206],{"type":13,"tag":38,"props":163,"children":164},{"style":45},[165],{"type":18,"value":166}," device",{"type":13,"tag":38,"props":168,"children":169},{"style":85},[170],{"type":18,"value":171},":",{"type":13,"tag":38,"props":173,"children":174},{"style":85},[175],{"type":18,"value":176}," crate",{"type":13,"tag":38,"props":178,"children":179},{"style":85},[180],{"type":18,"value":181}," ::",{"type":13,"tag":38,"props":183,"children":184},{"style":45},[185],{"type":18,"value":186}," vk ",{"type":13,"tag":38,"props":188,"children":189},{"style":85},[190],{"type":18,"value":191},"::",{"type":13,"tag":38,"props":193,"children":194},{"style":70},[195],{"type":18,"value":196}," vk",{"type":13,"tag":38,"props":198,"children":199},{"style":85},[200],{"type":18,"value":191},{"type":13,"tag":38,"props":202,"children":203},{"style":70},[204],{"type":18,"value":205},"Device",{"type":13,"tag":38,"props":207,"children":208},{"style":45},[209],{"type":18,"value":78},{"type":13,"tag":38,"props":211,"children":212},{"class":40,"line":81},[213,218,222,227,231,235,240],{"type":13,"tag":38,"props":214,"children":215},{"style":45},[216],{"type":18,"value":217}," p_acquire_info",{"type":13,"tag":38,"props":219,"children":220},{"style":85},[221],{"type":18,"value":171},{"type":13,"tag":38,"props":223,"children":224},{"style":85},[225],{"type":18,"value":226}," *const",{"type":13,"tag":38,"props":228,"children":229},{"style":70},[230],{"type":18,"value":196},{"type":13,"tag":38,"props":232,"children":233},{"style":85},[234],{"type":18,"value":191},{"type":13,"tag":38,"props":236,"children":237},{"style":70},[238],{"type":18,"value":239},"AcquireNextImageInfoKHR",{"type":13,"tag":38,"props":241,"children":242},{"style":45},[243],{"type":18,"value":78},{"type":13,"tag":38,"props":245,"children":246},{"class":40,"line":110},[247,252,256,261,266],{"type":13,"tag":38,"props":248,"children":249},{"style":45},[250],{"type":18,"value":251}," p_image_index",{"type":13,"tag":38,"props":253,"children":254},{"style":85},[255],{"type":18,"value":171},{"type":13,"tag":38,"props":257,"children":258},{"style":85},[259],{"type":18,"value":260}," *mut",{"type":13,"tag":38,"props":262,"children":263},{"style":70},[264],{"type":18,"value":265}," u32",{"type":13,"tag":38,"props":267,"children":268},{"style":45},[269],{"type":18,"value":78},{"type":13,"tag":38,"props":271,"children":273},{"class":40,"line":272},5,[274,279,284,288,292,297],{"type":13,"tag":38,"props":275,"children":276},{"style":45},[277],{"type":18,"value":278},") ",{"type":13,"tag":38,"props":280,"children":281},{"style":85},[282],{"type":18,"value":283},"->",{"type":13,"tag":38,"props":285,"children":286},{"style":70},[287],{"type":18,"value":196},{"type":13,"tag":38,"props":289,"children":290},{"style":85},[291],{"type":18,"value":191},{"type":13,"tag":38,"props":293,"children":294},{"style":70},[295],{"type":18,"value":296},"Result",{"type":13,"tag":38,"props":298,"children":299},{"style":45},[300],{"type":18,"value":301},";\n",{"type":13,"tag":303,"props":304,"children":305},"ul",{},[306,325,345],{"type":13,"tag":307,"props":308,"children":309},"li",{},[310,315,317,323],{"type":13,"tag":34,"props":311,"children":313},{"className":312},[],[314],{"type":18,"value":73},{"type":18,"value":316}," is the device associated with ",{"type":13,"tag":34,"props":318,"children":320},{"className":319},[],[321],{"type":18,"value":322},"swapchain",{"type":18,"value":324},".",{"type":13,"tag":307,"props":326,"children":327},{},[328,334,336,343],{"type":13,"tag":34,"props":329,"children":331},{"className":330},[],[332],{"type":18,"value":333},"pAcquireInfo",{"type":18,"value":335}," is a pointer to a ",{"type":13,"tag":337,"props":338,"children":340},"a",{"href":339},"/man/VkAcquireNextImageInfoKHR",[341],{"type":18,"value":342},"VkAcquireNextImageInfoKHR",{"type":18,"value":344},"\nstructure containing parameters of the acquire.",{"type":13,"tag":307,"props":346,"children":347},{},[348,354,355,361],{"type":13,"tag":34,"props":349,"children":351},{"className":350},[],[352],{"type":18,"value":353},"pImageIndex",{"type":18,"value":335},{"type":13,"tag":34,"props":356,"children":358},{"className":357},[],[359],{"type":18,"value":360},"uint32_t",{"type":18,"value":362}," that is set to the\nindex of the next image to use.",{"type":13,"tag":14,"props":364,"children":365},{},[366,368,373,375,381,383,388],{"type":18,"value":367},"If the ",{"type":13,"tag":34,"props":369,"children":371},{"className":370},[],[372],{"type":18,"value":322},{"type":18,"value":374}," has been created with the\n",{"type":13,"tag":34,"props":376,"children":378},{"className":377},[],[379],{"type":18,"value":380},"VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT",{"type":18,"value":382}," flag, the image\nwhose index is returned in ",{"type":13,"tag":34,"props":384,"children":386},{"className":385},[],[387],{"type":18,"value":353},{"type":18,"value":389}," will be fully backed by memory\nbefore this call returns to the application.",{"type":13,"tag":391,"props":392,"children":394},"validity-group",{"name":393},"Valid Usage",[395],{"type":13,"tag":396,"props":397,"children":399},"validity-field",{"name":398},"VUID-vkAcquireNextImage2KHR-surface-07784",[400],{"type":13,"tag":14,"props":401,"children":402},{},[403,405,411,413,419,421,426,428,434,436,441,443,448,450],{"type":18,"value":404},"If ",{"type":13,"tag":337,"props":406,"children":408},{"href":407},"/chapters/wsi#swapchain-acquire-forward-progress",[409],{"type":18,"value":410},"forward progress",{"type":18,"value":412}," cannot be\nguaranteed for the ",{"type":13,"tag":34,"props":414,"children":416},{"className":415},[],[417],{"type":18,"value":418},"surface",{"type":18,"value":420}," used to create ",{"type":13,"tag":34,"props":422,"children":424},{"className":423},[],[425],{"type":18,"value":322},{"type":18,"value":427},", the\n",{"type":13,"tag":34,"props":429,"children":431},{"className":430},[],[432],{"type":18,"value":433},"timeout",{"type":18,"value":435}," member of ",{"type":13,"tag":34,"props":437,"children":439},{"className":438},[],[440],{"type":18,"value":333},{"type":18,"value":442}," ",{"type":13,"tag":444,"props":445,"children":447},"normative",{"type":446},"must",[],{"type":18,"value":449}," not be ",{"type":13,"tag":34,"props":451,"children":453},{"className":452},[],[454],{"type":18,"value":455},"UINT64_MAX",{"type":13,"tag":391,"props":457,"children":459},{"name":458},"Valid Usage (Implicit)",[460,486,510],{"type":13,"tag":396,"props":461,"children":463},{"name":462},"VUID-vkAcquireNextImage2KHR-device-parameter",[464],{"type":13,"tag":14,"props":465,"children":466},{},[467,472,473,476,478,484],{"type":13,"tag":34,"props":468,"children":470},{"className":469},[],[471],{"type":18,"value":73},{"type":18,"value":442},{"type":13,"tag":444,"props":474,"children":475},{"type":446},[],{"type":18,"value":477}," be a valid ",{"type":13,"tag":337,"props":479,"children":481},{"href":480},"/man/VkDevice",[482],{"type":18,"value":483},"VkDevice",{"type":18,"value":485}," handle",{"type":13,"tag":396,"props":487,"children":489},{"name":488},"VUID-vkAcquireNextImage2KHR-pAcquireInfo-parameter",[490],{"type":13,"tag":14,"props":491,"children":492},{},[493,498,499,502,504,508],{"type":13,"tag":34,"props":494,"children":496},{"className":495},[],[497],{"type":18,"value":333},{"type":18,"value":442},{"type":13,"tag":444,"props":500,"children":501},{"type":446},[],{"type":18,"value":503}," be a valid pointer to a valid ",{"type":13,"tag":337,"props":505,"children":506},{"href":339},[507],{"type":18,"value":342},{"type":18,"value":509}," structure",{"type":13,"tag":396,"props":511,"children":513},{"name":512},"VUID-vkAcquireNextImage2KHR-pImageIndex-parameter",[514],{"type":13,"tag":14,"props":515,"children":516},{},[517,522,523,526,528,533],{"type":13,"tag":34,"props":518,"children":520},{"className":519},[],[521],{"type":18,"value":353},{"type":18,"value":442},{"type":13,"tag":444,"props":524,"children":525},{"type":446},[],{"type":18,"value":527}," be a valid pointer to a ",{"type":13,"tag":34,"props":529,"children":531},{"className":530},[],[532],{"type":18,"value":360},{"type":18,"value":534}," value",{"type":13,"tag":536,"props":537,"children":538},"style",{},[539],{"type":18,"value":540},"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":61,"depth":61,"links":542},[],"markdown",1725732596502]