[{"data":1,"prerenderedAt":599},["ShallowReactive",2],{"rIkRKaiG3g":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":598,"_id":4},"vkWaitSemaphores","Wait for timeline semaphores on the host","VK_VERSION_1_2","protos",[],{"type":10,"children":11,"toc":596},"root",[12,38,315,379,419,446,493,534,590],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17,20,27,29,36],{"type":18,"value":19},"text","To wait for a set of semaphores created with a ",{"type":13,"tag":21,"props":22,"children":24},"a",{"href":23},"/man/VkSemaphoreType",[25],{"type":18,"value":26},"VkSemaphoreType",{"type":18,"value":28}," of\n",{"type":13,"tag":30,"props":31,"children":33},"code",{"className":32},[],[34],{"type":18,"value":35},"VK_SEMAPHORE_TYPE_TIMELINE",{"type":18,"value":37}," to reach particular counter values on the\nhost, call:",{"type":13,"tag":39,"props":40,"children":41},"code-group",{},[42,145],{"type":13,"tag":43,"props":44,"children":50},"pre",{"className":45,"code":46,"filename":47,"language":48,"meta":49,"style":49},"language-c shiki shiki-themes github-light-default github-dark-default","VkResult vkWaitSemaphoresKHR(\n VkDevice device,\n const VkSemaphoreWaitInfo* pWaitInfo,\n uint64_t timeout);\n","C","c","",[51],{"type":13,"tag":30,"props":52,"children":53},{"__ignoreMap":49},[54,77,97,126],{"type":13,"tag":55,"props":56,"children":59},"span",{"class":57,"line":58},"line",1,[60,66,72],{"type":13,"tag":55,"props":61,"children":63},{"style":62},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[64],{"type":18,"value":65},"VkResult ",{"type":13,"tag":55,"props":67,"children":69},{"style":68},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[70],{"type":18,"value":71},"vkWaitSemaphoresKHR",{"type":13,"tag":55,"props":73,"children":74},{"style":62},[75],{"type":18,"value":76},"(\n",{"type":13,"tag":55,"props":78,"children":80},{"class":57,"line":79},2,[81,86,92],{"type":13,"tag":55,"props":82,"children":83},{"style":62},[84],{"type":18,"value":85}," VkDevice ",{"type":13,"tag":55,"props":87,"children":89},{"style":88},"--shiki-default:#953800;--shiki-dark:#FFA657",[90],{"type":18,"value":91},"device",{"type":13,"tag":55,"props":93,"children":94},{"style":62},[95],{"type":18,"value":96},",\n",{"type":13,"tag":55,"props":98,"children":100},{"class":57,"line":99},3,[101,107,112,117,122],{"type":13,"tag":55,"props":102,"children":104},{"style":103},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[105],{"type":18,"value":106}," const",{"type":13,"tag":55,"props":108,"children":109},{"style":62},[110],{"type":18,"value":111}," VkSemaphoreWaitInfo",{"type":13,"tag":55,"props":113,"children":114},{"style":103},[115],{"type":18,"value":116},"*",{"type":13,"tag":55,"props":118,"children":119},{"style":88},[120],{"type":18,"value":121}," pWaitInfo",{"type":13,"tag":55,"props":123,"children":124},{"style":62},[125],{"type":18,"value":96},{"type":13,"tag":55,"props":127,"children":129},{"class":57,"line":128},4,[130,135,140],{"type":13,"tag":55,"props":131,"children":132},{"style":103},[133],{"type":18,"value":134}," uint64_t",{"type":13,"tag":55,"props":136,"children":137},{"style":88},[138],{"type":18,"value":139}," timeout",{"type":13,"tag":55,"props":141,"children":142},{"style":62},[143],{"type":18,"value":144},");\n",{"type":13,"tag":43,"props":146,"children":151},{"className":147,"code":148,"filename":149,"language":150,"meta":49,"style":49},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn wait_semaphores_khr(\n device: crate :: vk :: vk::Device,\n p_wait_info: *const vk::SemaphoreWaitInfo,\n timeout: u64,\n) -> vk::Result;\n","Rust","rs",[152],{"type":13,"tag":30,"props":153,"children":154},{"__ignoreMap":49},[155,177,228,262,283],{"type":13,"tag":55,"props":156,"children":157},{"class":57,"line":58},[158,163,168,173],{"type":13,"tag":55,"props":159,"children":160},{"style":103},[161],{"type":18,"value":162},"pub",{"type":13,"tag":55,"props":164,"children":165},{"style":103},[166],{"type":18,"value":167}," fn",{"type":13,"tag":55,"props":169,"children":170},{"style":68},[171],{"type":18,"value":172}," wait_semaphores_khr",{"type":13,"tag":55,"props":174,"children":175},{"style":62},[176],{"type":18,"value":76},{"type":13,"tag":55,"props":178,"children":179},{"class":57,"line":79},[180,185,190,195,200,205,210,215,219,224],{"type":13,"tag":55,"props":181,"children":182},{"style":62},[183],{"type":18,"value":184}," device",{"type":13,"tag":55,"props":186,"children":187},{"style":103},[188],{"type":18,"value":189},":",{"type":13,"tag":55,"props":191,"children":192},{"style":103},[193],{"type":18,"value":194}," crate",{"type":13,"tag":55,"props":196,"children":197},{"style":103},[198],{"type":18,"value":199}," ::",{"type":13,"tag":55,"props":201,"children":202},{"style":62},[203],{"type":18,"value":204}," vk ",{"type":13,"tag":55,"props":206,"children":207},{"style":103},[208],{"type":18,"value":209},"::",{"type":13,"tag":55,"props":211,"children":212},{"style":88},[213],{"type":18,"value":214}," vk",{"type":13,"tag":55,"props":216,"children":217},{"style":103},[218],{"type":18,"value":209},{"type":13,"tag":55,"props":220,"children":221},{"style":88},[222],{"type":18,"value":223},"Device",{"type":13,"tag":55,"props":225,"children":226},{"style":62},[227],{"type":18,"value":96},{"type":13,"tag":55,"props":229,"children":230},{"class":57,"line":99},[231,236,240,245,249,253,258],{"type":13,"tag":55,"props":232,"children":233},{"style":62},[234],{"type":18,"value":235}," p_wait_info",{"type":13,"tag":55,"props":237,"children":238},{"style":103},[239],{"type":18,"value":189},{"type":13,"tag":55,"props":241,"children":242},{"style":103},[243],{"type":18,"value":244}," *const",{"type":13,"tag":55,"props":246,"children":247},{"style":88},[248],{"type":18,"value":214},{"type":13,"tag":55,"props":250,"children":251},{"style":103},[252],{"type":18,"value":209},{"type":13,"tag":55,"props":254,"children":255},{"style":88},[256],{"type":18,"value":257},"SemaphoreWaitInfo",{"type":13,"tag":55,"props":259,"children":260},{"style":62},[261],{"type":18,"value":96},{"type":13,"tag":55,"props":263,"children":264},{"class":57,"line":128},[265,270,274,279],{"type":13,"tag":55,"props":266,"children":267},{"style":62},[268],{"type":18,"value":269}," timeout",{"type":13,"tag":55,"props":271,"children":272},{"style":103},[273],{"type":18,"value":189},{"type":13,"tag":55,"props":275,"children":276},{"style":88},[277],{"type":18,"value":278}," u64",{"type":13,"tag":55,"props":280,"children":281},{"style":62},[282],{"type":18,"value":96},{"type":13,"tag":55,"props":284,"children":286},{"class":57,"line":285},5,[287,292,297,301,305,310],{"type":13,"tag":55,"props":288,"children":289},{"style":62},[290],{"type":18,"value":291},") ",{"type":13,"tag":55,"props":293,"children":294},{"style":103},[295],{"type":18,"value":296},"->",{"type":13,"tag":55,"props":298,"children":299},{"style":88},[300],{"type":18,"value":214},{"type":13,"tag":55,"props":302,"children":303},{"style":103},[304],{"type":18,"value":209},{"type":13,"tag":55,"props":306,"children":307},{"style":88},[308],{"type":18,"value":309},"Result",{"type":13,"tag":55,"props":311,"children":312},{"style":62},[313],{"type":18,"value":314},";\n",{"type":13,"tag":316,"props":317,"children":318},"ul",{},[319,330,349],{"type":13,"tag":320,"props":321,"children":322},"li",{},[323,328],{"type":13,"tag":30,"props":324,"children":326},{"className":325},[],[327],{"type":18,"value":91},{"type":18,"value":329}," is the logical device that owns the semaphores.",{"type":13,"tag":320,"props":331,"children":332},{},[333,339,341,347],{"type":13,"tag":30,"props":334,"children":336},{"className":335},[],[337],{"type":18,"value":338},"pWaitInfo",{"type":18,"value":340}," is a pointer to a ",{"type":13,"tag":21,"props":342,"children":344},{"href":343},"/man/VkSemaphoreWaitInfo",[345],{"type":18,"value":346},"VkSemaphoreWaitInfo",{"type":18,"value":348}," structure\ncontaining information about the wait condition.",{"type":13,"tag":320,"props":350,"children":351},{},[352,358,360,365,367,372,374,377],{"type":13,"tag":30,"props":353,"children":355},{"className":354},[],[356],{"type":18,"value":357},"timeout",{"type":18,"value":359}," is the timeout period in units of nanoseconds.\n",{"type":13,"tag":30,"props":361,"children":363},{"className":362},[],[364],{"type":18,"value":357},{"type":18,"value":366}," is adjusted to the closest value allowed by the\nimplementation-dependent timeout accuracy, which ",{"type":13,"tag":368,"props":369,"children":371},"normative",{"type":370},"may",[],{"type":18,"value":373}," be substantially\nlonger than one nanosecond, and ",{"type":13,"tag":368,"props":375,"children":376},{"type":370},[],{"type":18,"value":378}," be longer than the requested\nperiod.",{"type":13,"tag":14,"props":380,"children":381},{},[382,384,389,391,396,398,403,405,410,412,417],{"type":18,"value":383},"If the condition is satisfied when ",{"type":13,"tag":30,"props":385,"children":387},{"className":386},[],[388],{"type":18,"value":4},{"type":18,"value":390}," is called, then\n",{"type":13,"tag":30,"props":392,"children":394},{"className":393},[],[395],{"type":18,"value":4},{"type":18,"value":397}," returns immediately.\nIf the condition is not satisfied at the time ",{"type":13,"tag":30,"props":399,"children":401},{"className":400},[],[402],{"type":18,"value":4},{"type":18,"value":404}," is\ncalled, then ",{"type":13,"tag":30,"props":406,"children":408},{"className":407},[],[409],{"type":18,"value":4},{"type":18,"value":411}," will block and wait until the condition\nis satisfied or the ",{"type":13,"tag":30,"props":413,"children":415},{"className":414},[],[416],{"type":18,"value":357},{"type":18,"value":418}," has expired, whichever is sooner.",{"type":13,"tag":14,"props":420,"children":421},{},[422,424,429,431,436,438,444],{"type":18,"value":423},"If ",{"type":13,"tag":30,"props":425,"children":427},{"className":426},[],[428],{"type":18,"value":357},{"type":18,"value":430}," is zero, then ",{"type":13,"tag":30,"props":432,"children":434},{"className":433},[],[435],{"type":18,"value":4},{"type":18,"value":437}," does not wait, but\nsimply returns information about the current state of the semaphores.\n",{"type":13,"tag":30,"props":439,"children":441},{"className":440},[],[442],{"type":18,"value":443},"VK_TIMEOUT",{"type":18,"value":445}," will be returned in this case if the condition is not\nsatisfied, even though no actual wait was performed.",{"type":13,"tag":14,"props":447,"children":448},{},[449,451,456,458,463,465,471,473,478,479,484,486,491],{"type":18,"value":450},"If the condition is satisfied before the ",{"type":13,"tag":30,"props":452,"children":454},{"className":453},[],[455],{"type":18,"value":357},{"type":18,"value":457}," has expired,\n",{"type":13,"tag":30,"props":459,"children":461},{"className":460},[],[462],{"type":18,"value":4},{"type":18,"value":464}," returns ",{"type":13,"tag":30,"props":466,"children":468},{"className":467},[],[469],{"type":18,"value":470},"VK_SUCCESS",{"type":18,"value":472},".\nOtherwise, ",{"type":13,"tag":30,"props":474,"children":476},{"className":475},[],[477],{"type":18,"value":4},{"type":18,"value":464},{"type":13,"tag":30,"props":480,"children":482},{"className":481},[],[483],{"type":18,"value":443},{"type":18,"value":485}," after the\n",{"type":13,"tag":30,"props":487,"children":489},{"className":488},[],[490],{"type":18,"value":357},{"type":18,"value":492}," has expired.",{"type":13,"tag":14,"props":494,"children":495},{},[496,498,504,506,511,513,517,519,524,526,532],{"type":18,"value":497},"If device loss occurs (see ",{"type":13,"tag":21,"props":499,"children":501},{"href":500},"/chapters/devsandqueues#devsandqueues-lost-device",[502],{"type":18,"value":503},"Lost Device",{"type":18,"value":505},") before\nthe timeout has expired, ",{"type":13,"tag":30,"props":507,"children":509},{"className":508},[],[510],{"type":18,"value":4},{"type":18,"value":512}," ",{"type":13,"tag":368,"props":514,"children":516},{"type":515},"must",[],{"type":18,"value":518}," return in finite time\nwith either ",{"type":13,"tag":30,"props":520,"children":522},{"className":521},[],[523],{"type":18,"value":470},{"type":18,"value":525}," or ",{"type":13,"tag":30,"props":527,"children":529},{"className":528},[],[530],{"type":18,"value":531},"VK_ERROR_DEVICE_LOST",{"type":18,"value":533},".",{"type":13,"tag":535,"props":536,"children":538},"validity-group",{"name":537},"Valid Usage (Implicit)",[539,566],{"type":13,"tag":540,"props":541,"children":543},"validity-field",{"name":542},"VUID-vkWaitSemaphores-device-parameter",[544],{"type":13,"tag":14,"props":545,"children":546},{},[547,552,553,556,558,564],{"type":13,"tag":30,"props":548,"children":550},{"className":549},[],[551],{"type":18,"value":91},{"type":18,"value":512},{"type":13,"tag":368,"props":554,"children":555},{"type":515},[],{"type":18,"value":557}," be a valid ",{"type":13,"tag":21,"props":559,"children":561},{"href":560},"/man/VkDevice",[562],{"type":18,"value":563},"VkDevice",{"type":18,"value":565}," handle",{"type":13,"tag":540,"props":567,"children":569},{"name":568},"VUID-vkWaitSemaphores-pWaitInfo-parameter",[570],{"type":13,"tag":14,"props":571,"children":572},{},[573,578,579,582,584,588],{"type":13,"tag":30,"props":574,"children":576},{"className":575},[],[577],{"type":18,"value":338},{"type":18,"value":512},{"type":13,"tag":368,"props":580,"children":581},{"type":515},[],{"type":18,"value":583}," be a valid pointer to a valid ",{"type":13,"tag":21,"props":585,"children":586},{"href":343},[587],{"type":18,"value":346},{"type":18,"value":589}," structure",{"type":13,"tag":591,"props":592,"children":593},"style",{},[594],{"type":18,"value":595},"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":49,"searchDepth":79,"depth":79,"links":597},[],"markdown",1725732624078]