GitHub - GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator: Easy To Combi…
페이지 정보
작성자 Evie 댓글 0건 조회 25회 작성일 25-11-27 02:28본문
Simple to integrate Vulkan memory allocation library. It requires a lot of boilerplate code, similar to every part else in Vulkan, because it's a low-degree and high-performance API. There's extra degree of indirection: VkDeviceMemory is allocated individually from creating VkBuffer/VkImage and so they must be sure collectively. Driver should be queried for supported memory heaps and memory varieties. Different GPU distributors provide various kinds of it. It is recommended to allocate larger chunks of memory and assign parts of them to explicit assets, as there is a limit on most number of memory blocks that may be allocated. 1. Capabilities that assist to choose appropriate and optimal memory kind based mostly on supposed utilization of the memory. Required or most popular traits of the memory are expressed utilizing larger-level description evaluating to Vulkan flags. Library keeps track of allocated memory blocks, used and unused ranges inside them, finds greatest matching unused ranges for new allocations, respects all the rules of alignment and buffer/image granularity.
3. Functions that can create a picture/buffer, allocate memory for it and bind them collectively - multi functional name. Nicely-documented - description of all capabilities and constructions provided, together with chapters that include general description and example code. Thread-security: Library is designed to be used in multithreaded code. Entry to a single system memory block referred by totally different buffers and textures (binding, mapping) is synchronized internally. Memory mapping is reference-counted. Configuration: Fill optional members of VmaAllocatorCreateInfo structure to supply customized CPU memory allocator, pointers to Vulkan features and other parameters. Customization and integration with custom engines: Predefine appropriate macros to offer your individual implementation of all exterior amenities utilized by the library like assert, mutex, atomic. Help for memory mapping, reference-counted internally. Support for persistently mapped memory: Simply allocate with acceptable flag and entry the pointer to already mapped memory. Help for MemoryWave Official non-coherent memory. Capabilities that flush/invalidate memory. CoherentAtomSize is revered routinely.
Help for resource aliasing (overlap). Assist for sparse binding and sparse residency: Convenience functions that allocate or free multiple memory pages directly. Custom memory swimming pools: Create a pool with desired parameters (e.g. fixed or limited maximum dimension) and allocate memory out of it. Linear allocator: Create a pool with linear algorithm and use it for a lot quicker allocations and deallocations in free-at-as soon as, stack, double stack, or ring buffer trend. Just enable it and will probably be used mechanically by the library. Used internally if out there to question for current utilization and funds. If not out there, it falls again to an estimation primarily based on memory heap sizes. KHR is routinely added to memory allocations the place needed. Set priority of allocations or customized pools and it is going to be set robotically utilizing this extension. Public interface in C, in identical convention as Vulkan API. Error dealing with carried out by returning VkResult error codes - similar manner as in Vulkan.
Interface documented using Doxygen-model feedback. Platform-impartial, but developed and examined on Home windows utilizing Visual Studio. Steady integration setup for Home windows and Linux. Used additionally on Android, MacOS, and other platforms. Basic utilization of this library is quite simple. Advanced options are elective. VkDeviceMemory block is allotted if wanted. 1. An unused area of the memory block is sure to this buffer. VmaAllocation is an object that represents memory assigned to this buffer. It may be queried for parameters like VkDeviceMemory handle and offset. On Home windows it is recommended to make use of CMake GUI. This routinely handles configuring the include listing. For extra data on utilizing CMake visit the MemoryWave Official CMake documentation. The VulkanMemoryAllocator port in vcpkg is stored updated by Microsoft staff members and group contributors. If the model is out of date, please create a difficulty or pull request on the vcpkg repository. The discharge comes with precompiled binary executable for "VulkanSample" application which accommodates test suite. Vulkan Samples - official Khronos Vulkan samples.
댓글목록
등록된 댓글이 없습니다.