[{"data":1,"prerenderedAt":560},["ShallowReactive",2],{"lZs4XQF717":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":559,"_id":4},"vkGetFenceFdKHR","Get a POSIX file descriptor handle for a fence","VK_KHR_external_fence_fd","protos",[],{"type":10,"children":11,"toc":557},"root",[12,20,298,344,368,385,433,451,469,551],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17],{"type":18,"value":19},"text","To export a POSIX file descriptor representing the payload of a fence, 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 vkGetFenceFdKHR(\n VkDevice device,\n const VkFenceGetFdInfoKHR* pGetFdInfo,\n int* pFd);\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}," VkFenceGetFdInfoKHR",{"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}," pGetFdInfo",{"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}," int*",{"type":13,"tag":38,"props":118,"children":119},{"style":70},[120],{"type":18,"value":121}," pFd",{"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 get_fence_fd_khr(\n device: crate :: vk :: vk::Device,\n p_get_fd_info: *const vk::FenceGetFdInfoKHR,\n p_fd: *mut c_int,\n) -> vk::Result;\n","Rust","rs",[134],{"type":13,"tag":34,"props":135,"children":136},{"__ignoreMap":31},[137,159,210,244,266],{"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}," get_fence_fd_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_get_fd_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},"FenceGetFdInfoKHR",{"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],{"type":13,"tag":38,"props":248,"children":249},{"style":45},[250],{"type":18,"value":251}," p_fd",{"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":45},[264],{"type":18,"value":265}," c_int,\n",{"type":13,"tag":38,"props":267,"children":269},{"class":40,"line":268},5,[270,275,280,284,288,293],{"type":13,"tag":38,"props":271,"children":272},{"style":45},[273],{"type":18,"value":274},") ",{"type":13,"tag":38,"props":276,"children":277},{"style":85},[278],{"type":18,"value":279},"->",{"type":13,"tag":38,"props":281,"children":282},{"style":70},[283],{"type":18,"value":196},{"type":13,"tag":38,"props":285,"children":286},{"style":85},[287],{"type":18,"value":191},{"type":13,"tag":38,"props":289,"children":290},{"style":70},[291],{"type":18,"value":292},"Result",{"type":13,"tag":38,"props":294,"children":295},{"style":45},[296],{"type":18,"value":297},";\n",{"type":13,"tag":299,"props":300,"children":301},"ul",{},[302,313,333],{"type":13,"tag":303,"props":304,"children":305},"li",{},[306,311],{"type":13,"tag":34,"props":307,"children":309},{"className":308},[],[310],{"type":18,"value":73},{"type":18,"value":312}," is the logical device that created the fence being\nexported.",{"type":13,"tag":303,"props":314,"children":315},{},[316,322,324,331],{"type":13,"tag":34,"props":317,"children":319},{"className":318},[],[320],{"type":18,"value":321},"pGetFdInfo",{"type":18,"value":323}," is a pointer to a ",{"type":13,"tag":325,"props":326,"children":328},"a",{"href":327},"/man/VkFenceGetFdInfoKHR",[329],{"type":18,"value":330},"VkFenceGetFdInfoKHR",{"type":18,"value":332}," structure\ncontaining parameters of the export operation.",{"type":13,"tag":303,"props":334,"children":335},{},[336,342],{"type":13,"tag":34,"props":337,"children":339},{"className":338},[],[340],{"type":18,"value":341},"pFd",{"type":18,"value":343}," will return the file descriptor representing the fence\npayload.",{"type":13,"tag":14,"props":345,"children":346},{},[347,349,354,356,361,363,366],{"type":18,"value":348},"Each call to ",{"type":13,"tag":34,"props":350,"children":352},{"className":351},[],[353],{"type":18,"value":4},{"type":18,"value":355}," ",{"type":13,"tag":357,"props":358,"children":360},"normative",{"type":359},"must",[],{"type":18,"value":362}," create a new file descriptor and\ntransfer ownership of it to the application.\nTo avoid leaking resources, the application ",{"type":13,"tag":357,"props":364,"children":365},{"type":359},[],{"type":18,"value":367}," release ownership of the\nfile descriptor when it is no longer needed.",{"type":13,"tag":369,"props":370,"children":371},"note",{},[372],{"type":13,"tag":14,"props":373,"children":374},{},[375,377,383],{"type":18,"value":376},"Ownership can be released in many ways.\nFor example, the application can call ",{"type":13,"tag":34,"props":378,"children":380},{"className":379},[],[381],{"type":18,"value":382},"close",{"type":18,"value":384},"() on the file descriptor,\nor transfer ownership back to Vulkan by using the file descriptor to import\na fence payload.",{"type":13,"tag":14,"props":386,"children":387},{},[388,390,396,398,404,406,411,413,418,419,423,425,431],{"type":18,"value":389},"If ",{"type":13,"tag":34,"props":391,"children":393},{"className":392},[],[394],{"type":18,"value":395},"pGetFdInfo→handleType",{"type":18,"value":397}," is\n",{"type":13,"tag":34,"props":399,"children":401},{"className":400},[],[402],{"type":18,"value":403},"VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT",{"type":18,"value":405}," and the fence is signaled at\nthe time ",{"type":13,"tag":34,"props":407,"children":409},{"className":408},[],[410],{"type":18,"value":4},{"type":18,"value":412}," is called, ",{"type":13,"tag":34,"props":414,"children":416},{"className":415},[],[417],{"type":18,"value":341},{"type":18,"value":355},{"type":13,"tag":357,"props":420,"children":422},{"type":421},"may",[],{"type":18,"value":424}," return the value\n",{"type":13,"tag":34,"props":426,"children":428},{"className":427},[],[429],{"type":18,"value":430},"-1",{"type":18,"value":432}," instead of a valid file descriptor.",{"type":13,"tag":14,"props":434,"children":435},{},[436,438,441,443,449],{"type":18,"value":437},"Where supported by the operating system, the implementation ",{"type":13,"tag":357,"props":439,"children":440},{"type":359},[],{"type":18,"value":442}," set the\nfile descriptor to be closed automatically when an ",{"type":13,"tag":34,"props":444,"children":446},{"className":445},[],[447],{"type":18,"value":448},"execve",{"type":18,"value":450}," system call\nis made.",{"type":13,"tag":14,"props":452,"children":453},{},[454,456,459,461,467],{"type":18,"value":455},"Exporting a file descriptor from a fence ",{"type":13,"tag":357,"props":457,"children":458},{"type":421},[],{"type":18,"value":460}," have side effects depending on\nthe transference of the specified handle type, as described in\n",{"type":13,"tag":325,"props":462,"children":464},{"href":463},"/chapters/synchronization#synchronization-fences-importing",[465],{"type":18,"value":466},"Importing Fence State",{"type":18,"value":468},".",{"type":13,"tag":470,"props":471,"children":473},"validity-group",{"name":472},"Valid Usage (Implicit)",[474,501,525],{"type":13,"tag":475,"props":476,"children":478},"validity-field",{"name":477},"VUID-vkGetFenceFdKHR-device-parameter",[479],{"type":13,"tag":14,"props":480,"children":481},{},[482,487,488,491,493,499],{"type":13,"tag":34,"props":483,"children":485},{"className":484},[],[486],{"type":18,"value":73},{"type":18,"value":355},{"type":13,"tag":357,"props":489,"children":490},{"type":359},[],{"type":18,"value":492}," be a valid ",{"type":13,"tag":325,"props":494,"children":496},{"href":495},"/man/VkDevice",[497],{"type":18,"value":498},"VkDevice",{"type":18,"value":500}," handle",{"type":13,"tag":475,"props":502,"children":504},{"name":503},"VUID-vkGetFenceFdKHR-pGetFdInfo-parameter",[505],{"type":13,"tag":14,"props":506,"children":507},{},[508,513,514,517,519,523],{"type":13,"tag":34,"props":509,"children":511},{"className":510},[],[512],{"type":18,"value":321},{"type":18,"value":355},{"type":13,"tag":357,"props":515,"children":516},{"type":359},[],{"type":18,"value":518}," be a valid pointer to a valid ",{"type":13,"tag":325,"props":520,"children":521},{"href":327},[522],{"type":18,"value":330},{"type":18,"value":524}," structure",{"type":13,"tag":475,"props":526,"children":528},{"name":527},"VUID-vkGetFenceFdKHR-pFd-parameter",[529],{"type":13,"tag":14,"props":530,"children":531},{},[532,537,538,541,543,549],{"type":13,"tag":34,"props":533,"children":535},{"className":534},[],[536],{"type":18,"value":341},{"type":18,"value":355},{"type":13,"tag":357,"props":539,"children":540},{"type":359},[],{"type":18,"value":542}," be a valid pointer to an ",{"type":13,"tag":34,"props":544,"children":546},{"className":545},[],[547],{"type":18,"value":548},"int",{"type":18,"value":550}," value",{"type":13,"tag":552,"props":553,"children":554},"style",{},[555],{"type":18,"value":556},"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":558},[],"markdown",1725732618245]