[{"data":1,"prerenderedAt":433},["ShallowReactive",2],{"t8y5HsxSLy":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":432,"_id":4},"VkAndroidHardwareBufferUsageANDROID","Struct containing Android hardware buffer usage flags","VK_ANDROID_external_memory_android_hardware_buffer","structs",[],{"type":10,"children":11,"toc":430},"root",[12,53,255,308,372,393,424],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17,20,26,28,34,36,43,45,51],{"type":18,"value":19},"text","To obtain optimal Android hardware buffer usage flags for specific image\ncreation parameters, add a ",{"type":13,"tag":21,"props":22,"children":24},"code",{"className":23},[],[25],{"type":18,"value":4},{"type":18,"value":27},"\nstructure to the ",{"type":13,"tag":21,"props":29,"children":31},{"className":30},[],[32],{"type":18,"value":33},"pNext",{"type":18,"value":35}," chain of a ",{"type":13,"tag":37,"props":38,"children":40},"a",{"href":39},"/man/VkImageFormatProperties2",[41],{"type":18,"value":42},"VkImageFormatProperties2",{"type":18,"value":44},"\nstructure passed to ",{"type":13,"tag":37,"props":46,"children":48},{"href":47},"/man/vkGetPhysicalDeviceImageFormatProperties2",[49],{"type":18,"value":50},"vkGetPhysicalDeviceImageFormatProperties2",{"type":18,"value":52},".\nThis structure is defined as:",{"type":13,"tag":54,"props":55,"children":56},"code-group",{},[57,138],{"type":13,"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 VkAndroidHardwareBufferUsageANDROID {\n VkStructureType sType;\n void* pNext;\n uint64_t androidHardwareBufferUsage;\n} VkAndroidHardwareBufferUsageANDROID;\n","C","c","",[66],{"type":13,"tag":21,"props":67,"children":68},{"__ignoreMap":64},[69,92,101,115,129],{"type":13,"tag":70,"props":71,"children":74},"span",{"class":72,"line":73},"line",1,[75,81,86],{"type":13,"tag":70,"props":76,"children":78},{"style":77},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[79],{"type":18,"value":80},"typedef",{"type":13,"tag":70,"props":82,"children":83},{"style":77},[84],{"type":18,"value":85}," struct",{"type":13,"tag":70,"props":87,"children":89},{"style":88},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[90],{"type":18,"value":91}," VkAndroidHardwareBufferUsageANDROID {\n",{"type":13,"tag":70,"props":93,"children":95},{"class":72,"line":94},2,[96],{"type":13,"tag":70,"props":97,"children":98},{"style":88},[99],{"type":18,"value":100}," VkStructureType sType;\n",{"type":13,"tag":70,"props":102,"children":104},{"class":72,"line":103},3,[105,110],{"type":13,"tag":70,"props":106,"children":107},{"style":77},[108],{"type":18,"value":109}," void*",{"type":13,"tag":70,"props":111,"children":112},{"style":88},[113],{"type":18,"value":114}," pNext;\n",{"type":13,"tag":70,"props":116,"children":118},{"class":72,"line":117},4,[119,124],{"type":13,"tag":70,"props":120,"children":121},{"style":77},[122],{"type":18,"value":123}," uint64_t",{"type":13,"tag":70,"props":125,"children":126},{"style":88},[127],{"type":18,"value":128}," androidHardwareBufferUsage;\n",{"type":13,"tag":70,"props":130,"children":132},{"class":72,"line":131},5,[133],{"type":13,"tag":70,"props":134,"children":135},{"style":88},[136],{"type":18,"value":137},"} VkAndroidHardwareBufferUsageANDROID;\n",{"type":13,"tag":58,"props":139,"children":144},{"className":140,"code":141,"filename":142,"language":143,"meta":64,"style":64},"language-rs shiki shiki-themes github-light-default github-dark-default","pub struct AndroidHardwareBufferUsageANDROID {\n s_type: vk::StructureType,\n p_next: *mut c_void,\n android_hardware_buffer_usage: u64,\n}\n","Rust","rs",[145],{"type":13,"tag":21,"props":146,"children":147},{"__ignoreMap":64},[148,171,204,226,247],{"type":13,"tag":70,"props":149,"children":150},{"class":72,"line":73},[151,156,160,166],{"type":13,"tag":70,"props":152,"children":153},{"style":77},[154],{"type":18,"value":155},"pub",{"type":13,"tag":70,"props":157,"children":158},{"style":77},[159],{"type":18,"value":85},{"type":13,"tag":70,"props":161,"children":163},{"style":162},"--shiki-default:#953800;--shiki-dark:#FFA657",[164],{"type":18,"value":165}," AndroidHardwareBufferUsageANDROID",{"type":13,"tag":70,"props":167,"children":168},{"style":88},[169],{"type":18,"value":170}," {\n",{"type":13,"tag":70,"props":172,"children":173},{"class":72,"line":94},[174,179,184,189,194,199],{"type":13,"tag":70,"props":175,"children":176},{"style":88},[177],{"type":18,"value":178}," s_type",{"type":13,"tag":70,"props":180,"children":181},{"style":77},[182],{"type":18,"value":183},":",{"type":13,"tag":70,"props":185,"children":186},{"style":162},[187],{"type":18,"value":188}," vk",{"type":13,"tag":70,"props":190,"children":191},{"style":77},[192],{"type":18,"value":193},"::",{"type":13,"tag":70,"props":195,"children":196},{"style":162},[197],{"type":18,"value":198},"StructureType",{"type":13,"tag":70,"props":200,"children":201},{"style":88},[202],{"type":18,"value":203},",\n",{"type":13,"tag":70,"props":205,"children":206},{"class":72,"line":103},[207,212,216,221],{"type":13,"tag":70,"props":208,"children":209},{"style":88},[210],{"type":18,"value":211}," p_next",{"type":13,"tag":70,"props":213,"children":214},{"style":77},[215],{"type":18,"value":183},{"type":13,"tag":70,"props":217,"children":218},{"style":77},[219],{"type":18,"value":220}," *mut",{"type":13,"tag":70,"props":222,"children":223},{"style":88},[224],{"type":18,"value":225}," c_void,\n",{"type":13,"tag":70,"props":227,"children":228},{"class":72,"line":117},[229,234,238,243],{"type":13,"tag":70,"props":230,"children":231},{"style":88},[232],{"type":18,"value":233}," android_hardware_buffer_usage",{"type":13,"tag":70,"props":235,"children":236},{"style":77},[237],{"type":18,"value":183},{"type":13,"tag":70,"props":239,"children":240},{"style":162},[241],{"type":18,"value":242}," u64",{"type":13,"tag":70,"props":244,"children":245},{"style":88},[246],{"type":18,"value":203},{"type":13,"tag":70,"props":248,"children":249},{"class":72,"line":131},[250],{"type":13,"tag":70,"props":251,"children":252},{"style":88},[253],{"type":18,"value":254},"}\n",{"type":13,"tag":256,"props":257,"children":258},"ul",{},[259,279,297],{"type":13,"tag":260,"props":261,"children":262},"li",{},[263,269,271,277],{"type":13,"tag":21,"props":264,"children":266},{"className":265},[],[267],{"type":18,"value":268},"sType",{"type":18,"value":270}," is a ",{"type":13,"tag":37,"props":272,"children":274},{"href":273},"/man/VkStructureType",[275],{"type":18,"value":276},"VkStructureType",{"type":18,"value":278}," value identifying this structure.",{"type":13,"tag":260,"props":280,"children":281},{},[282,287,289,295],{"type":13,"tag":21,"props":283,"children":285},{"className":284},[],[286],{"type":18,"value":33},{"type":18,"value":288}," is ",{"type":13,"tag":21,"props":290,"children":292},{"className":291},[],[293],{"type":18,"value":294},"NULL",{"type":18,"value":296}," or a pointer to a structure extending this\nstructure.",{"type":13,"tag":260,"props":298,"children":299},{},[300,306],{"type":13,"tag":21,"props":301,"children":303},{"className":302},[],[304],{"type":18,"value":305},"androidHardwareBufferUsage",{"type":18,"value":307}," returns the Android hardware buffer\nusage flags.",{"type":13,"tag":14,"props":309,"children":310},{},[311,313,318,320,325,327,333,335,341,343,349,351,357,359,362,364,370],{"type":18,"value":312},"The ",{"type":13,"tag":21,"props":314,"children":316},{"className":315},[],[317],{"type":18,"value":305},{"type":18,"value":319}," field ",{"type":13,"tag":321,"props":322,"children":324},"normative",{"type":323},"must",[],{"type":18,"value":326}," include Android hardware\nbuffer usage flags listed in the\n",{"type":13,"tag":37,"props":328,"children":330},{"href":329},"/chapters/memory#memory-external-android-hardware-buffer-usage",[331],{"type":18,"value":332},"AHardwareBuffer Usage\nEquivalence",{"type":18,"value":334}," table when the corresponding Vulkan image usage or image\ncreation flags are included in the ",{"type":13,"tag":21,"props":336,"children":338},{"className":337},[],[339],{"type":18,"value":340},"usage",{"type":18,"value":342}," or ",{"type":13,"tag":21,"props":344,"children":346},{"className":345},[],[347],{"type":18,"value":348},"flags",{"type":18,"value":350}," fields of\n",{"type":13,"tag":37,"props":352,"children":354},{"href":353},"/man/VkPhysicalDeviceImageFormatInfo2",[355],{"type":18,"value":356},"VkPhysicalDeviceImageFormatInfo2",{"type":18,"value":358},".\nIt ",{"type":13,"tag":321,"props":360,"children":361},{"type":323},[],{"type":18,"value":363}," include at least one GPU usage flag\n(",{"type":13,"tag":21,"props":365,"children":367},{"className":366},[],[368],{"type":18,"value":369},"AHARDWAREBUFFER_USAGE_GPU_*",{"type":18,"value":371},"), even if none of the corresponding Vulkan\nusages or flags are requested.",{"type":13,"tag":373,"props":374,"children":375},"note",{},[376],{"type":13,"tag":14,"props":377,"children":378},{},[379,381,385,387,391],{"type":18,"value":380},"Requiring at least one GPU usage flag ensures that Android hardware buffer\nmemory will be allocated in a memory pool accessible to the Vulkan\nimplementation, and that specializing the memory layout based on usage flags\ndoes not prevent it from being compatible with Vulkan.\nImplementations ",{"type":13,"tag":321,"props":382,"children":384},{"type":383},"may",[],{"type":18,"value":386}," avoid unnecessary restrictions caused by this\nrequirement by using vendor usage flags to indicate that only the Vulkan\nuses indicated in ",{"type":13,"tag":37,"props":388,"children":389},{"href":39},[390],{"type":18,"value":42},{"type":18,"value":392}," are required.",{"type":13,"tag":394,"props":395,"children":397},"validity-group",{"name":396},"Valid Usage (Implicit)",[398],{"type":13,"tag":399,"props":400,"children":402},"validity-field",{"name":401},"VUID-VkAndroidHardwareBufferUsageANDROID-sType-sType",[403],{"type":13,"tag":14,"props":404,"children":405},{},[406,411,413,416,418],{"type":13,"tag":21,"props":407,"children":409},{"className":408},[],[410],{"type":18,"value":268},{"type":18,"value":412}," ",{"type":13,"tag":321,"props":414,"children":415},{"type":323},[],{"type":18,"value":417}," be ",{"type":13,"tag":21,"props":419,"children":421},{"className":420},[],[422],{"type":18,"value":423},"VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID",{"type":13,"tag":425,"props":426,"children":427},"style",{},[428],{"type":18,"value":429},"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":431},[],"markdown",1725732538813]