GPGMM
GPGMM, a General-Purpose GPU Memory Management Library
|
Classes | |
struct | GpAllocatorCreateInfo |
Used to create allocator. More... | |
struct | GpResourceAllocationCreateInfo |
Enumerations | |
enum | GpAllocatorCreateFlags { GP_ALLOCATOR_CREATE_NONE = 0x0 , GP_ALLOCATOR_CREATE_DISABLE_MEMORY_PREFETCH = 0x4 , GP_ALLOCATOR_CREATE_ALWAYS_ON_DEMAND = 0x8 , GP_ALLOCATOR_CREATE_ALWAYS_IN_BUDGET = 0x10 } |
Configures how allocators should be created. More... | |
enum | GpAllocatorAlgorithm { GP_ALLOCATOR_ALGORITHM_DEFAULT = 0 , GP_ALLOCATOR_ALGORITHM_SLAB = 1 , GP_ALLOCATOR_ALGORITHM_BUDDY_SYSTEM = 2 , GP_ALLOCATOR_ALGORITHM_FIXED_POOL = 3 , GP_ALLOCATOR_ALGORITHM_SEGMENTED_POOL = 4 } |
enum | GpResourceAllocationCreateFlags { GP_ALLOCATION_CREATE_NONE = 0x0 , GP_ALLOCATION_CREATE_NEVER_ALLOCATE_MEMORY = 0x1 , GP_ALLOCATION_CREATE_NEVER_SUBALLOCATE_MEMORY = 0x4 , GP_ALLOCATION_CREATE_ALWAYS_PREFETCH_MEMORY = 0x8 } |
Functions | |
GPGMM_EXPORT VkResult | gpCreateResourceAllocator (const GpAllocatorCreateInfo &info, GpResourceAllocator *allocatorOut) |
Create allocator used to create and manage video memory for the App specified device and instance. | |
GPGMM_EXPORT void | gpDestroyResourceAllocator (GpResourceAllocator allocator) |
Destroy allocator. | |
GPGMM_EXPORT VkResult | gpCreateBuffer (GpResourceAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, VkBuffer *pBuffer, const GpResourceAllocationCreateInfo *pAllocationCreateInfo, GpResourceAllocation *allocationOut) |
Create a buffer allocation. | |
GPGMM_EXPORT void | gpDestroyBuffer (GpResourceAllocator allocator, VkBuffer buffer, GpResourceAllocation allocation) |
Destroy buffer allocation. | |
GPGMM_EXPORT VkResult | gpCreateImage (GpResourceAllocator allocator, const VkImageCreateInfo *pImageCreateInfo, VkImage *pImage, const GpResourceAllocationCreateInfo *pAllocationCreateInfo, GpResourceAllocation *allocationOut) |
Create a image allocation. | |
GPGMM_EXPORT void | gpDestroyImage (GpResourceAllocator allocator, VkImage image, GpResourceAllocation allocation) |
Destroy image allocation. | |
Specify the algorithms used for allocation.
Configures how allocators should be created.
Additional controls that modify allocations.
GPGMM_EXPORT VkResult gpgmm::vk::gpCreateBuffer | ( | GpResourceAllocator | allocator, |
const VkBufferCreateInfo * | pBufferCreateInfo, | ||
VkBuffer * | pBuffer, | ||
const GpResourceAllocationCreateInfo * | pAllocationCreateInfo, | ||
GpResourceAllocation * | allocationOut ) |
Create a buffer allocation.
allocator | A GpResourceAllocator used to create the buffer and allocation. | |
pBufferCreateInfo | A pointer to a VkBufferCreateInfo that describes the buffer to create. | |
pBuffer | A pointer to a VkBuffer that will be created using the allocation. | |
pAllocationCreateInfo | A pointer to a GpResourceAllocationCreateInfo that describes the allocation. | |
[out] | allocationOut | A pointer to GpResourceAllocation that represents the buffer allocation. |
GPGMM_EXPORT VkResult gpgmm::vk::gpCreateImage | ( | GpResourceAllocator | allocator, |
const VkImageCreateInfo * | pImageCreateInfo, | ||
VkImage * | pImage, | ||
const GpResourceAllocationCreateInfo * | pAllocationCreateInfo, | ||
GpResourceAllocation * | allocationOut ) |
Create a image allocation.
allocator | A GpResourceAllocator used to create the image and allocation. | |
pImageCreateInfo | A pointer to a VkImageCreateInfo that describes the image to create. | |
pImage | A pointer to a VkImage that will be created using the allocation. | |
pAllocationCreateInfo | A pointer to a GpResourceAllocationCreateInfo that describes the allocation. | |
[out] | allocationOut | A pointer to GpResourceAllocation that represents the image allocation. |
GPGMM_EXPORT VkResult gpgmm::vk::gpCreateResourceAllocator | ( | const GpAllocatorCreateInfo & | info, |
GpResourceAllocator * | allocatorOut ) |
Create allocator used to create and manage video memory for the App specified device and instance.
info | A reference to GpAllocatorCreateInfo structure that describes the allocator. | |
[out] | allocatorOut | Pointer to a memory block that receives a pointer to the resource allocator. Pass NULL to test if allocator creation would succeed, but not actually create the allocator. If NULL is passed and allocator creating would succeed, VK_INCOMPLETE is returned. |
GPGMM_EXPORT void gpgmm::vk::gpDestroyBuffer | ( | GpResourceAllocator | allocator, |
VkBuffer | buffer, | ||
GpResourceAllocation | allocation ) |
Destroy buffer allocation.
allocator | A GpResourceAllocator used to create the buffer and allocation. |
buffer | A VkBuffer that was also created by the allocator. |
allocation | A GpResourceAllocation that was created by the allocator. |
GPGMM_EXPORT void gpgmm::vk::gpDestroyImage | ( | GpResourceAllocator | allocator, |
VkImage | image, | ||
GpResourceAllocation | allocation ) |
Destroy image allocation.
allocator | A GpResourceAllocator used to create the image and allocation. |
image | A VkImage that was also created by the allocator. |
allocation | A GpResourceAllocation that was created by the allocator. |
GPGMM_EXPORT void gpgmm::vk::gpDestroyResourceAllocator | ( | GpResourceAllocator | allocator | ) |
Destroy allocator.
allocator | A GpResourceAllocator to destroy. |