mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-05 04:10:06 +00:00
Improved documentation about vk_khr_external_memory_win32
This commit is contained in:
parent
2e37247a59
commit
00bf7a304e
@ -181,7 +181,8 @@ Memory allocation</h1>
|
||||
<div class="ttc" id="agroup__group__alloc_html_gac72ee55598617e8eecca384e746bab51"><div class="ttname"><a href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a></div><div class="ttdeci">VkResult vmaCreateBuffer(VmaAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, VkBuffer *pBuffer, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo)</div><div class="ttdoc">Creates a new VkBuffer, allocates and binds memory for it.</div></div>
|
||||
<div class="ttc" id="astruct_vma_allocation_create_info_html_a6272c0555cfd1fe28bff1afeb6190150"><div class="ttname"><a href="struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150">VmaAllocationCreateInfo::pool</a></div><div class="ttdeci">VmaPool pool</div><div class="ttdoc">Pool that this allocation should be created in.</div><div class="ttdef"><b>Definition</b> vk_mem_alloc.h:1321</div></div>
|
||||
<div class="ttc" id="astruct_vma_allocation_html"><div class="ttname"><a href="struct_vma_allocation.html">VmaAllocation</a></div><div class="ttdoc">Represents single memory allocation.</div></div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="vk_khr_external_memory_win32_exporting_win32_handle"></a>
|
||||
</div><!-- fragment --><p>If you need each allocation to have its own device memory block and start at offset 0, you can still do by using <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f" title="Set this flag if the allocation should have its own memory block.">VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</a> flag. It works also with custom pools.</p>
|
||||
<h1><a class="anchor" id="vk_khr_external_memory_win32_exporting_win32_handle"></a>
|
||||
Exporting Win32 handle</h1>
|
||||
<p>After the allocation is created, you can acquire a Win32 <code>HANDLE</code> to the <code>VkDeviceMemory</code> block it belongs to. VMA function <a class="el" href="group__group__alloc.html#ga8d327b7458d8cf426b84b5efba9bb9bf" title="Given an allocation, returns Win32 handle that may be imported by other processes or APIs.">vmaGetMemoryWin32Handle()</a> is a replacement of the Vulkan function <code>vkGetMemoryWin32HandleKHR</code>.</p>
|
||||
<div class="fragment"><div class="line">HANDLE handle;</div>
|
||||
|
@ -18929,6 +18929,9 @@ res = vmaCreateBuffer(g_Allocator, &bufCreateInfo, &allocCreateInfo, &buf, &allo
|
||||
vmaDestroyBuffer(g_Allocator, buf, alloc);
|
||||
\endcode
|
||||
|
||||
If you need each allocation to have its own device memory block and start at offset 0, you can still do
|
||||
by using #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT flag. It works also with custom pools.
|
||||
|
||||
\section vk_khr_external_memory_win32_exporting_win32_handle Exporting Win32 handle
|
||||
|
||||
After the allocation is created, you can acquire a Win32 `HANDLE` to the `VkDeviceMemory` block it belongs to.
|
||||
|
Loading…
Reference in New Issue
Block a user