#ifndef SVK_INITIALIZERS_HPP
#define SVK_INITIALIZERS_HPP

#include "svk_types.hpp"



VkCommandPoolCreateInfo _generateVkCommandPoolCreateInfo([[maybe_unused]] uint32_t queueFamilyIndex, VkCommandPoolCreateFlags flags = 0);
VkCommandBufferAllocateInfo _generateVkCommandBufferAllocateInfo(VkCommandPool pool, uint32_t count = 1);


VkCommandBufferBeginInfo _generateVkCommandBufferBeginInfo(VkCommandBufferUsageFlags flags = 0);
VkCommandBufferSubmitInfo _generateVkCommandBufferSubmitInfo(VkCommandBuffer cmd);

VkFenceCreateInfo _generateVkFenceCreateInfo(VkFenceCreateFlags flags = 0);

VkSemaphoreCreateInfo _generateVkSemaphoreCreateInfo(VkSemaphoreCreateFlags flags = 0);
VkSemaphoreSubmitInfo _generateVkSemaphoreSubmitInfo(VkPipelineStageFlags2 stageMask, VkSemaphore semaphore);


VkSubmitInfo2 _generateVkSubmitInfo2(VkCommandBufferSubmitInfo* cmd, VkSemaphoreSubmitInfo* signalSemaphoreInfo,
    VkSemaphoreSubmitInfo* waitSemaphoreInfo);
VkPresentInfoKHR _generateVkPresentInfoKHR();

VkRenderingAttachmentInfo _generateVkRenderingAttachmentInfo(VkImageView view, VkClearValue* clear, VkImageLayout layout /*= VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL*/);

VkRenderingAttachmentInfo _generateVkRenderingDepthAttachmentInfo(VkImageView view,
    VkImageLayout layout /*= VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL*/);

VkRenderingInfo _generateVkRenderingInfo(VkExtent2D renderExtent, VkRenderingAttachmentInfo* colorAttachment,
    VkRenderingAttachmentInfo* depthAttachment);

VkImageSubresourceRange _generateVkImageSubresourceRange(VkImageAspectFlags aspectMask);

VkDescriptorSetLayoutBinding _generateVkDescriptorSetLayoutBinding(VkDescriptorType type, VkShaderStageFlags stageFlags,
    uint32_t binding);
VkDescriptorSetLayoutCreateInfo _generateVkDescriptorSetLayoutCreateInfo(VkDescriptorSetLayoutBinding* bindings,
    uint32_t bindingCount);
VkWriteDescriptorSet _generateVkWriteDescriptorSetImage(VkDescriptorType type, VkDescriptorSet dstSet,
    VkDescriptorImageInfo* imageInfo, uint32_t binding);
VkWriteDescriptorSet _generateVkWriteDescriptorSetBuffer(VkDescriptorType type, VkDescriptorSet dstSet,
    VkDescriptorBufferInfo* bufferInfo, uint32_t binding);
VkDescriptorBufferInfo _generateVkDescriptorBufferInfo(VkBuffer buffer, VkDeviceSize offset, VkDeviceSize range);

VkImageCreateInfo _generateVkImageCreateInfo(VkFormat format, VkImageUsageFlags usageFlags, VkExtent3D extent);
VkImageViewCreateInfo _generateVkImageViewCreateInfo(VkFormat format, VkImage image, VkImageAspectFlags aspectFlags);
VkPipelineLayoutCreateInfo _generateVkPipelineLayoutCreateInfo();
VkPipelineShaderStageCreateInfo _generateVkPipelineShaderStageCreateInfo(VkShaderStageFlagBits stage,
    VkShaderModule shaderModule,
    const char * entry = "main");

#endif // SVK_INITIALIZERS_HPP