[{"data":1,"prerenderedAt":807},["ShallowReactive",2],{"14T0DxY4yF":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":806,"_id":4},"vkWaitForFences","Wait for one or more fences to become signaled","VK_VERSION_1_0","protos",[],{"type":10,"children":11,"toc":804},"root",[12,20,383,502,542,569,616,657,684,798],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17],{"type":18,"value":19},"text","To wait for one or more fences to enter the signaled state on the host,\ncall:",{"type":13,"tag":21,"props":22,"children":23},"code-group",{},[24,163],{"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 vkWaitForFences(\n VkDevice device,\n uint32_t fenceCount,\n const VkFence* pFences,\n VkBool32 waitAll,\n uint64_t timeout);\n","C","c","",[33],{"type":13,"tag":34,"props":35,"children":36},"code",{"__ignoreMap":31},[37,59,79,98,126,144],{"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],{"type":13,"tag":38,"props":84,"children":86},{"style":85},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[87],{"type":18,"value":88}," uint32_t",{"type":13,"tag":38,"props":90,"children":91},{"style":70},[92],{"type":18,"value":93}," fenceCount",{"type":13,"tag":38,"props":95,"children":96},{"style":45},[97],{"type":18,"value":78},{"type":13,"tag":38,"props":99,"children":101},{"class":40,"line":100},4,[102,107,112,117,122],{"type":13,"tag":38,"props":103,"children":104},{"style":85},[105],{"type":18,"value":106}," const",{"type":13,"tag":38,"props":108,"children":109},{"style":45},[110],{"type":18,"value":111}," VkFence",{"type":13,"tag":38,"props":113,"children":114},{"style":85},[115],{"type":18,"value":116},"*",{"type":13,"tag":38,"props":118,"children":119},{"style":70},[120],{"type":18,"value":121}," pFences",{"type":13,"tag":38,"props":123,"children":124},{"style":45},[125],{"type":18,"value":78},{"type":13,"tag":38,"props":127,"children":129},{"class":40,"line":128},5,[130,135,140],{"type":13,"tag":38,"props":131,"children":132},{"style":45},[133],{"type":18,"value":134}," VkBool32 ",{"type":13,"tag":38,"props":136,"children":137},{"style":70},[138],{"type":18,"value":139},"waitAll",{"type":13,"tag":38,"props":141,"children":142},{"style":45},[143],{"type":18,"value":78},{"type":13,"tag":38,"props":145,"children":147},{"class":40,"line":146},6,[148,153,158],{"type":13,"tag":38,"props":149,"children":150},{"style":85},[151],{"type":18,"value":152}," uint64_t",{"type":13,"tag":38,"props":154,"children":155},{"style":70},[156],{"type":18,"value":157}," timeout",{"type":13,"tag":38,"props":159,"children":160},{"style":45},[161],{"type":18,"value":162},");\n",{"type":13,"tag":25,"props":164,"children":169},{"className":165,"code":166,"filename":167,"language":168,"meta":31,"style":31},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn wait_for_fences(\n device: crate :: vk :: vk::Device,\n fence_count: u32,\n p_fences: *const vk::Fence,\n wait_all: vk::Bool32,\n timeout: u64,\n) -> vk::Result;\n","Rust","rs",[170],{"type":13,"tag":34,"props":171,"children":172},{"__ignoreMap":31},[173,195,246,267,301,330,351],{"type":13,"tag":38,"props":174,"children":175},{"class":40,"line":41},[176,181,186,191],{"type":13,"tag":38,"props":177,"children":178},{"style":85},[179],{"type":18,"value":180},"pub",{"type":13,"tag":38,"props":182,"children":183},{"style":85},[184],{"type":18,"value":185}," fn",{"type":13,"tag":38,"props":187,"children":188},{"style":51},[189],{"type":18,"value":190}," wait_for_fences",{"type":13,"tag":38,"props":192,"children":193},{"style":45},[194],{"type":18,"value":58},{"type":13,"tag":38,"props":196,"children":197},{"class":40,"line":61},[198,203,208,213,218,223,228,233,237,242],{"type":13,"tag":38,"props":199,"children":200},{"style":45},[201],{"type":18,"value":202}," device",{"type":13,"tag":38,"props":204,"children":205},{"style":85},[206],{"type":18,"value":207},":",{"type":13,"tag":38,"props":209,"children":210},{"style":85},[211],{"type":18,"value":212}," crate",{"type":13,"tag":38,"props":214,"children":215},{"style":85},[216],{"type":18,"value":217}," ::",{"type":13,"tag":38,"props":219,"children":220},{"style":45},[221],{"type":18,"value":222}," vk ",{"type":13,"tag":38,"props":224,"children":225},{"style":85},[226],{"type":18,"value":227},"::",{"type":13,"tag":38,"props":229,"children":230},{"style":70},[231],{"type":18,"value":232}," vk",{"type":13,"tag":38,"props":234,"children":235},{"style":85},[236],{"type":18,"value":227},{"type":13,"tag":38,"props":238,"children":239},{"style":70},[240],{"type":18,"value":241},"Device",{"type":13,"tag":38,"props":243,"children":244},{"style":45},[245],{"type":18,"value":78},{"type":13,"tag":38,"props":247,"children":248},{"class":40,"line":81},[249,254,258,263],{"type":13,"tag":38,"props":250,"children":251},{"style":45},[252],{"type":18,"value":253}," fence_count",{"type":13,"tag":38,"props":255,"children":256},{"style":85},[257],{"type":18,"value":207},{"type":13,"tag":38,"props":259,"children":260},{"style":70},[261],{"type":18,"value":262}," u32",{"type":13,"tag":38,"props":264,"children":265},{"style":45},[266],{"type":18,"value":78},{"type":13,"tag":38,"props":268,"children":269},{"class":40,"line":100},[270,275,279,284,288,292,297],{"type":13,"tag":38,"props":271,"children":272},{"style":45},[273],{"type":18,"value":274}," p_fences",{"type":13,"tag":38,"props":276,"children":277},{"style":85},[278],{"type":18,"value":207},{"type":13,"tag":38,"props":280,"children":281},{"style":85},[282],{"type":18,"value":283}," *const",{"type":13,"tag":38,"props":285,"children":286},{"style":70},[287],{"type":18,"value":232},{"type":13,"tag":38,"props":289,"children":290},{"style":85},[291],{"type":18,"value":227},{"type":13,"tag":38,"props":293,"children":294},{"style":70},[295],{"type":18,"value":296},"Fence",{"type":13,"tag":38,"props":298,"children":299},{"style":45},[300],{"type":18,"value":78},{"type":13,"tag":38,"props":302,"children":303},{"class":40,"line":128},[304,309,313,317,321,326],{"type":13,"tag":38,"props":305,"children":306},{"style":45},[307],{"type":18,"value":308}," wait_all",{"type":13,"tag":38,"props":310,"children":311},{"style":85},[312],{"type":18,"value":207},{"type":13,"tag":38,"props":314,"children":315},{"style":70},[316],{"type":18,"value":232},{"type":13,"tag":38,"props":318,"children":319},{"style":85},[320],{"type":18,"value":227},{"type":13,"tag":38,"props":322,"children":323},{"style":70},[324],{"type":18,"value":325},"Bool32",{"type":13,"tag":38,"props":327,"children":328},{"style":45},[329],{"type":18,"value":78},{"type":13,"tag":38,"props":331,"children":332},{"class":40,"line":146},[333,338,342,347],{"type":13,"tag":38,"props":334,"children":335},{"style":45},[336],{"type":18,"value":337}," timeout",{"type":13,"tag":38,"props":339,"children":340},{"style":85},[341],{"type":18,"value":207},{"type":13,"tag":38,"props":343,"children":344},{"style":70},[345],{"type":18,"value":346}," u64",{"type":13,"tag":38,"props":348,"children":349},{"style":45},[350],{"type":18,"value":78},{"type":13,"tag":38,"props":352,"children":354},{"class":40,"line":353},7,[355,360,365,369,373,378],{"type":13,"tag":38,"props":356,"children":357},{"style":45},[358],{"type":18,"value":359},") ",{"type":13,"tag":38,"props":361,"children":362},{"style":85},[363],{"type":18,"value":364},"->",{"type":13,"tag":38,"props":366,"children":367},{"style":70},[368],{"type":18,"value":232},{"type":13,"tag":38,"props":370,"children":371},{"style":85},[372],{"type":18,"value":227},{"type":13,"tag":38,"props":374,"children":375},{"style":70},[376],{"type":18,"value":377},"Result",{"type":13,"tag":38,"props":379,"children":380},{"style":45},[381],{"type":18,"value":382},";\n",{"type":13,"tag":384,"props":385,"children":386},"ul",{},[387,398,409,427,473],{"type":13,"tag":388,"props":389,"children":390},"li",{},[391,396],{"type":13,"tag":34,"props":392,"children":394},{"className":393},[],[395],{"type":18,"value":73},{"type":18,"value":397}," is the logical device that owns the fences.",{"type":13,"tag":388,"props":399,"children":400},{},[401,407],{"type":13,"tag":34,"props":402,"children":404},{"className":403},[],[405],{"type":18,"value":406},"fenceCount",{"type":18,"value":408}," is the number of fences to wait on.",{"type":13,"tag":388,"props":410,"children":411},{},[412,418,420,425],{"type":13,"tag":34,"props":413,"children":415},{"className":414},[],[416],{"type":18,"value":417},"pFences",{"type":18,"value":419}," is a pointer to an array of ",{"type":13,"tag":34,"props":421,"children":423},{"className":422},[],[424],{"type":18,"value":406},{"type":18,"value":426}," fence\nhandles.",{"type":13,"tag":388,"props":428,"children":429},{},[430,435,437,442,444,449,451,457,459,464,466,471],{"type":13,"tag":34,"props":431,"children":433},{"className":432},[],[434],{"type":18,"value":139},{"type":18,"value":436}," is the condition that ",{"type":13,"tag":438,"props":439,"children":441},"normative",{"type":440},"must",[],{"type":18,"value":443}," be satisfied to successfully\nunblock the wait.\nIf ",{"type":13,"tag":34,"props":445,"children":447},{"className":446},[],[448],{"type":18,"value":139},{"type":18,"value":450}," is ",{"type":13,"tag":34,"props":452,"children":454},{"className":453},[],[455],{"type":18,"value":456},"VK_TRUE",{"type":18,"value":458},", then the condition is that all fences\nin ",{"type":13,"tag":34,"props":460,"children":462},{"className":461},[],[463],{"type":18,"value":417},{"type":18,"value":465}," are signaled.\nOtherwise, the condition is that at least one fence in ",{"type":13,"tag":34,"props":467,"children":469},{"className":468},[],[470],{"type":18,"value":417},{"type":18,"value":472}," is\nsignaled.",{"type":13,"tag":388,"props":474,"children":475},{},[476,482,484,489,491,495,497,500],{"type":13,"tag":34,"props":477,"children":479},{"className":478},[],[480],{"type":18,"value":481},"timeout",{"type":18,"value":483}," is the timeout period in units of nanoseconds.\n",{"type":13,"tag":34,"props":485,"children":487},{"className":486},[],[488],{"type":18,"value":481},{"type":18,"value":490}," is adjusted to the closest value allowed by the\nimplementation-dependent timeout accuracy, which ",{"type":13,"tag":438,"props":492,"children":494},{"type":493},"may",[],{"type":18,"value":496}," be substantially\nlonger than one nanosecond, and ",{"type":13,"tag":438,"props":498,"children":499},{"type":493},[],{"type":18,"value":501}," be longer than the requested\nperiod.",{"type":13,"tag":14,"props":503,"children":504},{},[505,507,512,514,519,521,526,528,533,535,540],{"type":18,"value":506},"If the condition is satisfied when ",{"type":13,"tag":34,"props":508,"children":510},{"className":509},[],[511],{"type":18,"value":4},{"type":18,"value":513}," is called, then\n",{"type":13,"tag":34,"props":515,"children":517},{"className":516},[],[518],{"type":18,"value":4},{"type":18,"value":520}," returns immediately.\nIf the condition is not satisfied at the time ",{"type":13,"tag":34,"props":522,"children":524},{"className":523},[],[525],{"type":18,"value":4},{"type":18,"value":527}," is\ncalled, then ",{"type":13,"tag":34,"props":529,"children":531},{"className":530},[],[532],{"type":18,"value":4},{"type":18,"value":534}," will block and wait until the condition\nis satisfied or the ",{"type":13,"tag":34,"props":536,"children":538},{"className":537},[],[539],{"type":18,"value":481},{"type":18,"value":541}," has expired, whichever is sooner.",{"type":13,"tag":14,"props":543,"children":544},{},[545,547,552,554,559,561,567],{"type":18,"value":546},"If ",{"type":13,"tag":34,"props":548,"children":550},{"className":549},[],[551],{"type":18,"value":481},{"type":18,"value":553}," is zero, then ",{"type":13,"tag":34,"props":555,"children":557},{"className":556},[],[558],{"type":18,"value":4},{"type":18,"value":560}," does not wait, but\nsimply returns the current state of the fences.\n",{"type":13,"tag":34,"props":562,"children":564},{"className":563},[],[565],{"type":18,"value":566},"VK_TIMEOUT",{"type":18,"value":568}," will be returned in this case if the condition is not\nsatisfied, even though no actual wait was performed.",{"type":13,"tag":14,"props":570,"children":571},{},[572,574,579,581,586,588,594,596,601,602,607,609,614],{"type":18,"value":573},"If the condition is satisfied before the ",{"type":13,"tag":34,"props":575,"children":577},{"className":576},[],[578],{"type":18,"value":481},{"type":18,"value":580}," has expired,\n",{"type":13,"tag":34,"props":582,"children":584},{"className":583},[],[585],{"type":18,"value":4},{"type":18,"value":587}," returns ",{"type":13,"tag":34,"props":589,"children":591},{"className":590},[],[592],{"type":18,"value":593},"VK_SUCCESS",{"type":18,"value":595},".\nOtherwise, ",{"type":13,"tag":34,"props":597,"children":599},{"className":598},[],[600],{"type":18,"value":4},{"type":18,"value":587},{"type":13,"tag":34,"props":603,"children":605},{"className":604},[],[606],{"type":18,"value":566},{"type":18,"value":608}," after the\n",{"type":13,"tag":34,"props":610,"children":612},{"className":611},[],[613],{"type":18,"value":481},{"type":18,"value":615}," has expired.",{"type":13,"tag":14,"props":617,"children":618},{},[619,621,628,630,635,637,640,642,647,649,655],{"type":18,"value":620},"If device loss occurs (see ",{"type":13,"tag":622,"props":623,"children":625},"a",{"href":624},"/chapters/devsandqueues#devsandqueues-lost-device",[626],{"type":18,"value":627},"Lost Device",{"type":18,"value":629},") before\nthe timeout has expired, ",{"type":13,"tag":34,"props":631,"children":633},{"className":632},[],[634],{"type":18,"value":4},{"type":18,"value":636}," ",{"type":13,"tag":438,"props":638,"children":639},{"type":440},[],{"type":18,"value":641}," return in finite time\nwith either ",{"type":13,"tag":34,"props":643,"children":645},{"className":644},[],[646],{"type":18,"value":593},{"type":18,"value":648}," or ",{"type":13,"tag":34,"props":650,"children":652},{"className":651},[],[653],{"type":18,"value":654},"VK_ERROR_DEVICE_LOST",{"type":18,"value":656},".",{"type":13,"tag":658,"props":659,"children":660},"note",{},[661],{"type":13,"tag":14,"props":662,"children":663},{},[664,666,671,672,675,677,682],{"type":18,"value":665},"While we guarantee that ",{"type":13,"tag":34,"props":667,"children":669},{"className":668},[],[670],{"type":18,"value":4},{"type":18,"value":636},{"type":13,"tag":438,"props":673,"children":674},{"type":440},[],{"type":18,"value":676}," return in finite time,\nno guarantees are made that it returns immediately upon device loss.\nHowever, the application can reasonably expect that the delay will be on the\norder of seconds and that calling ",{"type":13,"tag":34,"props":678,"children":680},{"className":679},[],[681],{"type":18,"value":4},{"type":18,"value":683}," will not result in a\npermanently (or seemingly permanently) dead process.",{"type":13,"tag":685,"props":686,"children":688},"validity-group",{"name":687},"Valid Usage (Implicit)",[689,716,749,773],{"type":13,"tag":690,"props":691,"children":693},"validity-field",{"name":692},"VUID-vkWaitForFences-device-parameter",[694],{"type":13,"tag":14,"props":695,"children":696},{},[697,702,703,706,708,714],{"type":13,"tag":34,"props":698,"children":700},{"className":699},[],[701],{"type":18,"value":73},{"type":18,"value":636},{"type":13,"tag":438,"props":704,"children":705},{"type":440},[],{"type":18,"value":707}," be a valid ",{"type":13,"tag":622,"props":709,"children":711},{"href":710},"/man/VkDevice",[712],{"type":18,"value":713},"VkDevice",{"type":18,"value":715}," handle",{"type":13,"tag":690,"props":717,"children":719},{"name":718},"VUID-vkWaitForFences-pFences-parameter",[720],{"type":13,"tag":14,"props":721,"children":722},{},[723,728,729,732,734,739,741,747],{"type":13,"tag":34,"props":724,"children":726},{"className":725},[],[727],{"type":18,"value":417},{"type":18,"value":636},{"type":13,"tag":438,"props":730,"children":731},{"type":440},[],{"type":18,"value":733}," be a valid pointer to an array of ",{"type":13,"tag":34,"props":735,"children":737},{"className":736},[],[738],{"type":18,"value":406},{"type":18,"value":740}," valid ",{"type":13,"tag":622,"props":742,"children":744},{"href":743},"/man/VkFence",[745],{"type":18,"value":746},"VkFence",{"type":18,"value":748}," handles",{"type":13,"tag":690,"props":750,"children":752},{"name":751},"VUID-vkWaitForFences-fenceCount-arraylength",[753],{"type":13,"tag":14,"props":754,"children":755},{},[756,761,762,765,767],{"type":13,"tag":34,"props":757,"children":759},{"className":758},[],[760],{"type":18,"value":406},{"type":18,"value":636},{"type":13,"tag":438,"props":763,"children":764},{"type":440},[],{"type":18,"value":766}," be greater than ",{"type":13,"tag":34,"props":768,"children":770},{"className":769},[],[771],{"type":18,"value":772},"0",{"type":13,"tag":690,"props":774,"children":776},{"name":775},"VUID-vkWaitForFences-pFences-parent",[777],{"type":13,"tag":14,"props":778,"children":779},{},[780,782,787,788,791,793],{"type":18,"value":781},"Each element of ",{"type":13,"tag":34,"props":783,"children":785},{"className":784},[],[786],{"type":18,"value":417},{"type":18,"value":636},{"type":13,"tag":438,"props":789,"children":790},{"type":440},[],{"type":18,"value":792}," have been created, allocated, or retrieved from ",{"type":13,"tag":34,"props":794,"children":796},{"className":795},[],[797],{"type":18,"value":73},{"type":13,"tag":799,"props":800,"children":801},"style",{},[802],{"type":18,"value":803},"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":805},[],"markdown",1725732624015]