|
luna engine
software engine
|
#include <vulkanAllocator.h>

Classes | |
| struct | transferCommand |
| struct | vmaAllocation |
Static Public Member Functions | |
| static void | init (ref< renderer::device > device) |
| allocator constructor. More... | |
| static void | shutdown () |
| destroys the allocator. More... | |
| static VmaAllocationInfo | getAllocationInfo (const uint64_t &handle) |
| returns the allocation info from the given handle. More... | |
| static VkResult | createImage (VkImage *pImage, const VkImageUsageFlags &usageFlags, const VmaMemoryUsage &memoryUsage, const VkExtent3D &extent, const VkFormat &format) |
| creates a VkImage object. More... | |
| static VkResult | destroyImage (const VkImage &image) |
| destroys the VkImage object. More... | |
| static VkResult | createImageView (VkImageView *pImageView, const VkImage &image, const VkFormat &format, const VkImageAspectFlags &imageAspectFlags) |
| creates a VkImageView object. More... | |
| static VkResult | destroyImageView (const VkImageView &imageView) |
| destroys the VkImageView. More... | |
| static VkResult | createBuffer (VkBuffer *pBuffer, const size_t &allocSize, const VkBufferUsageFlags &usage, const VmaMemoryUsage &memoryUsage, const VmaAllocationCreateFlags &allocFlags=0) |
| creates a VkBuffer object. More... | |
| static void | destroyBuffer (VkBuffer &buffer) |
| destroys the VkBuffer object. More... | |
| static void | uploadTexture (VkBuffer &buffer, const VkImage &image, const VkFormat &imageFormat, const glm::vec3 &imageDimensions, const glm::vec3 &imageOffset={0, 0, 0}, const glm::vec2 &subImageDimensions={0, 0}, const uint64_t bufferOffset=0) |
| uploads a texture to the gpu . More... | |
| static void | flush () |
| executes all recorded transferCommands. More... | |
| static VkFormat | getSuitableFormat (const VkImageUsageFlags &usageFlags, const uint32_t &channels) |
| returns a supported VK_FORMAT given a channel amount from 1-4, if no supported format can be found VK_FORMAT_UNDEFINED will be returned More... | |
Static Private Member Functions | |
| static void | transitionImageLayout (const VkImage &image, const VkFormat &format, const VkImageLayout &oldLayout, const VkImageLayout &newLayout, const vulkan::virtualCmdBuffer &commandBufffer) |
| transitions the image layout. More... | |
Static Private Attributes | |
| static ref< renderer::device > | pDevice |
| static VmaAllocator | sAllocator |
| static objectStorage< vmaAllocation > | allocations |
| static std::vector< transferCommand > | transferCommands |
| static ref< vulkan::vulkanCmdPool > | commandPool = nullptr |
| static VkQueue | transferQueue |
|
static |
creates a VkBuffer object.
| pBuffer | pointer to the buffer handle |
| allocSize | |
| usage | |
| memoryUsage |
|
static |
creates a VkImage object.
| pImage | pointer to the image handle |
| usageFlags | |
| memoryUsage | VMA_MEMORY_USAGE |
| extent | image extend |
| format | VkImageFormat |
|
static |
creates a VkImageView object.
| pImageView | pointer to imageView handle |
| image | VkImage handle |
| format | |
| imageAspectFlags |
|
static |
destroys the VkBuffer object.
| buffer |
|
static |
destroys the VkImage object.
| image |
|
static |
destroys the VkImageView.
| imageView |
|
static |
executes all recorded transferCommands.
|
static |
returns the allocation info from the given handle.
| handle |
|
static |
returns a supported VK_FORMAT given a channel amount from 1-4, if no supported format can be found VK_FORMAT_UNDEFINED will be returned
| usageFlags | |
| channels |
|
static |
allocator constructor.
| ref<renderer::device> | device reference to the device |
|
static |
destroys the allocator.
|
staticprivate |
transitions the image layout.
| VkImage | image imageHandle |
| VkFormat | format |
| VkImageLayout | oldLayout |
| VkImageLayout | newLayout |
| VkCommandBuffer | commandBufffer |
|
static |
uploads a texture to the gpu .
| buffer | dataBuffer that stores texelData |
| image | handle to copy texelData in to. |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |