8 #include <vulkan/vulkan_core.h>
9 #include <utility/dllexport.h>
10 #include <nap/numeric.h>
11 #include <utility/errorstate.h>
15 #include "imagedata.h"
16 #include "bufferdata.h"
17 #include "vk_mem_alloc.h"
18 #include "surfacedescriptor.h"
41 bool NAPAPI
createRenderPass(VkDevice device, VkFormat colorFormat, VkFormat depthFormat, VkSampleCountFlagBits samples, VkImageLayout targetLayout,
bool consumeDepth, VkRenderPass& renderPass, utility::ErrorState& errorState);
46 bool NAPAPI
createRenderPass(VkDevice device, VkFormat colorFormat, VkFormat depthFormat, VkSampleCountFlagBits samples, VkImageLayout targetLayout, VkRenderPass& renderPass, utility::ErrorState& errorState);
51 bool NAPAPI
createDepthOnlyRenderPass(VkDevice device, VkFormat depthFormat, VkRenderPass& renderPass, utility::ErrorState& errorState);
56 bool NAPAPI
create2DImage(VmaAllocator allocator,
uint32 width,
uint32 height, VkFormat format,
uint32 mipLevels, VkSampleCountFlagBits samples, VkImageTiling tiling, VkImageUsageFlags imageUsage, VmaMemoryUsage memoryUsage, VkImage& outImage, VmaAllocation& outAllocation, VmaAllocationInfo& outAllocationInfo, utility::ErrorState& errorState);
61 bool NAPAPI
create2DImageView(VkDevice device, VkImage image, VkFormat format,
uint32 mipLevels, VkImageAspectFlags aspectFlags, VkImageView& outImageView, utility::ErrorState& errorState);
66 bool NAPAPI
createLayered2DImage(VmaAllocator allocator,
uint32 width,
uint32 height, VkFormat format,
uint32 mipLevels,
uint32 layerCount, VkSampleCountFlagBits samples, VkImageTiling tiling, VkImageUsageFlags imageUsage, VmaMemoryUsage memoryUsage, VkImageCreateFlags flags, VkImage& outImage, VmaAllocation& outAllocation, VmaAllocationInfo& outAllocationInfo, utility::ErrorState& errorState);
71 bool NAPAPI
createLayered2DImageView(VkDevice device, VkImage image, VkFormat format,
uint32 mipLevels, VkImageAspectFlags aspectFlags,
uint32 layerIndex,
uint32 layerCount, VkImageView& outImageView, utility::ErrorState& errorState);
76 bool NAPAPI
createCubeImageView(VkDevice device, VkImage image, VkFormat format,
uint32 mipLevels, VkImageAspectFlags aspectFlags,
uint32 layerCount, VkImageView& outImageView, utility::ErrorState& errorState);
86 bool NAPAPI
createBuffer(VmaAllocator allocator,
uint32 size, VkBufferUsageFlags bufferUsage, VmaMemoryUsage memoryUsage, VmaAllocationCreateFlags allocationFlags, BufferData& outBuffer, utility::ErrorState& error);
91 void NAPAPI
destroyBuffer(VmaAllocator allocator, BufferData& buffer);
96 bool NAPAPI
uploadToBuffer(VmaAllocator allocator,
uint32 size,
const void* data, BufferData& buffer);