10#include "evan/EvanPlatform.hpp"
111 bool _recording =
false;
116 void *_stagingMapped =
nullptr;
120 std::vector<PendingBatch> _pending;
Owns staging memory and command buffers used to upload data to device-local resources without drainin...
void destroy()
Releases every Vulkan resource owned by this manager.
void uploadBuffer(const void *data, VkDeviceSize size, VkBuffer dst, VkDeviceSize dstOffset=0)
Copies host data into the staging ring and records a vkCmdCopyBuffer from the ring slot into dst.
void transitionImageLayout(VkImage image, VkFormat format, VkImageLayout oldLayout, VkImageLayout newLayout, uint32_t mipLevels)
Records an image layout transition into the current batch.
void flush()
Submits the pending transfer command buffer, if any.
void waitIdle()
Flushes pending work and blocks until every submitted batch has completed on the GPU.
void init(VkDevice device, VkPhysicalDevice physicalDevice, VkQueue graphicsQueue, uint32_t graphicsFamily)
Initializes the transfer queue and command pool.
void generateMipmaps(VkImage image, VkFormat format, uint32_t width, uint32_t height, uint32_t mipLevels)
Records a mipmap generation chain into the current batch.
void uploadBufferToImage(const void *data, VkDeviceSize size, VkImage dst, const VkBufferImageCopy ®ion)
Copies host data into the staging ring and records a vkCmdCopyBufferToImage from the ring slot into d...
Small result wrapper used by helpers that must return both a status and a value (e....