[{"data":1,"prerenderedAt":695},["ShallowReactive",2],{"3ts9mPxPae":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":694,"_id":4},"VkImportMemoryFdInfoKHR","Import memory created on the same physical device from a file descriptor","VK_KHR_external_memory_fd","structs",[],{"type":10,"children":11,"toc":692},"root",[12,52,285,363,375,399,621,686],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17,20,26,28,35,37,43,45,50],{"type":18,"value":19},"text","To import memory from a POSIX file descriptor handle, add a\n",{"type":13,"tag":21,"props":22,"children":24},"a",{"href":23},"/man/VkImportMemoryFdInfoKHR",[25],{"type":18,"value":4},{"type":18,"value":27}," structure to the ",{"type":13,"tag":29,"props":30,"children":32},"code",{"className":31},[],[33],{"type":18,"value":34},"pNext",{"type":18,"value":36}," chain of the\n",{"type":13,"tag":21,"props":38,"children":40},{"href":39},"/man/VkMemoryAllocateInfo",[41],{"type":18,"value":42},"VkMemoryAllocateInfo",{"type":18,"value":44}," structure.\nThe ",{"type":13,"tag":29,"props":46,"children":48},{"className":47},[],[49],{"type":18,"value":4},{"type":18,"value":51}," structure is defined as:",{"type":13,"tag":53,"props":54,"children":55},"code-group",{},[56,151],{"type":13,"tag":57,"props":58,"children":64},"pre",{"className":59,"code":60,"filename":61,"language":62,"meta":63,"style":63},"language-c shiki shiki-themes github-light-default github-dark-default","typedef struct VkImportMemoryFdInfoKHR {\n VkStructureType sType;\n const void* pNext;\n VkExternalMemoryHandleTypeFlagBits handleType;\n int fd;\n} VkImportMemoryFdInfoKHR;\n","C","c","",[65],{"type":13,"tag":29,"props":66,"children":67},{"__ignoreMap":63},[68,91,100,119,128,142],{"type":13,"tag":69,"props":70,"children":73},"span",{"class":71,"line":72},"line",1,[74,80,85],{"type":13,"tag":69,"props":75,"children":77},{"style":76},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[78],{"type":18,"value":79},"typedef",{"type":13,"tag":69,"props":81,"children":82},{"style":76},[83],{"type":18,"value":84}," struct",{"type":13,"tag":69,"props":86,"children":88},{"style":87},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[89],{"type":18,"value":90}," VkImportMemoryFdInfoKHR {\n",{"type":13,"tag":69,"props":92,"children":94},{"class":71,"line":93},2,[95],{"type":13,"tag":69,"props":96,"children":97},{"style":87},[98],{"type":18,"value":99}," VkStructureType sType;\n",{"type":13,"tag":69,"props":101,"children":103},{"class":71,"line":102},3,[104,109,114],{"type":13,"tag":69,"props":105,"children":106},{"style":76},[107],{"type":18,"value":108}," const",{"type":13,"tag":69,"props":110,"children":111},{"style":76},[112],{"type":18,"value":113}," void*",{"type":13,"tag":69,"props":115,"children":116},{"style":87},[117],{"type":18,"value":118}," pNext;\n",{"type":13,"tag":69,"props":120,"children":122},{"class":71,"line":121},4,[123],{"type":13,"tag":69,"props":124,"children":125},{"style":87},[126],{"type":18,"value":127}," VkExternalMemoryHandleTypeFlagBits handleType;\n",{"type":13,"tag":69,"props":129,"children":131},{"class":71,"line":130},5,[132,137],{"type":13,"tag":69,"props":133,"children":134},{"style":76},[135],{"type":18,"value":136}," int",{"type":13,"tag":69,"props":138,"children":139},{"style":87},[140],{"type":18,"value":141}," fd;\n",{"type":13,"tag":69,"props":143,"children":145},{"class":71,"line":144},6,[146],{"type":13,"tag":69,"props":147,"children":148},{"style":87},[149],{"type":18,"value":150},"} VkImportMemoryFdInfoKHR;\n",{"type":13,"tag":57,"props":152,"children":157},{"className":153,"code":154,"filename":155,"language":156,"meta":63,"style":63},"language-rs shiki shiki-themes github-light-default github-dark-default","pub struct ImportMemoryFdInfoKHR {\n s_type: vk::StructureType,\n p_next: *const c_void,\n handle_type: ExternalMemoryHandleTypeFlags,\n fd: c_int,\n}\n","Rust","rs",[158],{"type":13,"tag":29,"props":159,"children":160},{"__ignoreMap":63},[161,184,217,239,260,277],{"type":13,"tag":69,"props":162,"children":163},{"class":71,"line":72},[164,169,173,179],{"type":13,"tag":69,"props":165,"children":166},{"style":76},[167],{"type":18,"value":168},"pub",{"type":13,"tag":69,"props":170,"children":171},{"style":76},[172],{"type":18,"value":84},{"type":13,"tag":69,"props":174,"children":176},{"style":175},"--shiki-default:#953800;--shiki-dark:#FFA657",[177],{"type":18,"value":178}," ImportMemoryFdInfoKHR",{"type":13,"tag":69,"props":180,"children":181},{"style":87},[182],{"type":18,"value":183}," {\n",{"type":13,"tag":69,"props":185,"children":186},{"class":71,"line":93},[187,192,197,202,207,212],{"type":13,"tag":69,"props":188,"children":189},{"style":87},[190],{"type":18,"value":191}," s_type",{"type":13,"tag":69,"props":193,"children":194},{"style":76},[195],{"type":18,"value":196},":",{"type":13,"tag":69,"props":198,"children":199},{"style":175},[200],{"type":18,"value":201}," vk",{"type":13,"tag":69,"props":203,"children":204},{"style":76},[205],{"type":18,"value":206},"::",{"type":13,"tag":69,"props":208,"children":209},{"style":175},[210],{"type":18,"value":211},"StructureType",{"type":13,"tag":69,"props":213,"children":214},{"style":87},[215],{"type":18,"value":216},",\n",{"type":13,"tag":69,"props":218,"children":219},{"class":71,"line":102},[220,225,229,234],{"type":13,"tag":69,"props":221,"children":222},{"style":87},[223],{"type":18,"value":224}," p_next",{"type":13,"tag":69,"props":226,"children":227},{"style":76},[228],{"type":18,"value":196},{"type":13,"tag":69,"props":230,"children":231},{"style":76},[232],{"type":18,"value":233}," *const",{"type":13,"tag":69,"props":235,"children":236},{"style":87},[237],{"type":18,"value":238}," c_void,\n",{"type":13,"tag":69,"props":240,"children":241},{"class":71,"line":121},[242,247,251,256],{"type":13,"tag":69,"props":243,"children":244},{"style":87},[245],{"type":18,"value":246}," handle_type",{"type":13,"tag":69,"props":248,"children":249},{"style":76},[250],{"type":18,"value":196},{"type":13,"tag":69,"props":252,"children":253},{"style":175},[254],{"type":18,"value":255}," ExternalMemoryHandleTypeFlags",{"type":13,"tag":69,"props":257,"children":258},{"style":87},[259],{"type":18,"value":216},{"type":13,"tag":69,"props":261,"children":262},{"class":71,"line":130},[263,268,272],{"type":13,"tag":69,"props":264,"children":265},{"style":87},[266],{"type":18,"value":267}," fd",{"type":13,"tag":69,"props":269,"children":270},{"style":76},[271],{"type":18,"value":196},{"type":13,"tag":69,"props":273,"children":274},{"style":87},[275],{"type":18,"value":276}," c_int,\n",{"type":13,"tag":69,"props":278,"children":279},{"class":71,"line":144},[280],{"type":13,"tag":69,"props":281,"children":282},{"style":87},[283],{"type":18,"value":284},"}\n",{"type":13,"tag":286,"props":287,"children":288},"ul",{},[289,309,327,353],{"type":13,"tag":290,"props":291,"children":292},"li",{},[293,299,301,307],{"type":13,"tag":29,"props":294,"children":296},{"className":295},[],[297],{"type":18,"value":298},"sType",{"type":18,"value":300}," is a ",{"type":13,"tag":21,"props":302,"children":304},{"href":303},"/man/VkStructureType",[305],{"type":18,"value":306},"VkStructureType",{"type":18,"value":308}," value identifying this structure.",{"type":13,"tag":290,"props":310,"children":311},{},[312,317,319,325],{"type":13,"tag":29,"props":313,"children":315},{"className":314},[],[316],{"type":18,"value":34},{"type":18,"value":318}," is ",{"type":13,"tag":29,"props":320,"children":322},{"className":321},[],[323],{"type":18,"value":324},"NULL",{"type":18,"value":326}," or a pointer to a structure extending this\nstructure.",{"type":13,"tag":290,"props":328,"children":329},{},[330,336,337,343,345,351],{"type":13,"tag":29,"props":331,"children":333},{"className":332},[],[334],{"type":18,"value":335},"handleType",{"type":18,"value":300},{"type":13,"tag":21,"props":338,"children":340},{"href":339},"/man/VkExternalMemoryHandleTypeFlagBits",[341],{"type":18,"value":342},"VkExternalMemoryHandleTypeFlagBits",{"type":18,"value":344}," value\nspecifying the handle type of ",{"type":13,"tag":29,"props":346,"children":348},{"className":347},[],[349],{"type":18,"value":350},"fd",{"type":18,"value":352},".",{"type":13,"tag":290,"props":354,"children":355},{},[356,361],{"type":13,"tag":29,"props":357,"children":359},{"className":358},[],[360],{"type":18,"value":350},{"type":18,"value":362}," is the external handle to import.",{"type":13,"tag":14,"props":364,"children":365},{},[366,368,373],{"type":18,"value":367},"Importing memory from a file descriptor transfers ownership of the file\ndescriptor from the application to the Vulkan implementation.\nThe application ",{"type":13,"tag":369,"props":370,"children":372},"normative",{"type":371},"must",[],{"type":18,"value":374}," not perform any operations on the file descriptor\nafter a successful import.\nThe imported memory object holds a reference to its payload.",{"type":13,"tag":14,"props":376,"children":377},{},[378,380,384,386,389,391,397],{"type":18,"value":379},"Applications ",{"type":13,"tag":369,"props":381,"children":383},{"type":382},"can",[],{"type":18,"value":385}," import the same payload into multiple instances of Vulkan,\ninto the same instance from which it was exported, and multiple times into a\ngiven Vulkan instance.\nIn all cases, each import operation ",{"type":13,"tag":369,"props":387,"children":388},{"type":371},[],{"type":18,"value":390}," create a distinct\n",{"type":13,"tag":29,"props":392,"children":394},{"className":393},[],[395],{"type":18,"value":396},"VkDeviceMemory",{"type":18,"value":398}," object.",{"type":13,"tag":400,"props":401,"children":403},"validity-group",{"name":402},"Valid Usage",[404,448,475,513,551,591],{"type":13,"tag":405,"props":406,"children":408},"validity-field",{"name":407},"VUID-VkImportMemoryFdInfoKHR-handleType-00667",[409],{"type":13,"tag":14,"props":410,"children":411},{},[412,414,419,421,427,429,432,434,440,442],{"type":18,"value":413},"If ",{"type":13,"tag":29,"props":415,"children":417},{"className":416},[],[418],{"type":18,"value":335},{"type":18,"value":420}," is not ",{"type":13,"tag":29,"props":422,"children":424},{"className":423},[],[425],{"type":18,"value":426},"0",{"type":18,"value":428},", it ",{"type":13,"tag":369,"props":430,"children":431},{"type":371},[],{"type":18,"value":433}," be supported for import, as\nreported by ",{"type":13,"tag":21,"props":435,"children":437},{"href":436},"/man/VkExternalImageFormatProperties",[438],{"type":18,"value":439},"VkExternalImageFormatProperties",{"type":18,"value":441}," or\n",{"type":13,"tag":21,"props":443,"children":445},{"href":444},"/man/VkExternalBufferProperties",[446],{"type":18,"value":447},"VkExternalBufferProperties",{"type":13,"tag":405,"props":449,"children":451},{"name":450},"VUID-VkImportMemoryFdInfoKHR-fd-00668",[452],{"type":13,"tag":14,"props":453,"children":454},{},[455,457,462,464,467,469],{"type":18,"value":456},"The memory from which ",{"type":13,"tag":29,"props":458,"children":460},{"className":459},[],[461],{"type":18,"value":350},{"type":18,"value":463}," was exported ",{"type":13,"tag":369,"props":465,"children":466},{"type":371},[],{"type":18,"value":468}," have been created on\nthe same underlying physical device as ",{"type":13,"tag":29,"props":470,"children":472},{"className":471},[],[473],{"type":18,"value":474},"device",{"type":13,"tag":405,"props":476,"children":478},{"name":477},"VUID-VkImportMemoryFdInfoKHR-handleType-00669",[479],{"type":13,"tag":14,"props":480,"children":481},{},[482,483,488,489,494,495,498,500,506,507],{"type":18,"value":413},{"type":13,"tag":29,"props":484,"children":486},{"className":485},[],[487],{"type":18,"value":335},{"type":18,"value":420},{"type":13,"tag":29,"props":490,"children":492},{"className":491},[],[493],{"type":18,"value":426},{"type":18,"value":428},{"type":13,"tag":369,"props":496,"children":497},{"type":371},[],{"type":18,"value":499}," be\n",{"type":13,"tag":29,"props":501,"children":503},{"className":502},[],[504],{"type":18,"value":505},"VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT",{"type":18,"value":441},{"type":13,"tag":29,"props":508,"children":510},{"className":509},[],[511],{"type":18,"value":512},"VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT",{"type":13,"tag":405,"props":514,"children":516},{"name":515},"VUID-VkImportMemoryFdInfoKHR-handleType-00670",[517],{"type":13,"tag":14,"props":518,"children":519},{},[520,521,526,527,532,534,539,541,544,546],{"type":18,"value":413},{"type":13,"tag":29,"props":522,"children":524},{"className":523},[],[525],{"type":18,"value":335},{"type":18,"value":420},{"type":13,"tag":29,"props":528,"children":530},{"className":529},[],[531],{"type":18,"value":426},{"type":18,"value":533},", ",{"type":13,"tag":29,"props":535,"children":537},{"className":536},[],[538],{"type":18,"value":350},{"type":18,"value":540}," ",{"type":13,"tag":369,"props":542,"children":543},{"type":371},[],{"type":18,"value":545}," be a valid handle of the\ntype specified by ",{"type":13,"tag":29,"props":547,"children":549},{"className":548},[],[550],{"type":18,"value":335},{"type":13,"tag":405,"props":552,"children":554},{"name":553},"VUID-VkImportMemoryFdInfoKHR-fd-01746",[555],{"type":13,"tag":14,"props":556,"children":557},{},[558,560,565,566,569,571,576,578,583,585],{"type":18,"value":559},"The memory represented by ",{"type":13,"tag":29,"props":561,"children":563},{"className":562},[],[564],{"type":18,"value":350},{"type":18,"value":540},{"type":13,"tag":369,"props":567,"children":568},{"type":371},[],{"type":18,"value":570}," have been created from a\nphysical device and driver that is compatible with ",{"type":13,"tag":29,"props":572,"children":574},{"className":573},[],[575],{"type":18,"value":474},{"type":18,"value":577}," and\n",{"type":13,"tag":29,"props":579,"children":581},{"className":580},[],[582],{"type":18,"value":335},{"type":18,"value":584},", as described in\n",{"type":13,"tag":21,"props":586,"children":588},{"href":587},"/man/VkExternalMemoryHandleTypeFlagBits#external-memory-handle-types-compatibility",[589],{"type":18,"value":590},"Table 1. External Memory Handle Types Compatibility",{"type":13,"tag":405,"props":592,"children":594},{"name":593},"VUID-VkImportMemoryFdInfoKHR-fd-01520",[595],{"type":13,"tag":14,"props":596,"children":597},{},[598,603,604,607,609,614,616],{"type":13,"tag":29,"props":599,"children":601},{"className":600},[],[602],{"type":18,"value":350},{"type":18,"value":540},{"type":13,"tag":369,"props":605,"children":606},{"type":371},[],{"type":18,"value":608}," obey any requirements listed for ",{"type":13,"tag":29,"props":610,"children":612},{"className":611},[],[613],{"type":18,"value":335},{"type":18,"value":615}," in\n",{"type":13,"tag":21,"props":617,"children":618},{"href":587},[619],{"type":18,"value":620},"external memory handle\ntypes compatibility",{"type":13,"tag":400,"props":622,"children":624},{"name":623},"Valid Usage (Implicit)",[625,649],{"type":13,"tag":405,"props":626,"children":628},{"name":627},"VUID-VkImportMemoryFdInfoKHR-sType-sType",[629],{"type":13,"tag":14,"props":630,"children":631},{},[632,637,638,641,643],{"type":13,"tag":29,"props":633,"children":635},{"className":634},[],[636],{"type":18,"value":298},{"type":18,"value":540},{"type":13,"tag":369,"props":639,"children":640},{"type":371},[],{"type":18,"value":642}," be ",{"type":13,"tag":29,"props":644,"children":646},{"className":645},[],[647],{"type":18,"value":648},"VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR",{"type":13,"tag":405,"props":650,"children":652},{"name":651},"VUID-VkImportMemoryFdInfoKHR-handleType-parameter",[653],{"type":13,"tag":14,"props":654,"children":655},{},[656,657,662,663,668,669,674,675,678,680,684],{"type":18,"value":413},{"type":13,"tag":29,"props":658,"children":660},{"className":659},[],[661],{"type":18,"value":335},{"type":18,"value":420},{"type":13,"tag":29,"props":664,"children":666},{"className":665},[],[667],{"type":18,"value":426},{"type":18,"value":533},{"type":13,"tag":29,"props":670,"children":672},{"className":671},[],[673],{"type":18,"value":335},{"type":18,"value":540},{"type":13,"tag":369,"props":676,"children":677},{"type":371},[],{"type":18,"value":679}," be a valid ",{"type":13,"tag":21,"props":681,"children":682},{"href":339},[683],{"type":18,"value":342},{"type":18,"value":685}," value",{"type":13,"tag":687,"props":688,"children":689},"style",{},[690],{"type":18,"value":691},"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":63,"searchDepth":93,"depth":93,"links":693},[],"markdown",1729612453905]