[{"data":1,"prerenderedAt":515},["ShallowReactive",2],{"Ccml6MHylT":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":514,"_id":4},"VkImportAndroidHardwareBufferInfoANDROID","Import memory from an Android hardware buffer","VK_ANDROID_external_memory_android_hardware_buffer","structs",[],{"type":10,"children":11,"toc":512},"root",[12,52,273,326,356,451,506],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17,20,26,28,34,36,43,45,50],{"type":18,"value":19},"text","To import memory created outside of the current Vulkan instance from an\nAndroid hardware buffer, add a\n",{"type":13,"tag":21,"props":22,"children":24},"code",{"className":23},[],[25],{"type":18,"value":4},{"type":18,"value":27}," structure to the ",{"type":13,"tag":21,"props":29,"children":31},{"className":30},[],[32],{"type":18,"value":33},"pNext",{"type":18,"value":35},"\nchain of the ",{"type":13,"tag":37,"props":38,"children":40},"a",{"href":39},"/man/VkMemoryAllocateInfo",[41],{"type":18,"value":42},"VkMemoryAllocateInfo",{"type":18,"value":44}," structure.\nThe ",{"type":13,"tag":21,"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,152],{"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 VkImportAndroidHardwareBufferInfoANDROID {\n VkStructureType sType;\n const void* pNext;\n struct AHardwareBuffer* buffer;\n} VkImportAndroidHardwareBufferInfoANDROID;\n","C","c","",[65],{"type":13,"tag":21,"props":66,"children":67},{"__ignoreMap":63},[68,91,100,119,143],{"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}," VkImportAndroidHardwareBufferInfoANDROID {\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,128,133,138],{"type":13,"tag":69,"props":124,"children":125},{"style":76},[126],{"type":18,"value":127}," struct",{"type":13,"tag":69,"props":129,"children":130},{"style":87},[131],{"type":18,"value":132}," AHardwareBuffer",{"type":13,"tag":69,"props":134,"children":135},{"style":76},[136],{"type":18,"value":137},"*",{"type":13,"tag":69,"props":139,"children":140},{"style":87},[141],{"type":18,"value":142}," buffer;\n",{"type":13,"tag":69,"props":144,"children":146},{"class":71,"line":145},5,[147],{"type":13,"tag":69,"props":148,"children":149},{"style":87},[150],{"type":18,"value":151},"} VkImportAndroidHardwareBufferInfoANDROID;\n",{"type":13,"tag":57,"props":153,"children":158},{"className":154,"code":155,"filename":156,"language":157,"meta":63,"style":63},"language-rs shiki shiki-themes github-light-default github-dark-default","pub struct ImportAndroidHardwareBufferInfoANDROID {\n s_type: vk::StructureType,\n p_next: *const c_void,\n buffer: *mut AHardwareBuffer,\n}\n","Rust","rs",[159],{"type":13,"tag":21,"props":160,"children":161},{"__ignoreMap":63},[162,185,218,240,265],{"type":13,"tag":69,"props":163,"children":164},{"class":71,"line":72},[165,170,174,180],{"type":13,"tag":69,"props":166,"children":167},{"style":76},[168],{"type":18,"value":169},"pub",{"type":13,"tag":69,"props":171,"children":172},{"style":76},[173],{"type":18,"value":84},{"type":13,"tag":69,"props":175,"children":177},{"style":176},"--shiki-default:#953800;--shiki-dark:#FFA657",[178],{"type":18,"value":179}," ImportAndroidHardwareBufferInfoANDROID",{"type":13,"tag":69,"props":181,"children":182},{"style":87},[183],{"type":18,"value":184}," {\n",{"type":13,"tag":69,"props":186,"children":187},{"class":71,"line":93},[188,193,198,203,208,213],{"type":13,"tag":69,"props":189,"children":190},{"style":87},[191],{"type":18,"value":192}," s_type",{"type":13,"tag":69,"props":194,"children":195},{"style":76},[196],{"type":18,"value":197},":",{"type":13,"tag":69,"props":199,"children":200},{"style":176},[201],{"type":18,"value":202}," vk",{"type":13,"tag":69,"props":204,"children":205},{"style":76},[206],{"type":18,"value":207},"::",{"type":13,"tag":69,"props":209,"children":210},{"style":176},[211],{"type":18,"value":212},"StructureType",{"type":13,"tag":69,"props":214,"children":215},{"style":87},[216],{"type":18,"value":217},",\n",{"type":13,"tag":69,"props":219,"children":220},{"class":71,"line":102},[221,226,230,235],{"type":13,"tag":69,"props":222,"children":223},{"style":87},[224],{"type":18,"value":225}," p_next",{"type":13,"tag":69,"props":227,"children":228},{"style":76},[229],{"type":18,"value":197},{"type":13,"tag":69,"props":231,"children":232},{"style":76},[233],{"type":18,"value":234}," *const",{"type":13,"tag":69,"props":236,"children":237},{"style":87},[238],{"type":18,"value":239}," c_void,\n",{"type":13,"tag":69,"props":241,"children":242},{"class":71,"line":121},[243,248,252,257,261],{"type":13,"tag":69,"props":244,"children":245},{"style":87},[246],{"type":18,"value":247}," buffer",{"type":13,"tag":69,"props":249,"children":250},{"style":76},[251],{"type":18,"value":197},{"type":13,"tag":69,"props":253,"children":254},{"style":76},[255],{"type":18,"value":256}," *mut",{"type":13,"tag":69,"props":258,"children":259},{"style":176},[260],{"type":18,"value":132},{"type":13,"tag":69,"props":262,"children":263},{"style":87},[264],{"type":18,"value":217},{"type":13,"tag":69,"props":266,"children":267},{"class":71,"line":145},[268],{"type":13,"tag":69,"props":269,"children":270},{"style":87},[271],{"type":18,"value":272},"}\n",{"type":13,"tag":274,"props":275,"children":276},"ul",{},[277,297,315],{"type":13,"tag":278,"props":279,"children":280},"li",{},[281,287,289,295],{"type":13,"tag":21,"props":282,"children":284},{"className":283},[],[285],{"type":18,"value":286},"sType",{"type":18,"value":288}," is a ",{"type":13,"tag":37,"props":290,"children":292},{"href":291},"/man/VkStructureType",[293],{"type":18,"value":294},"VkStructureType",{"type":18,"value":296}," value identifying this structure.",{"type":13,"tag":278,"props":298,"children":299},{},[300,305,307,313],{"type":13,"tag":21,"props":301,"children":303},{"className":302},[],[304],{"type":18,"value":33},{"type":18,"value":306}," is ",{"type":13,"tag":21,"props":308,"children":310},{"className":309},[],[311],{"type":18,"value":312},"NULL",{"type":18,"value":314}," or a pointer to a structure extending this\nstructure.",{"type":13,"tag":278,"props":316,"children":317},{},[318,324],{"type":13,"tag":21,"props":319,"children":321},{"className":320},[],[322],{"type":18,"value":323},"buffer",{"type":18,"value":325}," is the Android hardware buffer to import.",{"type":13,"tag":14,"props":327,"children":328},{},[329,331,337,339,344,346,349,351,354],{"type":18,"value":330},"If the ",{"type":13,"tag":37,"props":332,"children":334},{"href":333},"/man/vkAllocateMemory",[335],{"type":18,"value":336},"vkAllocateMemory",{"type":18,"value":338}," command succeeds, the implementation ",{"type":13,"tag":340,"props":341,"children":343},"normative",{"type":342},"must",[],{"type":18,"value":345},"\nacquire a reference to the imported hardware buffer, which it ",{"type":13,"tag":340,"props":347,"children":348},{"type":342},[],{"type":18,"value":350}," release\nwhen the device memory object is freed.\nIf the command fails, the implementation ",{"type":13,"tag":340,"props":352,"children":353},{"type":342},[],{"type":18,"value":355}," not retain a reference.",{"type":13,"tag":357,"props":358,"children":360},"validity-group",{"name":359},"Valid Usage",[361,404],{"type":13,"tag":362,"props":363,"children":365},"validity-field",{"name":364},"VUID-VkImportAndroidHardwareBufferInfoANDROID-buffer-01880",[366],{"type":13,"tag":14,"props":367,"children":368},{},[369,371,376,378,383,385,388,390,396,398],{"type":18,"value":370},"If ",{"type":13,"tag":21,"props":372,"children":374},{"className":373},[],[375],{"type":18,"value":323},{"type":18,"value":377}," is not ",{"type":13,"tag":21,"props":379,"children":381},{"className":380},[],[382],{"type":18,"value":312},{"type":18,"value":384},", Android hardware buffers ",{"type":13,"tag":340,"props":386,"children":387},{"type":342},[],{"type":18,"value":389}," be\nsupported for import, as reported by\n",{"type":13,"tag":37,"props":391,"children":393},{"href":392},"/man/VkExternalImageFormatProperties",[394],{"type":18,"value":395},"VkExternalImageFormatProperties",{"type":18,"value":397}," or\n",{"type":13,"tag":37,"props":399,"children":401},{"href":400},"/man/VkExternalBufferProperties",[402],{"type":18,"value":403},"VkExternalBufferProperties",{"type":13,"tag":362,"props":405,"children":407},{"name":406},"VUID-VkImportAndroidHardwareBufferInfoANDROID-buffer-01881",[408],{"type":13,"tag":14,"props":409,"children":410},{},[411,412,417,418,423,425,428,430,436,437,443,445],{"type":18,"value":370},{"type":13,"tag":21,"props":413,"children":415},{"className":414},[],[416],{"type":18,"value":323},{"type":18,"value":377},{"type":13,"tag":21,"props":419,"children":421},{"className":420},[],[422],{"type":18,"value":312},{"type":18,"value":424},", it ",{"type":13,"tag":340,"props":426,"children":427},{"type":342},[],{"type":18,"value":429}," be a valid Android hardware\nbuffer object with ",{"type":13,"tag":21,"props":431,"children":433},{"className":432},[],[434],{"type":18,"value":435},"AHardwareBuffer_Desc",{"type":18,"value":207},{"type":13,"tag":21,"props":438,"children":440},{"className":439},[],[441],{"type":18,"value":442},"usage",{"type":18,"value":444}," compatible with\nVulkan as described in ",{"type":13,"tag":37,"props":446,"children":448},{"href":447},"/chapters/memory#memory-external-android-hardware-buffer",[449],{"type":18,"value":450},"Android\nHardware Buffers",{"type":13,"tag":357,"props":452,"children":454},{"name":453},"Valid Usage (Implicit)",[455,480],{"type":13,"tag":362,"props":456,"children":458},{"name":457},"VUID-VkImportAndroidHardwareBufferInfoANDROID-sType-sType",[459],{"type":13,"tag":14,"props":460,"children":461},{},[462,467,469,472,474],{"type":13,"tag":21,"props":463,"children":465},{"className":464},[],[466],{"type":18,"value":286},{"type":18,"value":468}," ",{"type":13,"tag":340,"props":470,"children":471},{"type":342},[],{"type":18,"value":473}," be ",{"type":13,"tag":21,"props":475,"children":477},{"className":476},[],[478],{"type":18,"value":479},"VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID",{"type":13,"tag":362,"props":481,"children":483},{"name":482},"VUID-VkImportAndroidHardwareBufferInfoANDROID-buffer-parameter",[484],{"type":13,"tag":14,"props":485,"children":486},{},[487,492,493,496,498,504],{"type":13,"tag":21,"props":488,"children":490},{"className":489},[],[491],{"type":18,"value":323},{"type":18,"value":468},{"type":13,"tag":340,"props":494,"children":495},{"type":342},[],{"type":18,"value":497}," be a valid pointer to an ",{"type":13,"tag":37,"props":499,"children":501},{"href":500},"/man/AHardwareBuffer",[502],{"type":18,"value":503},"AHardwareBuffer",{"type":18,"value":505}," value",{"type":13,"tag":507,"props":508,"children":509},"style",{},[510],{"type":18,"value":511},"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":513},[],"markdown",1725732559250]