.. _program_listing_file_Source_Azura_RenderSystem_Inc_Vulkan_VkCore.h: Program Listing for File VkCore.h ================================= |exhale_lsh| :ref:`Return to documentation for file ` (``Source\Azura\RenderSystem\Inc\Vulkan\VkCore.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include #include "Containers/Vector.h" #include "Generic/Renderer.h" #include "Types.h" #include "VkTypes.h" #include "Log/Log.h" namespace Azura { namespace Vulkan { class VkScopedSwapChain; class VkScopedBuffer; } } namespace Azura { namespace Vulkan { namespace VkCore { #ifdef BUILD_DEBUG VkDebugReportCallbackEXT SetupDebug(::VkInstance_T* instance, const Log& log_VulkanRenderSystem); void DestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator); VkResult CreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback); #endif VkInstance CreateInstance(const ApplicationInfo& applicationData, const Containers::Vector& vkExtensions, const Log& log_VulkanRenderSystem); SwapChainDeviceSupport QuerySwapChainSupport(VkPhysicalDevice device, VkSurfaceKHR surface, Memory::Allocator& allocator); VkPhysicalDevice SelectPhysicalDevice(VkInstance instance, VkSurfaceKHR surface, const DeviceRequirements& requirements, const Log& log_VulkanRenderSystem); VkDevice CreateLogicalDevice(VkPhysicalDevice physicalDevice, const VkQueueIndices& queueIndices, const DeviceRequirements& requirements, const Log& log_VulkanRenderSystem); VkQueueIndices FindQueueFamiliesInDevice(VkPhysicalDevice device, VkSurfaceKHR surface, const DeviceRequirements& requirements, const Log& log_VulkanRenderSystem); VkQueue GetQueueFromDevice(VkDevice device, int queueIndex); VkImage CreateImage(VkDevice device, RawStorageFormat format, ImageType imageType, const Bounds2D& bounds, U32 depth, U32 layers, U32 mips, VkImageTiling tiling, VkImageUsageFlags imageUsage, const Log& log_VulkanRenderSystem); VkImageView CreateImageView(VkDevice device, VkImage sourceImage, VkImageViewType viewType, VkFormat viewFormat, VkImageAspectFlags aspectMask, const Log& log_VulkanRenderSystem, U32 baseMip = 0, U32 levelCount = 1, U32 baseArrayLayer = 0, U32 layerCount = 1); VkRenderPass CreateRenderPass(VkDevice device, const VkScopedSwapChain& swapChain, const Log& log_VulkanRenderSystem); void CreateUniformBufferBinding(Containers::Vector& bindings, U32 binding, U32 count, VkShaderStageFlags stageFlag); void CreateSamplerBinding(Containers::Vector& bindings, U32 binding, U32 count, VkShaderStageFlags stageFlag); void CreateSampledImageBinding(Containers::Vector& bindings, U32 binding, U32 count, VkShaderStageFlags stageFlag); void CreateCombinedImageSamplerBinding(Containers::Vector& bindings, U32 binding, U32 count, VkShaderStageFlags stageFlag); VkDescriptorSetLayout CreateDescriptorSetLayout(VkDevice device, const Containers::Vector& bindings, const Log& log_VulkanRenderSystem); VkPipelineLayout CreatePipelineLayout(VkDevice device, const Containers::Vector& descriptorSets, const Log& log_VulkanRenderSystem); VkShaderModule CreateShaderModule(VkDevice device, const Containers::Vector& code, const Log& log_VulkanRenderSystem); Containers::Vector CreateFrameBuffers(VkDevice device, VkRenderPass renderPass, const VkScopedSwapChain& scopedSwapChain, Memory::Allocator& allocator, const Log& log_VulkanRenderSystem); void CreateFrameBuffers(VkDevice device, VkRenderPass renderPass, const VkScopedSwapChain& scopedSwapChain, Containers::Vector& frameBuffers, const Log& log_VulkanRenderSystem); VkCommandPool CreateCommandPool(VkDevice device, int queueIndex, VkCommandPoolCreateFlags flags, const Log& log_VulkanRenderSystem); U32 FindMemoryType(U32 typeFilter, VkMemoryPropertyFlags properties, const VkPhysicalDeviceMemoryProperties& physicalDeviceMemoryProperties); VkDescriptorPoolSize CreateDescriptorPoolSize(VkDescriptorType type, U32 descriptorCount); VkDescriptorPool CreateDescriptorPool(VkDevice device, const Containers::Vector& pools, U32 maxSets, const Log& log_VulkanRenderSystem); VkDescriptorSet CreateDescriptorSet(VkDevice device, VkDescriptorPool descriptorPool, const Containers::Vector& descriptorSets, const Log& log_VulkanRenderSystem); VkWriteDescriptorSet CreateWriteDescriptorForUniformBuffer( VkDescriptorSet set, U32 layoutIndex, U32 binding, const Containers::Vector& bufferInfos); void UpdateDescriptorSets(VkDevice device, const Containers::Vector& descriptorWrites); VkCommandBuffer CreateCommandBuffer(VkDevice device, VkCommandPool commandPool, VkCommandBufferLevel level, const Log& log_VulkanRenderSystem); Containers::Vector CreateCommandBuffers( VkDevice device, U32 count, VkCommandPool commandPool, VkCommandBufferLevel level, Memory::Allocator& allocator, const Log& log_VulkanRenderSystem); void CreateCommandBuffers(VkDevice device, VkCommandPool commandPool, VkCommandBufferLevel level, Containers::Vector& commandBuffers, const Log& log_VulkanRenderSystem); void BeginCommandBuffer(VkCommandBuffer buffer, VkCommandBufferUsageFlags flags, const Log& log_VulkanRenderSystem); void BeginCommandBuffer(VkCommandBuffer buffer, VkCommandBufferUsageFlags flags, const VkCommandBufferInheritanceInfo& inheritanceInfo, const Log& log_VulkanRenderSystem); void EndCommandBuffer(VkCommandBuffer buffer, const Log& log_VulkanRenderSystem); VkSemaphore CreateSemaphore(VkDevice device, const Log& log_VulkanRenderSystem); void CreateSemaphores(VkDevice device, U32 count, Containers::Vector& semaphores, const Log& log_VulkanRenderSystem); Containers::Vector CreateSemaphores(VkDevice device, U32 count, Memory::Allocator& allocator, const Log& log_VulkanRenderSystem); VkFence CreateFence(VkDevice device, VkFenceCreateFlags flags, const Log& log_VulkanRenderSystem); void CreateFences(VkDevice device, U32 count, VkFenceCreateFlags flags, Containers::Vector& fences, const Log& log_VulkanRenderSystem); Containers::Vector CreateFences(VkDevice device, U32 count, VkFenceCreateFlags flags, Memory::Allocator& allocator, const Log& log_VulkanRenderSystem); void CopyBuffer(VkDevice device, VkQueue queue, const VkScopedBuffer& srcBuffer, const VkScopedBuffer& dstBuffer, const VkDeviceSize size, const VkCommandPool commandPool); void TransitionImageLayout(VkCommandBuffer cmdBuffer, VkImage image, VkAccessFlags srcAccessMask, VkAccessFlags dstAccessMask, VkImageLayout oldImageLayout, VkImageLayout newImageLayout, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkImageSubresourceRange imageSubresourceRange); void ImageBlit(VkCommandBuffer cmdBuffer, VkImage srcImage, VkImage dstImage, VkImageAspectFlagBits srcAspect, VkImageAspectFlagBits dstAspect, const Bounds3D& blitRegion, const LayerSubresource& srcLayerResource, const LayerSubresource& dstLayerResource, U32 srcMipLevel, U32 dstMipLevel, VkFilter blitFilter); void ImageBlit(VkCommandBuffer cmdBuffer, VkImage srcImage, VkImage dstImage, VkImageAspectFlagBits srcAspect, VkImageAspectFlagBits dstAspect, const Bounds3D& blitRegion); void ImageCopy(VkCommandBuffer cmdBuffer, VkImage srcImage, VkImage dstImage, const Containers::Vector& copyRegions); VkImageCopy GetImageCopyRegion(VkImageAspectFlagBits srcAspect, VkImageAspectFlagBits dstAspect, const Bounds3D& copyRegion, const TextureSubresource& srcSubresource, const TextureSubresource& dstSubresource); void ImageCopy(VkCommandBuffer cmdBuffer, VkImage srcImage, VkImage dstImage, VkImageAspectFlagBits srcAspect, VkImageAspectFlagBits dstAspect, const Bounds3D& copyRegion, const TextureSubresource& srcSubresource, const TextureSubresource& dstSubresource); void ImageCopy(VkCommandBuffer cmdBuffer, VkImage srcImage, VkImage dstImage, VkImageAspectFlagBits srcAspect, VkImageAspectFlagBits dstAspect, const Bounds3D& copyRegion); void FlushCommandBuffer(VkDevice device, VkCommandBuffer cmdBuffer, VkQueue queue, const Log& log_VulkanRenderSystem); bool QueryFormatFeatureSupport(VkPhysicalDevice physicalDevice, VkFormat format, std::function queryFunction); VkFormat GetVkFormat(RawStorageFormat rawFormat, const Log & log_VulkanRenderSystem); } // namespace VkCore } // namespace Vulkan } // namespace Azura