Fixes in documentation

This commit is contained in:
Adam Sawicki 2025-04-11 17:27:57 +02:00
parent e1c0f1ee36
commit 071a681e3b

View file

@ -1670,24 +1670,28 @@ typedef struct VmaVirtualAllocationInfo
*/ */
#ifdef VOLK_HEADER_VERSION #ifdef VOLK_HEADER_VERSION
/** \brief Fully initializes `pDstVulkanFunctions` structure with Vulkan functions needed by this library based on functions imported by /** \brief Fully initializes `pDstVulkanFunctions` structure with Vulkan functions needed by VMA
[volk library](https://github.com/zeux/volk). using [volk library](https://github.com/zeux/volk).
This function is defined in VMA header only if "volk.h" was included before it. This function is defined in VMA header only if "volk.h" was included before it.
To use this function properly: To use this function properly:
-# Create `VkInstance` and `VkDevice` object. -# Initialize volk and Vulkan:
-# Call `volkInitialize()`
-# Create `VkInstance` object
-# Call `volkLoadInstance()`
-# Create `VkDevice` object
-# Call `volkLoadDevice()`
-# Fill in structure #VmaAllocatorCreateInfo, especially members: -# Fill in structure #VmaAllocatorCreateInfo, especially members:
- VmaAllocatorCreateInfo::device - VmaAllocatorCreateInfo::device
- VmaAllocatorCreateInfo::vulkanApiVersion - VmaAllocatorCreateInfo::vulkanApiVersion
- VmaAllocatorCreateInfo::flags - set appropriate flags for the Vulkan extensions you enabled - VmaAllocatorCreateInfo::flags - set appropriate flags for the Vulkan extensions you enabled
-# Define structure #VmaVulkanFunctions. -# Create an instance of the #VmaVulkanFunctions structure.
-# Call this function. -# Call vmaImportVulkanFunctionsFromVolk().
Parameter `pAllocatorCreateInfo` is read to find out which functions should be fetched for Parameter `pAllocatorCreateInfo` is read to find out which functions should be fetched for
appropriate Vulkan version and extensions. appropriate Vulkan version and extensions.
Parameter `pDstVulkanFunctions` is filled with those function pointers. Parameter `pDstVulkanFunctions` is filled with those function pointers, or null if not applicable.
Others are set to null.
-# Attach the #VmaVulkanFunctions structure to VmaAllocatorCreateInfo::pVulkanFunctions. -# Attach the #VmaVulkanFunctions structure to VmaAllocatorCreateInfo::pVulkanFunctions.
-# Call vmaCreateAllocator() to create the #VmaAllocator object. -# Call vmaCreateAllocator() to create the #VmaAllocator object.