You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<divclass="ttc" id="astruct_vma_allocation_info_html_adc507656149c04de7ed95d0042ba2a13"><divclass="ttname"><ahref="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13">VmaAllocationInfo::pUserData</a></div><divclass="ttdeci">void * pUserData</div><divclass="ttdoc">Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vma...</div><divclass="ttdef"><b>Definition</b> vk_mem_alloc.h:1412</div></div>
108
108
</div><!-- fragment --><p>It can also be changed using function <aclass="el" href="group__group__alloc.html#gaf9147d31ffc11d62fc187bde283ed14f" title="Sets pUserData in given allocation to new value.">vmaSetAllocationUserData()</a>.</p>
109
-
<p>Values of (non-zero) allocations' <code>pUserData</code> are printed in JSON report created by vmaBuildStatsString() in hexadecimal form.</p>
109
+
<p>Values of (non-zero) allocations' <code>pUserData</code> are printed in JSON report created by <aclass="el" href="group__group__stats.html#gaa4fee7eb5253377599ef4fd38c93c2a0" title="Builds and returns statistics as a null-terminated string in JSON format.">vmaBuildStatsString()</a> in hexadecimal form.</p>
110
110
<h1><aclass="anchor" id="allocation_names"></a>
111
111
Allocation names</h1>
112
112
<p>An allocation can also carry a null-terminated string, giving a name to the allocation. To set it, call <aclass="el" href="group__group__alloc.html#gabe02cbb0cd913b3f125958179f2020fc" title="Sets pName in given allocation to new value.">vmaSetAllocationName()</a>. The library creates internal copy of the string, so the pointer you pass doesn't need to be valid for whole lifetime of the allocation. You can free it after the call.</p>
<divclass="ttc" id="agroup__group__alloc_html_gabe02cbb0cd913b3f125958179f2020fc"><divclass="ttname"><ahref="group__group__alloc.html#gabe02cbb0cd913b3f125958179f2020fc">vmaSetAllocationName</a></div><divclass="ttdeci">void vmaSetAllocationName(VmaAllocator allocator, VmaAllocation allocation, const char *pName)</div><divclass="ttdoc">Sets pName in given allocation to new value.</div></div>
117
-
</div><!-- fragment --><p>The string can be later retrieved by inspecting <aclass="el" href="struct_vma_allocation_info.html#a28612f3e897e5b268254a3c63413d759" title="Custom allocation name that was set with vmaSetAllocationName().">VmaAllocationInfo::pName</a>. It is also printed in JSON report created by vmaBuildStatsString().</p>
117
+
</div><!-- fragment --><p>The string can be later retrieved by inspecting <aclass="el" href="struct_vma_allocation_info.html#a28612f3e897e5b268254a3c63413d759" title="Custom allocation name that was set with vmaSetAllocationName().">VmaAllocationInfo::pName</a>. It is also printed in JSON report created by <aclass="el" href="group__group__stats.html#gaa4fee7eb5253377599ef4fd38c93c2a0" title="Builds and returns statistics as a null-terminated string in JSON format.">vmaBuildStatsString()</a>.</p>
118
118
<dlclass="section note"><dt>Note</dt><dd>Setting string name to VMA allocation doesn't automatically set it to the Vulkan buffer or image created with it. You must do it manually using an extension like VK_EXT_debug_utils, which is independent of this library. </dd></dl>
<p>It is valid to use this flag for allocation made from memory type that is not <code>HOST_VISIBLE</code>. This flag is then ignored and memory is not mapped. This is useful if you need an allocation that is efficient to use on GPU (<code>DEVICE_LOCAL</code>) and still want to map it directly if possible on platforms that support it (e.g. Intel GPU). </p>
688
688
</td></tr>
689
689
<tr><tdclass="fieldname"><aid="ggad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520" name="ggad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520"></a>VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT </td><tdclass="fielddoc"><dlclass="deprecated"><dt><b><aclass="el" href="deprecated.html#_deprecated000006">Deprecated</a></b></dt><dd>Preserved for backward compatibility. Consider using <aclass="el" href="#gabe02cbb0cd913b3f125958179f2020fc" title="Sets pName in given allocation to new value.">vmaSetAllocationName()</a> instead.</dd></dl>
690
-
<p>Set this flag to treat <aclass="el" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19" title="Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...">VmaAllocationCreateInfo::pUserData</a> as pointer to a null-terminated string. Instead of copying pointer value, a local copy of the string is made and stored in allocation's <code>pName</code>. The string is automatically freed together with the allocation. It is also used in vmaBuildStatsString(). </p>
690
+
<p>Set this flag to treat <aclass="el" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19" title="Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...">VmaAllocationCreateInfo::pUserData</a> as pointer to a null-terminated string. Instead of copying pointer value, a local copy of the string is made and stored in allocation's <code>pName</code>. The string is automatically freed together with the allocation. It is also used in <aclass="el" href="group__group__stats.html#gaa4fee7eb5253377599ef4fd38c93c2a0" title="Builds and returns statistics as a null-terminated string in JSON format.">vmaBuildStatsString()</a>. </p>
691
691
</td></tr>
692
692
<tr><tdclass="fieldname"><aid="ggad9889c10c798b040d59c92f257cae597a42ba3a2d2c7117953210b7c3ef8da0df" name="ggad9889c10c798b040d59c92f257cae597a42ba3a2d2c7117953210b7c3ef8da0df"></a>VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT </td><tdclass="fielddoc"><p>Allocation will be created from upper stack in a double stack pool.</p>
693
693
<p>This flag is only allowed for custom pools created with <aclass="el" href="#gga9a7c45f9c863695d98c83fa5ac940fe7a13c8a444197c67866be9cb05599fc726" title="Enables alternative, linear allocation algorithm in this pool.">VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT</a> flag. </p>
0 commit comments