[{"data":1,"prerenderedAt":704},["ShallowReactive",2],{"Dw99mNY9WL":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":703,"_id":4},"vkGetImageSparseMemoryRequirements","Query the memory requirements for a sparse image","VK_VERSION_1_0","protos",[],{"type":10,"children":11,"toc":701},"root",[12,20,320,392,460,487,531,695],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17],{"type":18,"value":19},"text","To query sparse memory requirements for an image, call:",{"type":13,"tag":21,"props":22,"children":23},"code-group",{},[24,141],{"type":13,"tag":25,"props":26,"children":32},"pre",{"className":27,"code":28,"filename":29,"language":30,"meta":31,"style":31},"language-c shiki shiki-themes github-light-default github-dark-default","void vkGetImageSparseMemoryRequirements(\n VkDevice device,\n VkImage image,\n uint32_t* pSparseMemoryRequirementCount,\n VkSparseImageMemoryRequirements* pSparseMemoryRequirements);\n","C","c","",[33],{"type":13,"tag":34,"props":35,"children":36},"code",{"__ignoreMap":31},[37,61,81,99,117],{"type":13,"tag":38,"props":39,"children":42},"span",{"class":40,"line":41},"line",1,[43,49,55],{"type":13,"tag":38,"props":44,"children":46},{"style":45},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[47],{"type":18,"value":48},"void",{"type":13,"tag":38,"props":50,"children":52},{"style":51},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[53],{"type":18,"value":54}," vkGetImageSparseMemoryRequirements",{"type":13,"tag":38,"props":56,"children":58},{"style":57},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[59],{"type":18,"value":60},"(\n",{"type":13,"tag":38,"props":62,"children":64},{"class":40,"line":63},2,[65,70,76],{"type":13,"tag":38,"props":66,"children":67},{"style":57},[68],{"type":18,"value":69}," VkDevice ",{"type":13,"tag":38,"props":71,"children":73},{"style":72},"--shiki-default:#953800;--shiki-dark:#FFA657",[74],{"type":18,"value":75},"device",{"type":13,"tag":38,"props":77,"children":78},{"style":57},[79],{"type":18,"value":80},",\n",{"type":13,"tag":38,"props":82,"children":84},{"class":40,"line":83},3,[85,90,95],{"type":13,"tag":38,"props":86,"children":87},{"style":57},[88],{"type":18,"value":89}," VkImage ",{"type":13,"tag":38,"props":91,"children":92},{"style":72},[93],{"type":18,"value":94},"image",{"type":13,"tag":38,"props":96,"children":97},{"style":57},[98],{"type":18,"value":80},{"type":13,"tag":38,"props":100,"children":102},{"class":40,"line":101},4,[103,108,113],{"type":13,"tag":38,"props":104,"children":105},{"style":45},[106],{"type":18,"value":107}," uint32_t*",{"type":13,"tag":38,"props":109,"children":110},{"style":72},[111],{"type":18,"value":112}," pSparseMemoryRequirementCount",{"type":13,"tag":38,"props":114,"children":115},{"style":57},[116],{"type":18,"value":80},{"type":13,"tag":38,"props":118,"children":120},{"class":40,"line":119},5,[121,126,131,136],{"type":13,"tag":38,"props":122,"children":123},{"style":57},[124],{"type":18,"value":125}," VkSparseImageMemoryRequirements",{"type":13,"tag":38,"props":127,"children":128},{"style":45},[129],{"type":18,"value":130},"*",{"type":13,"tag":38,"props":132,"children":133},{"style":72},[134],{"type":18,"value":135}," pSparseMemoryRequirements",{"type":13,"tag":38,"props":137,"children":138},{"style":57},[139],{"type":18,"value":140},");\n",{"type":13,"tag":25,"props":142,"children":147},{"className":143,"code":144,"filename":145,"language":146,"meta":31,"style":31},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn get_image_sparse_memory_requirements(\n device: crate :: vk :: vk::Device,\n image: vk::Image,\n p_sparse_memory_requirement_count: *mut u32,\n p_sparse_memory_requirements: *mut vk::SparseImageMemoryRequirements,\n);\n","Rust","rs",[148],{"type":13,"tag":34,"props":149,"children":150},{"__ignoreMap":31},[151,173,224,253,279,312],{"type":13,"tag":38,"props":152,"children":153},{"class":40,"line":41},[154,159,164,169],{"type":13,"tag":38,"props":155,"children":156},{"style":45},[157],{"type":18,"value":158},"pub",{"type":13,"tag":38,"props":160,"children":161},{"style":45},[162],{"type":18,"value":163}," fn",{"type":13,"tag":38,"props":165,"children":166},{"style":51},[167],{"type":18,"value":168}," get_image_sparse_memory_requirements",{"type":13,"tag":38,"props":170,"children":171},{"style":57},[172],{"type":18,"value":60},{"type":13,"tag":38,"props":174,"children":175},{"class":40,"line":63},[176,181,186,191,196,201,206,211,215,220],{"type":13,"tag":38,"props":177,"children":178},{"style":57},[179],{"type":18,"value":180}," device",{"type":13,"tag":38,"props":182,"children":183},{"style":45},[184],{"type":18,"value":185},":",{"type":13,"tag":38,"props":187,"children":188},{"style":45},[189],{"type":18,"value":190}," crate",{"type":13,"tag":38,"props":192,"children":193},{"style":45},[194],{"type":18,"value":195}," ::",{"type":13,"tag":38,"props":197,"children":198},{"style":57},[199],{"type":18,"value":200}," vk ",{"type":13,"tag":38,"props":202,"children":203},{"style":45},[204],{"type":18,"value":205},"::",{"type":13,"tag":38,"props":207,"children":208},{"style":72},[209],{"type":18,"value":210}," vk",{"type":13,"tag":38,"props":212,"children":213},{"style":45},[214],{"type":18,"value":205},{"type":13,"tag":38,"props":216,"children":217},{"style":72},[218],{"type":18,"value":219},"Device",{"type":13,"tag":38,"props":221,"children":222},{"style":57},[223],{"type":18,"value":80},{"type":13,"tag":38,"props":225,"children":226},{"class":40,"line":83},[227,232,236,240,244,249],{"type":13,"tag":38,"props":228,"children":229},{"style":57},[230],{"type":18,"value":231}," image",{"type":13,"tag":38,"props":233,"children":234},{"style":45},[235],{"type":18,"value":185},{"type":13,"tag":38,"props":237,"children":238},{"style":72},[239],{"type":18,"value":210},{"type":13,"tag":38,"props":241,"children":242},{"style":45},[243],{"type":18,"value":205},{"type":13,"tag":38,"props":245,"children":246},{"style":72},[247],{"type":18,"value":248},"Image",{"type":13,"tag":38,"props":250,"children":251},{"style":57},[252],{"type":18,"value":80},{"type":13,"tag":38,"props":254,"children":255},{"class":40,"line":101},[256,261,265,270,275],{"type":13,"tag":38,"props":257,"children":258},{"style":57},[259],{"type":18,"value":260}," p_sparse_memory_requirement_count",{"type":13,"tag":38,"props":262,"children":263},{"style":45},[264],{"type":18,"value":185},{"type":13,"tag":38,"props":266,"children":267},{"style":45},[268],{"type":18,"value":269}," *mut",{"type":13,"tag":38,"props":271,"children":272},{"style":72},[273],{"type":18,"value":274}," u32",{"type":13,"tag":38,"props":276,"children":277},{"style":57},[278],{"type":18,"value":80},{"type":13,"tag":38,"props":280,"children":281},{"class":40,"line":119},[282,287,291,295,299,303,308],{"type":13,"tag":38,"props":283,"children":284},{"style":57},[285],{"type":18,"value":286}," p_sparse_memory_requirements",{"type":13,"tag":38,"props":288,"children":289},{"style":45},[290],{"type":18,"value":185},{"type":13,"tag":38,"props":292,"children":293},{"style":45},[294],{"type":18,"value":269},{"type":13,"tag":38,"props":296,"children":297},{"style":72},[298],{"type":18,"value":210},{"type":13,"tag":38,"props":300,"children":301},{"style":45},[302],{"type":18,"value":205},{"type":13,"tag":38,"props":304,"children":305},{"style":72},[306],{"type":18,"value":307},"SparseImageMemoryRequirements",{"type":13,"tag":38,"props":309,"children":310},{"style":57},[311],{"type":18,"value":80},{"type":13,"tag":38,"props":313,"children":315},{"class":40,"line":314},6,[316],{"type":13,"tag":38,"props":317,"children":318},{"style":57},[319],{"type":18,"value":140},{"type":13,"tag":321,"props":322,"children":323},"ul",{},[324,335,354,365],{"type":13,"tag":325,"props":326,"children":327},"li",{},[328,333],{"type":13,"tag":34,"props":329,"children":331},{"className":330},[],[332],{"type":18,"value":75},{"type":18,"value":334}," is the logical device that owns the image.",{"type":13,"tag":325,"props":336,"children":337},{},[338,343,345,352],{"type":13,"tag":34,"props":339,"children":341},{"className":340},[],[342],{"type":18,"value":94},{"type":18,"value":344}," is the ",{"type":13,"tag":346,"props":347,"children":349},"a",{"href":348},"/man/VkImage",[350],{"type":18,"value":351},"VkImage",{"type":18,"value":353}," object to get the memory requirements\nfor.",{"type":13,"tag":325,"props":355,"children":356},{},[357,363],{"type":13,"tag":34,"props":358,"children":360},{"className":359},[],[361],{"type":18,"value":362},"pSparseMemoryRequirementCount",{"type":18,"value":364}," is a pointer to an integer related\nto the number of sparse memory requirements available or queried, as\ndescribed below.",{"type":13,"tag":325,"props":366,"children":367},{},[368,374,376,382,384,390],{"type":13,"tag":34,"props":369,"children":371},{"className":370},[],[372],{"type":18,"value":373},"pSparseMemoryRequirements",{"type":18,"value":375}," is either ",{"type":13,"tag":34,"props":377,"children":379},{"className":378},[],[380],{"type":18,"value":381},"NULL",{"type":18,"value":383}," or a pointer to an\narray of ",{"type":13,"tag":34,"props":385,"children":387},{"className":386},[],[388],{"type":18,"value":389},"VkSparseImageMemoryRequirements",{"type":18,"value":391}," structures.",{"type":13,"tag":14,"props":393,"children":394},{},[395,397,402,404,409,411,416,418,423,425,430,432,437,439,444,446,451,453,458],{"type":18,"value":396},"If ",{"type":13,"tag":34,"props":398,"children":400},{"className":399},[],[401],{"type":18,"value":373},{"type":18,"value":403}," is ",{"type":13,"tag":34,"props":405,"children":407},{"className":406},[],[408],{"type":18,"value":381},{"type":18,"value":410},", then the number of sparse\nmemory requirements available is returned in\n",{"type":13,"tag":34,"props":412,"children":414},{"className":413},[],[415],{"type":18,"value":362},{"type":18,"value":417},".\nOtherwise, ",{"type":13,"tag":34,"props":419,"children":421},{"className":420},[],[422],{"type":18,"value":362},{"type":18,"value":424}," ",{"type":13,"tag":426,"props":427,"children":429},"normative",{"type":428},"must",[],{"type":18,"value":431}," point to a variable set\nby the application to the number of elements in the\n",{"type":13,"tag":34,"props":433,"children":435},{"className":434},[],[436],{"type":18,"value":373},{"type":18,"value":438}," array, and on return the variable is\noverwritten with the number of structures actually written to\n",{"type":13,"tag":34,"props":440,"children":442},{"className":441},[],[443],{"type":18,"value":373},{"type":18,"value":445},".\nIf ",{"type":13,"tag":34,"props":447,"children":449},{"className":448},[],[450],{"type":18,"value":362},{"type":18,"value":452}," is less than the number of sparse\nmemory requirements available, at most ",{"type":13,"tag":34,"props":454,"children":456},{"className":455},[],[457],{"type":18,"value":362},{"type":18,"value":459},"\nstructures will be written.",{"type":13,"tag":14,"props":461,"children":462},{},[463,465,471,473,478,480,485],{"type":18,"value":464},"If the image was not created with ",{"type":13,"tag":34,"props":466,"children":468},{"className":467},[],[469],{"type":18,"value":470},"VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT",{"type":18,"value":472},"\nthen ",{"type":13,"tag":34,"props":474,"children":476},{"className":475},[],[477],{"type":18,"value":362},{"type":18,"value":479}," will be zero and\n",{"type":13,"tag":34,"props":481,"children":483},{"className":482},[],[484],{"type":18,"value":373},{"type":18,"value":486}," will not be written to.",{"type":13,"tag":488,"props":489,"children":490},"note",{},[491],{"type":13,"tag":14,"props":492,"children":493},{},[494,496,502,503,509,511,516,518,523,525,529],{"type":18,"value":495},"It is legal for an implementation to report a larger value in\n",{"type":13,"tag":34,"props":497,"children":499},{"className":498},[],[500],{"type":18,"value":501},"VkMemoryRequirements",{"type":18,"value":205},{"type":13,"tag":34,"props":504,"children":506},{"className":505},[],[507],{"type":18,"value":508},"size",{"type":18,"value":510}," than would be obtained by adding\ntogether memory sizes for all ",{"type":13,"tag":34,"props":512,"children":514},{"className":513},[],[515],{"type":18,"value":389},{"type":18,"value":517}," returned\nby ",{"type":13,"tag":34,"props":519,"children":521},{"className":520},[],[522],{"type":18,"value":4},{"type":18,"value":524},".\nThis ",{"type":13,"tag":426,"props":526,"children":528},{"type":527},"may",[],{"type":18,"value":530}," occur when the implementation requires unused padding in the\naddress range describing the resource.",{"type":13,"tag":532,"props":533,"children":535},"validity-group",{"name":534},"Valid Usage (Implicit)",[536,563,585,611,672],{"type":13,"tag":537,"props":538,"children":540},"validity-field",{"name":539},"VUID-vkGetImageSparseMemoryRequirements-device-parameter",[541],{"type":13,"tag":14,"props":542,"children":543},{},[544,549,550,553,555,561],{"type":13,"tag":34,"props":545,"children":547},{"className":546},[],[548],{"type":18,"value":75},{"type":18,"value":424},{"type":13,"tag":426,"props":551,"children":552},{"type":428},[],{"type":18,"value":554}," be a valid ",{"type":13,"tag":346,"props":556,"children":558},{"href":557},"/man/VkDevice",[559],{"type":18,"value":560},"VkDevice",{"type":18,"value":562}," handle",{"type":13,"tag":537,"props":564,"children":566},{"name":565},"VUID-vkGetImageSparseMemoryRequirements-image-parameter",[567],{"type":13,"tag":14,"props":568,"children":569},{},[570,575,576,579,580,584],{"type":13,"tag":34,"props":571,"children":573},{"className":572},[],[574],{"type":18,"value":94},{"type":18,"value":424},{"type":13,"tag":426,"props":577,"children":578},{"type":428},[],{"type":18,"value":554},{"type":13,"tag":346,"props":581,"children":582},{"href":348},[583],{"type":18,"value":351},{"type":18,"value":562},{"type":13,"tag":537,"props":586,"children":588},{"name":587},"VUID-vkGetImageSparseMemoryRequirements-pSparseMemoryRequirementCount-parameter",[589],{"type":13,"tag":14,"props":590,"children":591},{},[592,597,598,601,603,609],{"type":13,"tag":34,"props":593,"children":595},{"className":594},[],[596],{"type":18,"value":362},{"type":18,"value":424},{"type":13,"tag":426,"props":599,"children":600},{"type":428},[],{"type":18,"value":602}," be a valid pointer to a ",{"type":13,"tag":34,"props":604,"children":606},{"className":605},[],[607],{"type":18,"value":608},"uint32_t",{"type":18,"value":610}," value",{"type":13,"tag":537,"props":612,"children":614},{"name":613},"VUID-vkGetImageSparseMemoryRequirements-pSparseMemoryRequirements-parameter",[615],{"type":13,"tag":14,"props":616,"children":617},{},[618,620,625,627,633,635,640,641,646,648,653,654,657,659,664,665,670],{"type":18,"value":619},"If the value referenced by ",{"type":13,"tag":34,"props":621,"children":623},{"className":622},[],[624],{"type":18,"value":362},{"type":18,"value":626}," is not ",{"type":13,"tag":34,"props":628,"children":630},{"className":629},[],[631],{"type":18,"value":632},"0",{"type":18,"value":634},", and ",{"type":13,"tag":34,"props":636,"children":638},{"className":637},[],[639],{"type":18,"value":373},{"type":18,"value":626},{"type":13,"tag":34,"props":642,"children":644},{"className":643},[],[645],{"type":18,"value":381},{"type":18,"value":647},", ",{"type":13,"tag":34,"props":649,"children":651},{"className":650},[],[652],{"type":18,"value":373},{"type":18,"value":424},{"type":13,"tag":426,"props":655,"children":656},{"type":428},[],{"type":18,"value":658}," be a valid pointer to an array of ",{"type":13,"tag":34,"props":660,"children":662},{"className":661},[],[663],{"type":18,"value":362},{"type":18,"value":424},{"type":13,"tag":346,"props":666,"children":668},{"href":667},"/man/VkSparseImageMemoryRequirements",[669],{"type":18,"value":389},{"type":18,"value":671}," structures",{"type":13,"tag":537,"props":673,"children":675},{"name":674},"VUID-vkGetImageSparseMemoryRequirements-image-parent",[676],{"type":13,"tag":14,"props":677,"children":678},{},[679,684,685,688,690],{"type":13,"tag":34,"props":680,"children":682},{"className":681},[],[683],{"type":18,"value":94},{"type":18,"value":424},{"type":13,"tag":426,"props":686,"children":687},{"type":428},[],{"type":18,"value":689}," have been created, allocated, or retrieved from ",{"type":13,"tag":34,"props":691,"children":693},{"className":692},[],[694],{"type":18,"value":75},{"type":13,"tag":696,"props":697,"children":698},"style",{},[699],{"type":18,"value":700},"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":31,"searchDepth":63,"depth":63,"links":702},[],"markdown",1729612515540]