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