[{"data":1,"prerenderedAt":424},["ShallowReactive",2],{"$ftbbexW3XJ7KdKrVbLOmLSZxXZuGAgwCx4xeZ6zL8wsE":3},{"title":4,"description":5,"parent":6,"structextends":7,"type":9,"xrefs":10,"body":11,"_type":423,"_id":4},"VkImportNativeBufferInfoOHOS","Import memory from an Open Harmony OS hardware buffer","VK_OHOS_external_memory",[8],"VkMemoryAllocateInfo","structs",[],{"type":12,"children":13,"toc":421},"root",[14,53,274,335,360,415],{"type":15,"tag":16,"props":17,"children":18},"element","p",{},[19,22,28,30,36,38,44,46,51],{"type":20,"value":21},"text","To import memory created outside of the current Vulkan instance from an Open\nHarmony OS native buffer, add a ",{"type":15,"tag":23,"props":24,"children":26},"code",{"className":25},[],[27],{"type":20,"value":4},{"type":20,"value":29}," structure\nto the ",{"type":15,"tag":23,"props":31,"children":33},{"className":32},[],[34],{"type":20,"value":35},"pNext",{"type":20,"value":37}," chain of the ",{"type":15,"tag":39,"props":40,"children":42},"a",{"href":41},"/man/VkMemoryAllocateInfo",[43],{"type":20,"value":8},{"type":20,"value":45}," structure.\nThe ",{"type":15,"tag":23,"props":47,"children":49},{"className":48},[],[50],{"type":20,"value":4},{"type":20,"value":52}," structure is defined as:",{"type":15,"tag":54,"props":55,"children":56},"code-group",{},[57,153],{"type":15,"tag":58,"props":59,"children":65},"pre",{"className":60,"code":61,"filename":62,"language":63,"meta":64,"style":64},"language-c shiki shiki-themes github-light-default github-dark-default","typedef struct VkImportNativeBufferInfoOHOS {\n VkStructureType sType;\n const void* pNext;\n struct OH_NativeBuffer* buffer;\n} VkImportNativeBufferInfoOHOS;\n","C","c","",[66],{"type":15,"tag":23,"props":67,"children":68},{"__ignoreMap":64},[69,92,101,120,144],{"type":15,"tag":70,"props":71,"children":74},"span",{"class":72,"line":73},"line",1,[75,81,86],{"type":15,"tag":70,"props":76,"children":78},{"style":77},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[79],{"type":20,"value":80},"typedef",{"type":15,"tag":70,"props":82,"children":83},{"style":77},[84],{"type":20,"value":85}," struct",{"type":15,"tag":70,"props":87,"children":89},{"style":88},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[90],{"type":20,"value":91}," VkImportNativeBufferInfoOHOS {\n",{"type":15,"tag":70,"props":93,"children":95},{"class":72,"line":94},2,[96],{"type":15,"tag":70,"props":97,"children":98},{"style":88},[99],{"type":20,"value":100}," VkStructureType sType;\n",{"type":15,"tag":70,"props":102,"children":104},{"class":72,"line":103},3,[105,110,115],{"type":15,"tag":70,"props":106,"children":107},{"style":77},[108],{"type":20,"value":109}," const",{"type":15,"tag":70,"props":111,"children":112},{"style":77},[113],{"type":20,"value":114}," void*",{"type":15,"tag":70,"props":116,"children":117},{"style":88},[118],{"type":20,"value":119}," pNext;\n",{"type":15,"tag":70,"props":121,"children":123},{"class":72,"line":122},4,[124,129,134,139],{"type":15,"tag":70,"props":125,"children":126},{"style":77},[127],{"type":20,"value":128}," struct",{"type":15,"tag":70,"props":130,"children":131},{"style":88},[132],{"type":20,"value":133}," OH_NativeBuffer",{"type":15,"tag":70,"props":135,"children":136},{"style":77},[137],{"type":20,"value":138},"*",{"type":15,"tag":70,"props":140,"children":141},{"style":88},[142],{"type":20,"value":143}," buffer;\n",{"type":15,"tag":70,"props":145,"children":147},{"class":72,"line":146},5,[148],{"type":15,"tag":70,"props":149,"children":150},{"style":88},[151],{"type":20,"value":152},"} VkImportNativeBufferInfoOHOS;\n",{"type":15,"tag":58,"props":154,"children":159},{"className":155,"code":156,"filename":157,"language":158,"meta":64,"style":64},"language-rs shiki shiki-themes github-light-default github-dark-default","pub struct ImportNativeBufferInfoOHOS {\n s_type: vk::StructureType,\n p_next: *const c_void,\n buffer: *mut OH_NativeBuffer,\n}\n","Rust","rs",[160],{"type":15,"tag":23,"props":161,"children":162},{"__ignoreMap":64},[163,186,219,241,266],{"type":15,"tag":70,"props":164,"children":165},{"class":72,"line":73},[166,171,175,181],{"type":15,"tag":70,"props":167,"children":168},{"style":77},[169],{"type":20,"value":170},"pub",{"type":15,"tag":70,"props":172,"children":173},{"style":77},[174],{"type":20,"value":85},{"type":15,"tag":70,"props":176,"children":178},{"style":177},"--shiki-default:#953800;--shiki-dark:#FFA657",[179],{"type":20,"value":180}," ImportNativeBufferInfoOHOS",{"type":15,"tag":70,"props":182,"children":183},{"style":88},[184],{"type":20,"value":185}," {\n",{"type":15,"tag":70,"props":187,"children":188},{"class":72,"line":94},[189,194,199,204,209,214],{"type":15,"tag":70,"props":190,"children":191},{"style":88},[192],{"type":20,"value":193}," s_type",{"type":15,"tag":70,"props":195,"children":196},{"style":77},[197],{"type":20,"value":198},":",{"type":15,"tag":70,"props":200,"children":201},{"style":177},[202],{"type":20,"value":203}," vk",{"type":15,"tag":70,"props":205,"children":206},{"style":77},[207],{"type":20,"value":208},"::",{"type":15,"tag":70,"props":210,"children":211},{"style":177},[212],{"type":20,"value":213},"StructureType",{"type":15,"tag":70,"props":215,"children":216},{"style":88},[217],{"type":20,"value":218},",\n",{"type":15,"tag":70,"props":220,"children":221},{"class":72,"line":103},[222,227,231,236],{"type":15,"tag":70,"props":223,"children":224},{"style":88},[225],{"type":20,"value":226}," p_next",{"type":15,"tag":70,"props":228,"children":229},{"style":77},[230],{"type":20,"value":198},{"type":15,"tag":70,"props":232,"children":233},{"style":77},[234],{"type":20,"value":235}," *const",{"type":15,"tag":70,"props":237,"children":238},{"style":88},[239],{"type":20,"value":240}," c_void,\n",{"type":15,"tag":70,"props":242,"children":243},{"class":72,"line":122},[244,249,253,258,262],{"type":15,"tag":70,"props":245,"children":246},{"style":88},[247],{"type":20,"value":248}," buffer",{"type":15,"tag":70,"props":250,"children":251},{"style":77},[252],{"type":20,"value":198},{"type":15,"tag":70,"props":254,"children":255},{"style":77},[256],{"type":20,"value":257}," *mut",{"type":15,"tag":70,"props":259,"children":260},{"style":177},[261],{"type":20,"value":133},{"type":15,"tag":70,"props":263,"children":264},{"style":88},[265],{"type":20,"value":218},{"type":15,"tag":70,"props":267,"children":268},{"class":72,"line":146},[269],{"type":15,"tag":70,"props":270,"children":271},{"style":88},[272],{"type":20,"value":273},"}\n",{"type":15,"tag":275,"props":276,"children":277},"ul",{},[278,298,316],{"type":15,"tag":279,"props":280,"children":281},"li",{},[282,288,290,296],{"type":15,"tag":23,"props":283,"children":285},{"className":284},[],[286],{"type":20,"value":287},"sType",{"type":20,"value":289}," is a ",{"type":15,"tag":39,"props":291,"children":293},{"href":292},"/man/VkStructureType",[294],{"type":20,"value":295},"VkStructureType",{"type":20,"value":297}," value identifying this structure.",{"type":15,"tag":279,"props":299,"children":300},{},[301,306,308,314],{"type":15,"tag":23,"props":302,"children":304},{"className":303},[],[305],{"type":20,"value":35},{"type":20,"value":307}," is ",{"type":15,"tag":23,"props":309,"children":311},{"className":310},[],[312],{"type":20,"value":313},"NULL",{"type":20,"value":315}," or a pointer to a structure extending this\nstructure.",{"type":15,"tag":279,"props":317,"children":318},{},[319,325,327,333],{"type":15,"tag":23,"props":320,"children":322},{"className":321},[],[323],{"type":20,"value":324},"buffer",{"type":20,"value":326}," is a pointer to an ",{"type":15,"tag":39,"props":328,"children":330},{"href":329},"/man/OH_NativeBuffer",[331],{"type":20,"value":332},"OH_NativeBuffer",{"type":20,"value":334}," structure.",{"type":15,"tag":16,"props":336,"children":337},{},[338,340,346,348,353,355,358],{"type":20,"value":339},"A reference to the imported native buffer should be acquired by the\nimplementation if the ",{"type":15,"tag":39,"props":341,"children":343},{"href":342},"/man/vkAllocateMemory",[344],{"type":20,"value":345},"vkAllocateMemory",{"type":20,"value":347}," command succeeds.\nThen the reference ",{"type":15,"tag":349,"props":350,"children":352},"normative",{"type":351},"must",[],{"type":20,"value":354}," release when the device memory object is freed.\nIf the command fails, the implementation ",{"type":15,"tag":349,"props":356,"children":357},{"type":351},[],{"type":20,"value":359}," not retain a reference.",{"type":15,"tag":361,"props":362,"children":364},"validity-group",{"name":363},"Valid Usage (Implicit)",[365,391],{"type":15,"tag":366,"props":367,"children":369},"validity-field",{"name":368},"VUID-VkImportNativeBufferInfoOHOS-sType-sType",[370],{"type":15,"tag":16,"props":371,"children":372},{},[373,378,380,383,385],{"type":15,"tag":23,"props":374,"children":376},{"className":375},[],[377],{"type":20,"value":287},{"type":20,"value":379}," ",{"type":15,"tag":349,"props":381,"children":382},{"type":351},[],{"type":20,"value":384}," be ",{"type":15,"tag":23,"props":386,"children":388},{"className":387},[],[389],{"type":20,"value":390},"VK_STRUCTURE_TYPE_IMPORT_NATIVE_BUFFER_INFO_OHOS",{"type":15,"tag":366,"props":392,"children":394},{"name":393},"VUID-VkImportNativeBufferInfoOHOS-buffer-parameter",[395],{"type":15,"tag":16,"props":396,"children":397},{},[398,403,404,407,409,413],{"type":15,"tag":23,"props":399,"children":401},{"className":400},[],[402],{"type":20,"value":324},{"type":20,"value":379},{"type":15,"tag":349,"props":405,"children":406},{"type":351},[],{"type":20,"value":408}," be a valid pointer to an ",{"type":15,"tag":39,"props":410,"children":411},{"href":329},[412],{"type":20,"value":332},{"type":20,"value":414}," value",{"type":15,"tag":416,"props":417,"children":418},"style",{},[419],{"type":20,"value":420},"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":64,"searchDepth":94,"depth":94,"links":422},[],"markdown",1773165433184]