[{"data":1,"prerenderedAt":688},["ShallowReactive",2],{"ntrUPVYcqW":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":10,"_type":687,"_id":4},"VkSystemAllocationScope","Allocation scope","VK_VERSION_1_0","enums",[9],"VkAllocationCallbacks",{"type":11,"children":12,"toc":685},"root",[13,19,51,468,544,563,568,679],{"type":14,"tag":15,"props":16,"children":18},"element","anchor",{"id":17},"memory-host-allocation-scope",[],{"type":14,"tag":20,"props":21,"children":22},"p",{},[23,26,32,34,41,43,49],{"type":24,"value":25},"text","Each allocation has an ",{"type":14,"tag":27,"props":28,"children":29},"em",{},[30],{"type":24,"value":31},"allocation scope",{"type":24,"value":33}," defining its lifetime and which\nobject it is associated with.\nPossible values passed to the ",{"type":14,"tag":35,"props":36,"children":38},"code",{"className":37},[],[39],{"type":24,"value":40},"allocationScope",{"type":24,"value":42}," parameter of the\ncallback functions specified by ",{"type":14,"tag":44,"props":45,"children":47},"a",{"href":46},"/man/VkAllocationCallbacks",[48],{"type":24,"value":9},{"type":24,"value":50},", indicating the\nallocation scope, are:",{"type":14,"tag":52,"props":53,"children":54},"code-group",{},[55,212],{"type":14,"tag":56,"props":57,"children":63},"pre",{"className":58,"code":59,"filename":60,"language":61,"meta":62,"style":62},"language-c shiki shiki-themes github-light-default github-dark-default","typedef enum VkSystemAllocationScope {\n VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0,\n VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1,\n VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2,\n VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3,\n VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4,\n} VkSystemAllocationScope;\n","C","c","",[64],{"type":14,"tag":35,"props":65,"children":66},{"__ignoreMap":62},[67,90,115,137,159,181,203],{"type":14,"tag":68,"props":69,"children":72},"span",{"class":70,"line":71},"line",1,[73,79,84],{"type":14,"tag":68,"props":74,"children":76},{"style":75},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[77],{"type":24,"value":78},"typedef",{"type":14,"tag":68,"props":80,"children":81},{"style":75},[82],{"type":24,"value":83}," enum",{"type":14,"tag":68,"props":85,"children":87},{"style":86},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[88],{"type":24,"value":89}," VkSystemAllocationScope {\n",{"type":14,"tag":68,"props":91,"children":93},{"class":70,"line":92},2,[94,99,104,110],{"type":14,"tag":68,"props":95,"children":96},{"style":86},[97],{"type":24,"value":98}," VK_SYSTEM_ALLOCATION_SCOPE_COMMAND ",{"type":14,"tag":68,"props":100,"children":101},{"style":75},[102],{"type":24,"value":103},"=",{"type":14,"tag":68,"props":105,"children":107},{"style":106},"--shiki-default:#0550AE;--shiki-dark:#79C0FF",[108],{"type":24,"value":109}," 0",{"type":14,"tag":68,"props":111,"children":112},{"style":86},[113],{"type":24,"value":114},",\n",{"type":14,"tag":68,"props":116,"children":118},{"class":70,"line":117},3,[119,124,128,133],{"type":14,"tag":68,"props":120,"children":121},{"style":86},[122],{"type":24,"value":123}," VK_SYSTEM_ALLOCATION_SCOPE_OBJECT ",{"type":14,"tag":68,"props":125,"children":126},{"style":75},[127],{"type":24,"value":103},{"type":14,"tag":68,"props":129,"children":130},{"style":106},[131],{"type":24,"value":132}," 1",{"type":14,"tag":68,"props":134,"children":135},{"style":86},[136],{"type":24,"value":114},{"type":14,"tag":68,"props":138,"children":140},{"class":70,"line":139},4,[141,146,150,155],{"type":14,"tag":68,"props":142,"children":143},{"style":86},[144],{"type":24,"value":145}," VK_SYSTEM_ALLOCATION_SCOPE_CACHE ",{"type":14,"tag":68,"props":147,"children":148},{"style":75},[149],{"type":24,"value":103},{"type":14,"tag":68,"props":151,"children":152},{"style":106},[153],{"type":24,"value":154}," 2",{"type":14,"tag":68,"props":156,"children":157},{"style":86},[158],{"type":24,"value":114},{"type":14,"tag":68,"props":160,"children":162},{"class":70,"line":161},5,[163,168,172,177],{"type":14,"tag":68,"props":164,"children":165},{"style":86},[166],{"type":24,"value":167}," VK_SYSTEM_ALLOCATION_SCOPE_DEVICE ",{"type":14,"tag":68,"props":169,"children":170},{"style":75},[171],{"type":24,"value":103},{"type":14,"tag":68,"props":173,"children":174},{"style":106},[175],{"type":24,"value":176}," 3",{"type":14,"tag":68,"props":178,"children":179},{"style":86},[180],{"type":24,"value":114},{"type":14,"tag":68,"props":182,"children":184},{"class":70,"line":183},6,[185,190,194,199],{"type":14,"tag":68,"props":186,"children":187},{"style":86},[188],{"type":24,"value":189}," VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE ",{"type":14,"tag":68,"props":191,"children":192},{"style":75},[193],{"type":24,"value":103},{"type":14,"tag":68,"props":195,"children":196},{"style":106},[197],{"type":24,"value":198}," 4",{"type":14,"tag":68,"props":200,"children":201},{"style":86},[202],{"type":24,"value":114},{"type":14,"tag":68,"props":204,"children":206},{"class":70,"line":205},7,[207],{"type":14,"tag":68,"props":208,"children":209},{"style":86},[210],{"type":24,"value":211},"} VkSystemAllocationScope;\n",{"type":14,"tag":56,"props":213,"children":218},{"className":214,"code":215,"filename":216,"language":217,"meta":62,"style":62},"language-rs shiki shiki-themes github-light-default github-dark-default","pub struct SystemAllocationScope(u32);\nimpl SystemAllocationScope {\n pub const COMMAND: Self = 0;\n pub const OBJECT: Self = 1;\n pub const CACHE: Self = 2;\n pub const DEVICE: Self = 3;\n pub const INSTANCE: Self = 4;\n}\n","Rust","rs",[219],{"type":14,"tag":35,"props":220,"children":221},{"__ignoreMap":62},[222,256,273,315,351,387,423,459],{"type":14,"tag":68,"props":223,"children":224},{"class":70,"line":71},[225,230,235,241,246,251],{"type":14,"tag":68,"props":226,"children":227},{"style":75},[228],{"type":24,"value":229},"pub",{"type":14,"tag":68,"props":231,"children":232},{"style":75},[233],{"type":24,"value":234}," struct",{"type":14,"tag":68,"props":236,"children":238},{"style":237},"--shiki-default:#953800;--shiki-dark:#FFA657",[239],{"type":24,"value":240}," SystemAllocationScope",{"type":14,"tag":68,"props":242,"children":243},{"style":86},[244],{"type":24,"value":245},"(",{"type":14,"tag":68,"props":247,"children":248},{"style":237},[249],{"type":24,"value":250},"u32",{"type":14,"tag":68,"props":252,"children":253},{"style":86},[254],{"type":24,"value":255},");\n",{"type":14,"tag":68,"props":257,"children":258},{"class":70,"line":92},[259,264,268],{"type":14,"tag":68,"props":260,"children":261},{"style":75},[262],{"type":24,"value":263},"impl",{"type":14,"tag":68,"props":265,"children":266},{"style":237},[267],{"type":24,"value":240},{"type":14,"tag":68,"props":269,"children":270},{"style":86},[271],{"type":24,"value":272}," {\n",{"type":14,"tag":68,"props":274,"children":275},{"class":70,"line":117},[276,281,286,291,296,301,306,310],{"type":14,"tag":68,"props":277,"children":278},{"style":75},[279],{"type":24,"value":280}," pub",{"type":14,"tag":68,"props":282,"children":283},{"style":75},[284],{"type":24,"value":285}," const",{"type":14,"tag":68,"props":287,"children":288},{"style":106},[289],{"type":24,"value":290}," COMMAND",{"type":14,"tag":68,"props":292,"children":293},{"style":75},[294],{"type":24,"value":295},":",{"type":14,"tag":68,"props":297,"children":298},{"style":106},[299],{"type":24,"value":300}," Self",{"type":14,"tag":68,"props":302,"children":303},{"style":75},[304],{"type":24,"value":305}," =",{"type":14,"tag":68,"props":307,"children":308},{"style":106},[309],{"type":24,"value":109},{"type":14,"tag":68,"props":311,"children":312},{"style":86},[313],{"type":24,"value":314},";\n",{"type":14,"tag":68,"props":316,"children":317},{"class":70,"line":139},[318,322,326,331,335,339,343,347],{"type":14,"tag":68,"props":319,"children":320},{"style":75},[321],{"type":24,"value":280},{"type":14,"tag":68,"props":323,"children":324},{"style":75},[325],{"type":24,"value":285},{"type":14,"tag":68,"props":327,"children":328},{"style":106},[329],{"type":24,"value":330}," OBJECT",{"type":14,"tag":68,"props":332,"children":333},{"style":75},[334],{"type":24,"value":295},{"type":14,"tag":68,"props":336,"children":337},{"style":106},[338],{"type":24,"value":300},{"type":14,"tag":68,"props":340,"children":341},{"style":75},[342],{"type":24,"value":305},{"type":14,"tag":68,"props":344,"children":345},{"style":106},[346],{"type":24,"value":132},{"type":14,"tag":68,"props":348,"children":349},{"style":86},[350],{"type":24,"value":314},{"type":14,"tag":68,"props":352,"children":353},{"class":70,"line":161},[354,358,362,367,371,375,379,383],{"type":14,"tag":68,"props":355,"children":356},{"style":75},[357],{"type":24,"value":280},{"type":14,"tag":68,"props":359,"children":360},{"style":75},[361],{"type":24,"value":285},{"type":14,"tag":68,"props":363,"children":364},{"style":106},[365],{"type":24,"value":366}," CACHE",{"type":14,"tag":68,"props":368,"children":369},{"style":75},[370],{"type":24,"value":295},{"type":14,"tag":68,"props":372,"children":373},{"style":106},[374],{"type":24,"value":300},{"type":14,"tag":68,"props":376,"children":377},{"style":75},[378],{"type":24,"value":305},{"type":14,"tag":68,"props":380,"children":381},{"style":106},[382],{"type":24,"value":154},{"type":14,"tag":68,"props":384,"children":385},{"style":86},[386],{"type":24,"value":314},{"type":14,"tag":68,"props":388,"children":389},{"class":70,"line":183},[390,394,398,403,407,411,415,419],{"type":14,"tag":68,"props":391,"children":392},{"style":75},[393],{"type":24,"value":280},{"type":14,"tag":68,"props":395,"children":396},{"style":75},[397],{"type":24,"value":285},{"type":14,"tag":68,"props":399,"children":400},{"style":106},[401],{"type":24,"value":402}," DEVICE",{"type":14,"tag":68,"props":404,"children":405},{"style":75},[406],{"type":24,"value":295},{"type":14,"tag":68,"props":408,"children":409},{"style":106},[410],{"type":24,"value":300},{"type":14,"tag":68,"props":412,"children":413},{"style":75},[414],{"type":24,"value":305},{"type":14,"tag":68,"props":416,"children":417},{"style":106},[418],{"type":24,"value":176},{"type":14,"tag":68,"props":420,"children":421},{"style":86},[422],{"type":24,"value":314},{"type":14,"tag":68,"props":424,"children":425},{"class":70,"line":205},[426,430,434,439,443,447,451,455],{"type":14,"tag":68,"props":427,"children":428},{"style":75},[429],{"type":24,"value":280},{"type":14,"tag":68,"props":431,"children":432},{"style":75},[433],{"type":24,"value":285},{"type":14,"tag":68,"props":435,"children":436},{"style":106},[437],{"type":24,"value":438}," INSTANCE",{"type":14,"tag":68,"props":440,"children":441},{"style":75},[442],{"type":24,"value":295},{"type":14,"tag":68,"props":444,"children":445},{"style":106},[446],{"type":24,"value":300},{"type":14,"tag":68,"props":448,"children":449},{"style":75},[450],{"type":24,"value":305},{"type":14,"tag":68,"props":452,"children":453},{"style":106},[454],{"type":24,"value":198},{"type":14,"tag":68,"props":456,"children":457},{"style":86},[458],{"type":24,"value":314},{"type":14,"tag":68,"props":460,"children":462},{"class":70,"line":461},8,[463],{"type":14,"tag":68,"props":464,"children":465},{"style":86},[466],{"type":24,"value":467},"}\n",{"type":14,"tag":469,"props":470,"children":471},"ul",{},[472,484,495,522,533],{"type":14,"tag":473,"props":474,"children":475},"li",{},[476,482],{"type":14,"tag":35,"props":477,"children":479},{"className":478},[],[480],{"type":24,"value":481},"VK_SYSTEM_ALLOCATION_SCOPE_COMMAND",{"type":24,"value":483}," specifies that the allocation\nis scoped to the duration of the Vulkan command.",{"type":14,"tag":473,"props":485,"children":486},{},[487,493],{"type":14,"tag":35,"props":488,"children":490},{"className":489},[],[491],{"type":24,"value":492},"VK_SYSTEM_ALLOCATION_SCOPE_OBJECT",{"type":24,"value":494}," specifies that the allocation is\nscoped to the lifetime of the Vulkan object that is being created or\nused.",{"type":14,"tag":473,"props":496,"children":497},{},[498,504,506,512,514,520],{"type":14,"tag":35,"props":499,"children":501},{"className":500},[],[502],{"type":24,"value":503},"VK_SYSTEM_ALLOCATION_SCOPE_CACHE",{"type":24,"value":505}," specifies that the allocation is\nscoped to the lifetime of a ",{"type":14,"tag":35,"props":507,"children":509},{"className":508},[],[510],{"type":24,"value":511},"VkPipelineCache",{"type":24,"value":513},"\nor ",{"type":14,"tag":35,"props":515,"children":517},{"className":516},[],[518],{"type":24,"value":519},"VkValidationCacheEXT",{"type":24,"value":521},"\nobject.",{"type":14,"tag":473,"props":523,"children":524},{},[525,531],{"type":14,"tag":35,"props":526,"children":528},{"className":527},[],[529],{"type":24,"value":530},"VK_SYSTEM_ALLOCATION_SCOPE_DEVICE",{"type":24,"value":532}," specifies that the allocation is\nscoped to the lifetime of the Vulkan device.",{"type":14,"tag":473,"props":534,"children":535},{},[536,542],{"type":14,"tag":35,"props":537,"children":539},{"className":538},[],[540],{"type":24,"value":541},"VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE",{"type":24,"value":543}," specifies that the allocation\nis scoped to the lifetime of the Vulkan instance.",{"type":14,"tag":20,"props":545,"children":546},{},[547,549,554,556,561],{"type":24,"value":548},"Most Vulkan commands operate on a single object, or there is a sole object\nthat is being created or manipulated.\nWhen an allocation uses an allocation scope of\n",{"type":14,"tag":35,"props":550,"children":552},{"className":551},[],[553],{"type":24,"value":492},{"type":24,"value":555}," or\n",{"type":14,"tag":35,"props":557,"children":559},{"className":558},[],[560],{"type":24,"value":503},{"type":24,"value":562},", the allocation is scoped to the\nobject being created or manipulated.",{"type":14,"tag":20,"props":564,"children":565},{},[566],{"type":24,"value":567},"When an implementation requires host memory, it will make callbacks to the\napplication using the most specific allocator and allocation scope\navailable:",{"type":14,"tag":469,"props":569,"children":570},{},[571,599,624,650,662,674],{"type":14,"tag":473,"props":572,"children":573},{},[574,576,581,583,589,591,597],{"type":24,"value":575},"If an allocation is scoped to the duration of a command, the allocator\nwill use the ",{"type":14,"tag":35,"props":577,"children":579},{"className":578},[],[580],{"type":24,"value":481},{"type":24,"value":582}," allocation scope.\nThe most specific allocator available is used: if the object being\ncreated or manipulated has an allocator, that object’s allocator will be\nused, else if the parent ",{"type":14,"tag":35,"props":584,"children":586},{"className":585},[],[587],{"type":24,"value":588},"VkDevice",{"type":24,"value":590}," has an allocator it will be\nused, else if the parent ",{"type":14,"tag":35,"props":592,"children":594},{"className":593},[],[595],{"type":24,"value":596},"VkInstance",{"type":24,"value":598}," has an allocator it will be\nused.\nElse,",{"type":14,"tag":473,"props":600,"children":601},{},[602,604,609,610,615,617,622],{"type":24,"value":603},"If an allocation is associated with a\n",{"type":14,"tag":35,"props":605,"children":607},{"className":606},[],[608],{"type":24,"value":519},{"type":24,"value":555},{"type":14,"tag":35,"props":611,"children":613},{"className":612},[],[614],{"type":24,"value":511},{"type":24,"value":616}," object, the allocator will use the\n",{"type":14,"tag":35,"props":618,"children":620},{"className":619},[],[621],{"type":24,"value":503},{"type":24,"value":623}," allocation scope.\nThe most specific allocator available is used (cache, else device, else\ninstance).\nElse,",{"type":14,"tag":473,"props":625,"children":626},{},[627,629,634,636,641,643,648],{"type":24,"value":628},"If an allocation is scoped to the lifetime of an object, that object is\nbeing created or manipulated by the command, and that object’s type is\nnot ",{"type":14,"tag":35,"props":630,"children":632},{"className":631},[],[633],{"type":24,"value":588},{"type":24,"value":635}," or ",{"type":14,"tag":35,"props":637,"children":639},{"className":638},[],[640],{"type":24,"value":596},{"type":24,"value":642},", the allocator will use an\nallocation scope of ",{"type":14,"tag":35,"props":644,"children":646},{"className":645},[],[647],{"type":24,"value":492},{"type":24,"value":649},".\nThe most specific allocator available is used (object, else device, else\ninstance).\nElse,",{"type":14,"tag":473,"props":651,"children":652},{},[653,655,660],{"type":24,"value":654},"If an allocation is scoped to the lifetime of a device, the allocator\nwill use an allocation scope of ",{"type":14,"tag":35,"props":656,"children":658},{"className":657},[],[659],{"type":24,"value":530},{"type":24,"value":661},".\nThe most specific allocator available is used (device, else instance).\nElse,",{"type":14,"tag":473,"props":663,"children":664},{},[665,667,672],{"type":24,"value":666},"If the allocation is scoped to the lifetime of an instance and the\ninstance has an allocator, its allocator will be used with an allocation\nscope of ",{"type":14,"tag":35,"props":668,"children":670},{"className":669},[],[671],{"type":24,"value":541},{"type":24,"value":673},".",{"type":14,"tag":473,"props":675,"children":676},{},[677],{"type":24,"value":678},"Otherwise an implementation will allocate memory through an alternative\nmechanism that is unspecified.",{"type":14,"tag":680,"props":681,"children":682},"style",{},[683],{"type":24,"value":684},"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":62,"searchDepth":92,"depth":92,"links":686},[],"markdown",1725732590190]