Skip to content

Commit 00bf7a3

Browse files
Improved documentation about vk_khr_external_memory_win32
1 parent 2e37247 commit 00bf7a3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/html/vk_khr_external_memory_win32.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ <h1><a class="anchor" id="vk_khr_external_memory_win32_memory_allocation"></a>
181181
<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>
182182
<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>
183183
<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>
184-
</div><!-- fragment --><h1><a class="anchor" id="vk_khr_external_memory_win32_exporting_win32_handle"></a>
184+
</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>
185+
<h1><a class="anchor" id="vk_khr_external_memory_win32_exporting_win32_handle"></a>
185186
Exporting Win32 handle</h1>
186187
<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>
187188
<div class="fragment"><div class="line">HANDLE handle;</div>

include/vk_mem_alloc.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18929,6 +18929,9 @@ res = vmaCreateBuffer(g_Allocator, &bufCreateInfo, &allocCreateInfo, &buf, &allo
1892918929
vmaDestroyBuffer(g_Allocator, buf, alloc);
1893018930
\endcode
1893118931

18932+
If you need each allocation to have its own device memory block and start at offset 0, you can still do
18933+
by using #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT flag. It works also with custom pools.
18934+
1893218935
\section vk_khr_external_memory_win32_exporting_win32_handle Exporting Win32 handle
1893318936

1893418937
After the allocation is created, you can acquire a Win32 `HANDLE` to the `VkDeviceMemory` block it belongs to.

0 commit comments

Comments
 (0)