[{"data":1,"prerenderedAt":206},["ShallowReactive",2],{"bpTjIAyKgK":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":205,"_id":4},"VkSemaphore","Opaque handle to a semaphore object","VK_VERSION_1_0","handles",[],{"type":10,"children":11,"toc":203},"root",[12,74,79,106,119,197],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17,20,25,27,34,36,41,43,46,48,51,53,56,58,64,66,72],{"type":18,"value":19},"text","Semaphores are a synchronization primitive that ",{"type":13,"tag":21,"props":22,"children":24},"normative",{"type":23},"can",[],{"type":18,"value":26}," be used to insert a\ndependency\nbetween queue operations or between a queue operation and the host.\n",{"type":13,"tag":28,"props":29,"children":31},"a",{"href":30},"/chapters/lexicon#glossary",[32],{"type":18,"value":33},"Binary semaphores",{"type":18,"value":35}," have two states - signaled and unsignaled.\n",{"type":13,"tag":28,"props":37,"children":38},{"href":30},[39],{"type":18,"value":40},"Timeline semaphores",{"type":18,"value":42}," have a strictly increasing 64-bit unsigned\ninteger payload and are signaled with respect to a particular reference\nvalue.\nA semaphore ",{"type":13,"tag":21,"props":44,"children":45},{"type":23},[],{"type":18,"value":47}," be signaled after execution of a queue operation is\ncompleted, and a queue operation ",{"type":13,"tag":21,"props":49,"children":50},{"type":23},[],{"type":18,"value":52}," wait for a semaphore to become\nsignaled before it begins execution.\nA timeline semaphore ",{"type":13,"tag":21,"props":54,"children":55},{"type":23},[],{"type":18,"value":57}," additionally be signaled from the host with the\n",{"type":13,"tag":28,"props":59,"children":61},{"href":60},"/man/vkSignalSemaphore",[62],{"type":18,"value":63},"vkSignalSemaphore",{"type":18,"value":65}," command and waited on from the host with the\n",{"type":13,"tag":28,"props":67,"children":69},{"href":68},"/man/vkWaitSemaphores",[70],{"type":18,"value":71},"vkWaitSemaphores",{"type":18,"value":73}," command.",{"type":13,"tag":75,"props":76,"children":78},"anchor",{"id":77},"synchronization-semaphores-payloads",[],{"type":13,"tag":14,"props":80,"children":81},{},[82,84,88,90,96,98,104],{"type":18,"value":83},"The internal data of a semaphore ",{"type":13,"tag":21,"props":85,"children":87},{"type":86},"may",[],{"type":18,"value":89}," include a reference to any resources\nand pending work associated with signal or unsignal operations performed on\nthat semaphore object, collectively referred to as the semaphore’s\n",{"type":13,"tag":91,"props":92,"children":93},"em",{},[94],{"type":18,"value":95},"payload",{"type":18,"value":97},".\nMechanisms to import and export that internal data to and from semaphores\nare provided ",{"type":13,"tag":28,"props":99,"children":101},{"href":100},"/man/VkExportSemaphoreCreateInfo#VkExportSemaphoreCreateInfo",[102],{"type":18,"value":103},"below",{"type":18,"value":105},".\nThese mechanisms indirectly enable applications to share semaphore state\nbetween two or more semaphores and other synchronization primitives across\nprocess and API boundaries.",{"type":13,"tag":14,"props":107,"children":108},{},[109,111,117],{"type":18,"value":110},"Semaphores are represented by ",{"type":13,"tag":112,"props":113,"children":115},"code",{"className":114},[],[116],{"type":18,"value":4},{"type":18,"value":118}," handles:",{"type":13,"tag":120,"props":121,"children":122},"code-group",{},[123,153],{"type":13,"tag":124,"props":125,"children":131},"pre",{"className":126,"code":127,"filename":128,"language":129,"meta":130,"style":130},"language-c shiki shiki-themes github-light-default github-dark-default","VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore)\n","C","c","",[132],{"type":13,"tag":112,"props":133,"children":134},{"__ignoreMap":130},[135],{"type":13,"tag":136,"props":137,"children":140},"span",{"class":138,"line":139},"line",1,[141,147],{"type":13,"tag":136,"props":142,"children":144},{"style":143},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[145],{"type":18,"value":146},"VK_DEFINE_NON_DISPATCHABLE_HANDLE",{"type":13,"tag":136,"props":148,"children":150},{"style":149},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[151],{"type":18,"value":152},"(VkSemaphore)\n",{"type":13,"tag":124,"props":154,"children":159},{"className":155,"code":156,"filename":157,"language":158,"meta":130,"style":130},"language-rs shiki shiki-themes github-light-default github-dark-default","#[repr(transparent)]\npub struct Semaphore(_);\n","Rust","rs",[160],{"type":13,"tag":112,"props":161,"children":162},{"__ignoreMap":130},[163,171],{"type":13,"tag":136,"props":164,"children":165},{"class":138,"line":139},[166],{"type":13,"tag":136,"props":167,"children":168},{"style":149},[169],{"type":18,"value":170},"#[repr(transparent)]\n",{"type":13,"tag":136,"props":172,"children":174},{"class":138,"line":173},2,[175,181,186,192],{"type":13,"tag":136,"props":176,"children":178},{"style":177},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[179],{"type":18,"value":180},"pub",{"type":13,"tag":136,"props":182,"children":183},{"style":177},[184],{"type":18,"value":185}," struct",{"type":13,"tag":136,"props":187,"children":189},{"style":188},"--shiki-default:#953800;--shiki-dark:#FFA657",[190],{"type":18,"value":191}," Semaphore",{"type":13,"tag":136,"props":193,"children":194},{"style":149},[195],{"type":18,"value":196},"(_);\n",{"type":13,"tag":198,"props":199,"children":200},"style",{},[201],{"type":18,"value":202},"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":130,"searchDepth":173,"depth":173,"links":204},[],"markdown",1729612479923]