@@ -72,7 +72,7 @@ License: MIT
7272 - [Memory initialization](@ref debugging_memory_usage_initialization)
7373 - [Margins](@ref debugging_memory_usage_margins)
7474 - [Corruption detection](@ref debugging_memory_usage_corruption_detection)
75- - \subpage opengl_interop
75+ - \subpage other_api_interop
7676- \subpage usage_patterns
7777 - [GPU-only resource](@ref usage_patterns_gpu_only)
7878 - [Staging copy for upload](@ref usage_patterns_staging_copy_upload)
@@ -525,6 +525,9 @@ typedef enum VmaAllocationCreateFlagBits
525525 /** \brief Set this flag if the allocation should have its own memory block.
526526
527527 Use it for special, big resources, like fullscreen images used as attachments.
528+
529+ If you use this flag while creating a buffer or an image, `VkMemoryDedicatedAllocateInfo`
530+ structure is applied if possible.
528531 */
529532 VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT = 0x00000001,
530533
@@ -19089,22 +19092,22 @@ Margin validation (corruption detection) works only for memory types that are
1908919092`HOST_VISIBLE` and `HOST_COHERENT`.
1909019093
1909119094
19092- \page opengl_interop OpenGL Interop
19095+ \page other_api_interop Interop with other graphics APIs
1909319096
19094- VMA provides some features that help with interoperability with OpenGL.
19097+ VMA provides some features that help with interoperability with other graphics APIs, e.g. OpenGL.
1909519098
1909619099\section opengl_interop_exporting_memory Exporting memory
1909719100
19098- If you want to attach `VkExportMemoryAllocateInfoKHR` structure to `pNext` chain of memory allocations made by the library:
19101+ If you want to attach `VkExportMemoryAllocateInfoKHR` or other structure to `pNext` chain of memory allocations made by the library:
1909919102
19100- It is recommended to create \ref custom_memory_pools for such allocations.
19103+ You can create \ref custom_memory_pools for such allocations.
1910119104Define and fill in your `VkExportMemoryAllocateInfoKHR` structure and attach it to VmaPoolCreateInfo::pMemoryAllocateNext
1910219105while creating the custom pool.
1910319106Please note that the structure must remain alive and unchanged for the whole lifetime of the #VmaPool,
1910419107not only while creating it, as no copy of the structure is made,
1910519108but its original pointer is used for each allocation instead.
1910619109
19107- If you want to export all memory allocated by the library from certain memory types,
19110+ If you want to export all memory allocated by VMA from certain memory types,
1910819111also dedicated allocations or other allocations made from default pools,
1910919112an alternative solution is to fill in VmaAllocatorCreateInfo::pTypeExternalMemoryHandleTypes.
1911019113It should point to an array with `VkExternalMemoryHandleTypeFlagsKHR` to be automatically passed by the library
@@ -19121,7 +19124,7 @@ Buffers or images exported to a different API like OpenGL may require a differen
1912119124higher than the one used by the library automatically, queried from functions like `vkGetBufferMemoryRequirements`.
1912219125To impose such alignment:
1912319126
19124- It is recommended to create \ref custom_memory_pools for such allocations.
19127+ You can create \ref custom_memory_pools for such allocations.
1912519128Set VmaPoolCreateInfo::minAllocationAlignment member to the minimum alignment required for each allocation
1912619129to be made out of this pool.
1912719130The alignment actually used will be the maximum of this member and the alignment returned for the specific buffer or image
@@ -19132,6 +19135,7 @@ use special function vmaCreateBufferWithAlignment(), which takes additional para
1913219135
1913319136Note the problem of alignment affects only resources placed inside bigger `VkDeviceMemory` blocks and not dedicated
1913419137allocations, as these, by definition, always have alignment = 0 because the resource is bound to the beginning of its dedicated block.
19138+ You can ensure that an allocation is created as dedicated by using #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT.
1913519139Contrary to Direct3D 12, Vulkan doesn't have a concept of alignment of the entire memory block passed on its allocation.
1913619140
1913719141\section opengl_interop_extended_allocation_information Extended allocation information
0 commit comments