Vyroda
Game engine made by hand, with modern C++ and Vulkan.
Loading...
Searching...
No Matches
Vyroda::VulkanAPI Class Referenceexport

Public Member Functions

 VulkanAPI (GLFWwindow *window)
 ~VulkanAPI ()
VkRenderPass * createRenderPass (VkSampleCountFlagBits const &msaaSamples)
VkShaderModule createShaderModule (std::vector< char > const &code)
VkDescriptorPool createDescriptorPool (std::vector< VkDescriptorPoolSize > const &pool_sizes, std::uint32_t const max_sets=100, VkDescriptorPoolCreateFlags const flags=VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT)
VkDescriptorSetLayout createDescriptorSetLayout (std::vector< VkDescriptorSetLayoutBinding > const &pBindings)
VkDescriptorSet createDescriptorSets (VulkanPipeline &pipeline, std::uint32_t const count=100) __attribute__((no_thread_safety_analysis))
void updateDescriptorSets (std::vector< Buffer > &uniform_buffers, VkDescriptorSet descset, std::vector< VkDescriptorImageInfo > &image_info, VkDescriptorType const type=VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER)
void updateDescriptorSets (std::vector< Buffer > &uniformBuffers, std::vector< Buffer > &storageBuffers, VkDescriptorSet descriptorSet, std::vector< VkDescriptorImageInfo > &imageInfo, std::vector< VkDescriptorImageInfo > &depth_map_image_info, std::vector< VkDescriptorImageInfo > &cube_map_image_info, Buffer &light_storage_buffer, std::vector< VkDescriptorImageInfo > &csm_image_info)
void updateDescriptorSet (Buffer &uniform_buffer, VkDescriptorSet descset, std::vector< VkDescriptorImageInfo > &image_info, VkDescriptorType const type=VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER)
void updateDescriptorSet (Buffer &uniform_buffer, Buffer &storage_buffer, VkDescriptorSet descset, std::vector< VkDescriptorImageInfo > &image_info)
void updateStorageDescriptorSets (std::vector< Buffer > &uniform_buffers, VkDescriptorSet desc_set, VkDescriptorType const type=VK_DESCRIPTOR_TYPE_STORAGE_BUFFER)
VkPipelineLayout createPipelineLayout (std::vector< VkDescriptorSetLayout > const &descset_layouts, std::vector< VkPushConstantRange > const &push_const)
VkPipeline createGraphicsPipeline (PipeLineCreateInfo const &pipeline_create_info)
VkSwapchainKHR createSwapChain (std::vector< VkImage > &swapchain_images, VkSwapchainKHR const &old_swapchain=VK_NULL_HANDLE)
std::vector< VkFramebuffer > createFramebuffers (VkRenderPass &rdr_pass, std::vector< VkImageView > &swapchain_image_views, std::vector< VkImageView > &depth_imageview, std::vector< VkImageView > &color_image_view)
VkCommandPool createCommandPool (bool transfer_queue=false)
std::vector< VkCommandBuffer > allocateCommandBuffers (VkCommandPool &cmd_pool, std::size_t const size, bool const is_secondary)
VkBuffer createBuffer (VkDeviceSize const size, VkBufferUsageFlags const usage)
VkBuffer createBuffer (VkDeviceSize const size, VkBufferUsageFlags const usage, VkMemoryPropertyFlags const properties, VkDeviceMemory &device_memory)
Buffer createVertexBuffer (std::vector< Vertex > const &vertices, std::size_t const image_index)
void startUpdateVertexBuffer (std::size_t const image_index)
void updateVertexBuffer (std::vector< Vertex > const &new_vertices, VkBuffer buffer_to_update, std::size_t const image_index)
void submitVertexUpdate (VkSemaphore &semaphore, std::size_t const image_index) __attribute__((no_thread_safety_analysis))
Buffer createIndexBuffer (std::vector< std::uint32_t > const &indices, std::size_t const image_index)
VkImageMemoryBarrier setupImageMemoryBarrier (VkImage image, VkAccessFlags const src_access_mask, VkAccessFlags const dst_access_mask, VkImageLayout const old_layout, VkImageLayout const new_layout, std::uint32_t const mip_lvl=VK_REMAINING_MIP_LEVELS, VkImageAspectFlags const aspect_mask=VK_IMAGE_ASPECT_COLOR_BIT)
void addCopyBufferRequest (VkBuffer src_buffer, VkBuffer dst_buffer, VkDeviceSize size, std::size_t const image_index, VkDeviceSize src_offset=0, VkDeviceSize dst_offset=0) __attribute__((no_thread_safety_analysis))
bool souldResizeSwapChain ()
Buffer createUniformBuffers (std::uint64_t const uniform_buffers_count, std::size_t const image_index)
void updateUniformBuffer (Buffer &buffer, std::vector< UniformBufferObject > *uniform_buffer_objects, std::size_t const image_index)
VkImage createImage (std::uint32_t const width, std::uint32_t const height, std::uint32_t const mip_lvl, VkSampleCountFlagBits const num_samples, VkFormat const format, VkImageTiling const tiling, VkImageUsageFlags const usage, VkMemoryPropertyFlags const properties)
VkImageView createImageView (VkImage image, VkFormat const format, std::uint32_t const mip_lvl, std::uint32_t scale, VkImageAspectFlags const aspect_flags=VK_IMAGE_ASPECT_COLOR_BIT)
void copyBufferToImage (VkCommandBuffer cmd_buffer, VkBuffer buffer, VkImage image, std::uint32_t const width, std::uint32_t const height, std::uint32_t const mipLevels=0)
VkSampler createTextureSampler (std::uint32_t const mip_lvl)
VkImageView createDepthResources (VkCommandBuffer cmd_buffer)
VkFormat findSupportedFormat (std::vector< VkFormat >const &candidates, VkImageTiling const tiling, VkFormatFeatureFlags const features)
VkFormat findDepthFormat ()
bool hasStencilComponent (VkFormat const format)
VkDeviceSize getMaxMemoryHeap ()
void initMemoryPool ()
template<IsObjectBufferOrLightBuffer T>
Buffer createStorageBuffers (T const &storage_buffer, std::size_t const image_index)
Buffer createIndirectCommandsBuffer (std::vector< VkDrawIndexedIndirectCommand > const &drawCommands)
template<IsObjectBufferOrLightBuffer T>
void updateStorageBuffer (Buffer &buffer, T &object_buffer, std::size_t const image_index)
void resetCommandPool (VkCommandPool &commandPool)
void beginCommandBuffer (VkCommandBuffer cmd_buffer, VkCommandBufferUsageFlagBits const flags=VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, VkCommandBufferInheritanceInfo const inheritance_info={})
void endCommandBuffer (VkCommandBuffer cmd_buffer)
void beginRenderPass (VkRenderPass &rdr_pass, VkCommandBuffer cmd_buffer, VkFramebuffer &frame_buffer)
void endRenderPass (VkCommandBuffer cmd_buffer)
void beginRendering (VkCommandBuffer cmd_buffer, VkImageView color_imageview, VkImageView depth_imageview, VkAttachmentLoadOp const load_op, VkAttachmentStoreOp const store_op, VkImageLayout const color_image_layout, bool const has_depth_attachment)
void endRendering (VkCommandBuffer cmd_buffer)
void setViewPort (VkCommandBuffer cmd_buffer)
void setScissor (VkCommandBuffer cmd_buffer)
void bindPipeline (VkCommandBuffer cmd_buffer, VkPipeline pipeline)
void draw (VkCommandBuffer cmd_buffer, Data const *data, bool const is_indexed=true, std::uint32_t const index=0, std::uint32_t const instance_coun=1)
VkResult queueSubmit (VkCommandBuffer cmd_buffer, std::size_t const queue_index=0, std::size_t const image_index=0) __attribute__((no_thread_safety_analysis))
void submit (VkQueue queue, std::vector< VkSubmitInfo > const &submit_infos, VkPresentInfoKHR const &present_info, VkFence &fence) __attribute__((no_thread_safety_analysis))
void addPipelineBarriers (VkCommandBuffer cmd_buffer, std::vector< VkImageMemoryBarrier > &rdr_barriers, VkPipelineStageFlags const src_stage_mask, VkPipelineStageFlags const dst_stage_mask, VkDependencyFlags const depency_flags)
void generateMipmaps (VkCommandBuffer cmd_buffer, VkFormat const image_format, VkImage image, std::uint32_t const tex_width, std::uint32_t const tex_height, std::uint32_t const mip_lvl, std::uint32_t const layer_count=1)
void destroy ()
std::span< const char *const > getValidationLayers () const
std::span< VkExtensionProperties const > getExtensions () const
std::span< VkLayerProperties const > getLayersAvailable () const
bool isInstanceCreated () const
bool isValidationLayersEnabled () const
std::uint32_t getExtensionCount () const
std::uint32_t getQueueFamily () const
VkInstance getInstance () const
VkPhysicalDevice getPhysicalDevice () const
VkDevice getDevice () const
std::span< VkQueue const > getGraphicsQueues () const
VkQueue getCurrentGraphicsQueues () const
VkPhysicalDeviceProperties getDeviceProperties () const
VkPhysicalDeviceFeatures getDeviceFeatures () const
bool isFramebufferResized ()
VkExtent2D getSwapChainExtent () const
VkSurfaceKHR getSurface () const
VkSurfaceFormatKHR getSurfaceFormat () const
void resetCurrentFrameIndex ()
std::uint32_t getCurrentFrame () const
VkFormat getSwapChainImageFormat () const
VkSampleCountFlagBits getMsaaSamples () const
void initDetails ()
VkSampleCountFlagBits getMaxUsableSampleCount ()
const SwapChainSupportDetails querySwapChainSupport (VkPhysicalDevice device) const
std::uint32_t getImageCount () const
std::string getAPIVersion ()
DeviceMemoryPoolgetDeviceMemoryPool ()
void startMarker (VkCommandBuffer buffer, std::string const &name, float const r, float const g, float const b, float const a=1.0f)
void endMarker (VkCommandBuffer buffer)
std::uint32_t getQueueCount ()
std::span< VkQueue > getPresentQueue ()
void waitIdle ()
VkImage createDepthMapImage (std::uint32_t const shadow_resolution, bool const is_cube_map=false, std::size_t const array_size=0)
VkImageView createDepthMapImageView (VkImage image, bool const is_cube_map=false, bool const is_sampling=true, std::size_t const array_size=0)
VkSampler createDepthMapSampler ()
void createDepthMapFrameBuffer (VkRenderPass &rdr_pass, VkImageView imageview, VkFramebuffer &frame_buffer, std::uint32_t shadow_resolution)
ImageMemoryBarrier transitionImageLayout (VkImage image, VkImageLayout const old_layout, VkImageLayout const new_layout, VkImageAspectFlags const aspect_flags, std::uint32_t layer_count=1)
VkImage createKTXImage (VkCommandBuffer cmd_buffer, ktxTexture2 *ktx_texture, VkCommandPool &cmd_pool) __attribute__((no_thread_safety_analysis))
VkImageView createKTXImageView (ktxTexture2 *ktx_texture, VkImage image, VkImageAspectFlags aspect_flags)
VkImage createFontImage (VkCommandBuffer cmd_buffer, std::vector< FontCharacter > const &characters, std::uint32_t const width, std::uint32_t const height, std::size_t const image_index)
VkImageView createFontImageView (VkImage image, VkImageAspectFlags aspect_flags)
VkSamplerAddressMode getSamplerAddressMode (TextureWrapMode mode)
VkSampler createKTXSampler (TextureWrapMode const wrap_mode_u, TextureWrapMode const wrap_mode_v, std::uint32_t const mip_lvl, bool const compare_enable=VK_FALSE)
void addToGarbage (VkFence fence, VkCommandBuffer cmd_buffer, VkCommandPool cmd_pool, VkBuffer buffer, VkDeviceMemory mem)
void collectGarbage ()
void commitCopyBuffer (std::size_t const image_index) __attribute__((no_thread_safety_analysis))
void startCopyBuffer (std::size_t const image_index)
void endCopyBuffer (std::size_t const image_index) __attribute__((no_thread_safety_analysis))
void copyBuffer (VkBuffer src_buffer, VkBuffer dst_buffer, VkDeviceSize const size, VkDeviceSize src_offset, VkDeviceSize dst_offset, std::size_t const image_index)
VkBuffer getStagingBuffer (std::size_t const image_index)
VkDeviceMemory getStagingMemory (std::size_t const image_index)
void * getStagingMemoryPtr (std::size_t const image_index)
std::size_t getCurrentStagingMemoryOffset (std::size_t const image_index)
void updateCurrentStagingMemoryOffset (std::size_t offset, std::size_t const image_index)
void updateQueueIndex ()

Static Public Member Functions

static const std::string getVendor (int vendorID)

Public Attributes

VkColorSpaceKHR PLP_VK_COLOR_SPACE { VK_COLOR_SPACE_HDR10_ST2084_EXT }
VkFormat PLP_VK_FORMAT_SURFACE { VK_FORMAT_A2B10G10R10_UNORM_PACK32 }
VkFormat PLP_VK_FORMAT_COLOR { VK_FORMAT_A2B10G10R10_UNORM_PACK32 }
VkFormat PLP_VK_FORMAT_DEPTH { VK_FORMAT_D32_SFLOAT }
VkFormat PLP_VK_FORMAT_DEPTH_STENCIL { VK_FORMAT_D32_SFLOAT_S8_UINT }
VkFormat PLP_VK_FORMAT_FONT { VK_FORMAT_R8_UNORM }

Constructor & Destructor Documentation

◆ VulkanAPI()

Vyroda::VulkanAPI::VulkanAPI ( GLFWwindow * window)
Here is the call graph for this function:

◆ ~VulkanAPI()

Vyroda::VulkanAPI::~VulkanAPI ( )

Member Function Documentation

◆ addCopyBufferRequest()

void Vyroda::VulkanAPI::addCopyBufferRequest ( VkBuffer src_buffer,
VkBuffer dst_buffer,
VkDeviceSize size,
std::size_t const image_index,
VkDeviceSize src_offset = 0,
VkDeviceSize dst_offset = 0 )
Here is the caller graph for this function:

◆ addPipelineBarriers()

void Vyroda::VulkanAPI::addPipelineBarriers ( VkCommandBuffer cmd_buffer,
std::vector< VkImageMemoryBarrier > & rdr_barriers,
VkPipelineStageFlags const src_stage_mask,
VkPipelineStageFlags const dst_stage_mask,
VkDependencyFlags const depency_flags )
Here is the caller graph for this function:

◆ addToGarbage()

void Vyroda::VulkanAPI::addToGarbage ( VkFence fence,
VkCommandBuffer cmd_buffer,
VkCommandPool cmd_pool,
VkBuffer buffer,
VkDeviceMemory mem )
Here is the caller graph for this function:

◆ allocateCommandBuffers()

std::vector< VkCommandBuffer > Vyroda::VulkanAPI::allocateCommandBuffers ( VkCommandPool & cmd_pool,
std::size_t const size,
bool const is_secondary )
Here is the caller graph for this function:

◆ beginCommandBuffer()

void Vyroda::VulkanAPI::beginCommandBuffer ( VkCommandBuffer cmd_buffer,
VkCommandBufferUsageFlagBits const flags = VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT,
VkCommandBufferInheritanceInfo const inheritance_info = {} )
Here is the caller graph for this function:

◆ beginRendering()

void Vyroda::VulkanAPI::beginRendering ( VkCommandBuffer cmd_buffer,
VkImageView color_imageview,
VkImageView depth_imageview,
VkAttachmentLoadOp const load_op,
VkAttachmentStoreOp const store_op,
VkImageLayout const color_image_layout,
bool const has_depth_attachment )

◆ beginRenderPass()

void Vyroda::VulkanAPI::beginRenderPass ( VkRenderPass & rdr_pass,
VkCommandBuffer cmd_buffer,
VkFramebuffer & frame_buffer )

◆ bindPipeline()

void Vyroda::VulkanAPI::bindPipeline ( VkCommandBuffer cmd_buffer,
VkPipeline pipeline )

◆ collectGarbage()

void Vyroda::VulkanAPI::collectGarbage ( )

◆ commitCopyBuffer()

void Vyroda::VulkanAPI::commitCopyBuffer ( std::size_t const image_index)
Here is the call graph for this function:

◆ copyBuffer()

void Vyroda::VulkanAPI::copyBuffer ( VkBuffer src_buffer,
VkBuffer dst_buffer,
VkDeviceSize const size,
VkDeviceSize src_offset,
VkDeviceSize dst_offset,
std::size_t const image_index )
Here is the call graph for this function:

◆ copyBufferToImage()

void Vyroda::VulkanAPI::copyBufferToImage ( VkCommandBuffer cmd_buffer,
VkBuffer buffer,
VkImage image,
std::uint32_t const width,
std::uint32_t const height,
std::uint32_t const mipLevels = 0 )

◆ createBuffer() [1/2]

VkBuffer Vyroda::VulkanAPI::createBuffer ( VkDeviceSize const size,
VkBufferUsageFlags const usage )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createBuffer() [2/2]

VkBuffer Vyroda::VulkanAPI::createBuffer ( VkDeviceSize const size,
VkBufferUsageFlags const usage,
VkMemoryPropertyFlags const properties,
VkDeviceMemory & device_memory )
Here is the call graph for this function:

◆ createCommandPool()

VkCommandPool Vyroda::VulkanAPI::createCommandPool ( bool transfer_queue = false)
Here is the caller graph for this function:

◆ createDepthMapFrameBuffer()

void Vyroda::VulkanAPI::createDepthMapFrameBuffer ( VkRenderPass & rdr_pass,
VkImageView imageview,
VkFramebuffer & frame_buffer,
std::uint32_t shadow_resolution )

◆ createDepthMapImage()

VkImage Vyroda::VulkanAPI::createDepthMapImage ( std::uint32_t const shadow_resolution,
bool const is_cube_map = false,
std::size_t const array_size = 0 )
Here is the call graph for this function:

◆ createDepthMapImageView()

VkImageView Vyroda::VulkanAPI::createDepthMapImageView ( VkImage image,
bool const is_cube_map = false,
bool const is_sampling = true,
std::size_t const array_size = 0 )

◆ createDepthMapSampler()

VkSampler Vyroda::VulkanAPI::createDepthMapSampler ( )

◆ createDepthResources()

VkImageView Vyroda::VulkanAPI::createDepthResources ( VkCommandBuffer cmd_buffer)
Here is the call graph for this function:

◆ createDescriptorPool()

VkDescriptorPool Vyroda::VulkanAPI::createDescriptorPool ( std::vector< VkDescriptorPoolSize > const & pool_sizes,
std::uint32_t const max_sets = 100,
VkDescriptorPoolCreateFlags const flags = VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT )
Here is the call graph for this function:

◆ createDescriptorSetLayout()

VkDescriptorSetLayout Vyroda::VulkanAPI::createDescriptorSetLayout ( std::vector< VkDescriptorSetLayoutBinding > const & pBindings)

◆ createDescriptorSets()

VkDescriptorSet Vyroda::VulkanAPI::createDescriptorSets ( VulkanPipeline & pipeline,
std::uint32_t const count = 100 )
Here is the call graph for this function:

◆ createFontImage()

VkImage Vyroda::VulkanAPI::createFontImage ( VkCommandBuffer cmd_buffer,
std::vector< FontCharacter > const & characters,
std::uint32_t const width,
std::uint32_t const height,
std::size_t const image_index )
Here is the call graph for this function:

◆ createFontImageView()

VkImageView Vyroda::VulkanAPI::createFontImageView ( VkImage image,
VkImageAspectFlags aspect_flags )

◆ createFramebuffers()

std::vector< VkFramebuffer > Vyroda::VulkanAPI::createFramebuffers ( VkRenderPass & rdr_pass,
std::vector< VkImageView > & swapchain_image_views,
std::vector< VkImageView > & depth_imageview,
std::vector< VkImageView > & color_image_view )

◆ createGraphicsPipeline()

VkPipeline Vyroda::VulkanAPI::createGraphicsPipeline ( PipeLineCreateInfo const & pipeline_create_info)
Here is the call graph for this function:

◆ createImage()

VkImage Vyroda::VulkanAPI::createImage ( std::uint32_t const width,
std::uint32_t const height,
std::uint32_t const mip_lvl,
VkSampleCountFlagBits const num_samples,
VkFormat const format,
VkImageTiling const tiling,
VkImageUsageFlags const usage,
VkMemoryPropertyFlags const properties )
Here is the caller graph for this function:

◆ createImageView()

VkImageView Vyroda::VulkanAPI::createImageView ( VkImage image,
VkFormat const format,
std::uint32_t const mip_lvl,
std::uint32_t scale,
VkImageAspectFlags const aspect_flags = VK_IMAGE_ASPECT_COLOR_BIT )
Here is the caller graph for this function:

◆ createIndexBuffer()

Buffer Vyroda::VulkanAPI::createIndexBuffer ( std::vector< std::uint32_t > const & indices,
std::size_t const image_index )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createIndirectCommandsBuffer()

Buffer Vyroda::VulkanAPI::createIndirectCommandsBuffer ( std::vector< VkDrawIndexedIndirectCommand > const & drawCommands)
Here is the call graph for this function:

◆ createKTXImage()

VkImage Vyroda::VulkanAPI::createKTXImage ( VkCommandBuffer cmd_buffer,
ktxTexture2 * ktx_texture,
VkCommandPool & cmd_pool )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createKTXImageView()

VkImageView Vyroda::VulkanAPI::createKTXImageView ( ktxTexture2 * ktx_texture,
VkImage image,
VkImageAspectFlags aspect_flags )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createKTXSampler()

VkSampler Vyroda::VulkanAPI::createKTXSampler ( TextureWrapMode const wrap_mode_u,
TextureWrapMode const wrap_mode_v,
std::uint32_t const mip_lvl,
bool const compare_enable = VK_FALSE )
Here is the call graph for this function:

◆ createPipelineLayout()

VkPipelineLayout Vyroda::VulkanAPI::createPipelineLayout ( std::vector< VkDescriptorSetLayout > const & descset_layouts,
std::vector< VkPushConstantRange > const & push_const )

◆ createRenderPass()

VkRenderPass * Vyroda::VulkanAPI::createRenderPass ( VkSampleCountFlagBits const & msaaSamples)

Vulkan init functions, before main loop.

Here is the call graph for this function:

◆ createShaderModule()

VkShaderModule Vyroda::VulkanAPI::createShaderModule ( std::vector< char > const & code)

◆ createStorageBuffers()

template<IsObjectBufferOrLightBuffer T>
template Buffer Vyroda::VulkanAPI::createStorageBuffers< ObjectBuffer > ( T const & storage_buffer,
std::size_t const image_index )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createSwapChain()

VkSwapchainKHR Vyroda::VulkanAPI::createSwapChain ( std::vector< VkImage > & swapchain_images,
VkSwapchainKHR const & old_swapchain = VK_NULL_HANDLE )
Here is the call graph for this function:

◆ createTextureSampler()

VkSampler Vyroda::VulkanAPI::createTextureSampler ( std::uint32_t const mip_lvl)

◆ createUniformBuffers()

Buffer Vyroda::VulkanAPI::createUniformBuffers ( std::uint64_t const uniform_buffers_count,
std::size_t const image_index )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createVertexBuffer()

Buffer Vyroda::VulkanAPI::createVertexBuffer ( std::vector< Vertex > const & vertices,
std::size_t const image_index )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ destroy()

void Vyroda::VulkanAPI::destroy ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw()

void Vyroda::VulkanAPI::draw ( VkCommandBuffer cmd_buffer,
Data const * data,
bool const is_indexed = true,
std::uint32_t const index = 0,
std::uint32_t const instance_coun = 1 )

◆ endCommandBuffer()

void Vyroda::VulkanAPI::endCommandBuffer ( VkCommandBuffer cmd_buffer)
Here is the caller graph for this function:

◆ endCopyBuffer()

void Vyroda::VulkanAPI::endCopyBuffer ( std::size_t const image_index)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ endMarker()

void Vyroda::VulkanAPI::endMarker ( VkCommandBuffer buffer)

◆ endRendering()

void Vyroda::VulkanAPI::endRendering ( VkCommandBuffer cmd_buffer)

◆ endRenderPass()

void Vyroda::VulkanAPI::endRenderPass ( VkCommandBuffer cmd_buffer)

◆ findDepthFormat()

VkFormat Vyroda::VulkanAPI::findDepthFormat ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ findSupportedFormat()

VkFormat Vyroda::VulkanAPI::findSupportedFormat ( std::vector< VkFormat >const & candidates,
VkImageTiling const tiling,
VkFormatFeatureFlags const features )
Here is the caller graph for this function:

◆ generateMipmaps()

void Vyroda::VulkanAPI::generateMipmaps ( VkCommandBuffer cmd_buffer,
VkFormat const image_format,
VkImage image,
std::uint32_t const tex_width,
std::uint32_t const tex_height,
std::uint32_t const mip_lvl,
std::uint32_t const layer_count = 1 )

◆ getAPIVersion()

std::string Vyroda::VulkanAPI::getAPIVersion ( )
Here is the call graph for this function:

◆ getCurrentFrame()

std::uint32_t Vyroda::VulkanAPI::getCurrentFrame ( ) const
inline

◆ getCurrentGraphicsQueues()

VkQueue Vyroda::VulkanAPI::getCurrentGraphicsQueues ( ) const
inline

◆ getCurrentStagingMemoryOffset()

std::size_t Vyroda::VulkanAPI::getCurrentStagingMemoryOffset ( std::size_t const image_index)
inline
Here is the caller graph for this function:

◆ getDevice()

VkDevice Vyroda::VulkanAPI::getDevice ( ) const
inline
Here is the caller graph for this function:

◆ getDeviceFeatures()

VkPhysicalDeviceFeatures Vyroda::VulkanAPI::getDeviceFeatures ( ) const
inline

◆ getDeviceMemoryPool()

DeviceMemoryPool * Vyroda::VulkanAPI::getDeviceMemoryPool ( )
inline
Here is the call graph for this function:

◆ getDeviceProperties()

VkPhysicalDeviceProperties Vyroda::VulkanAPI::getDeviceProperties ( ) const
inline

◆ getExtensionCount()

std::uint32_t Vyroda::VulkanAPI::getExtensionCount ( ) const
inline

◆ getExtensions()

std::span< VkExtensionProperties const > Vyroda::VulkanAPI::getExtensions ( ) const
inline

◆ getGraphicsQueues()

std::span< VkQueue const > Vyroda::VulkanAPI::getGraphicsQueues ( ) const
inline

◆ getImageCount()

uint32_t Vyroda::VulkanAPI::getImageCount ( ) const
Here is the caller graph for this function:

◆ getInstance()

VkInstance Vyroda::VulkanAPI::getInstance ( ) const
inline

◆ getLayersAvailable()

std::span< VkLayerProperties const > Vyroda::VulkanAPI::getLayersAvailable ( ) const
inline

◆ getMaxMemoryHeap()

VkDeviceSize Vyroda::VulkanAPI::getMaxMemoryHeap ( )
inline

◆ getMaxUsableSampleCount()

VkSampleCountFlagBits Vyroda::VulkanAPI::getMaxUsableSampleCount ( )

◆ getMsaaSamples()

VkSampleCountFlagBits Vyroda::VulkanAPI::getMsaaSamples ( ) const
inline

◆ getPhysicalDevice()

VkPhysicalDevice Vyroda::VulkanAPI::getPhysicalDevice ( ) const
inline

◆ getPresentQueue()

std::span< VkQueue > Vyroda::VulkanAPI::getPresentQueue ( )
inline

◆ getQueueCount()

std::uint32_t Vyroda::VulkanAPI::getQueueCount ( )
inline

◆ getQueueFamily()

std::uint32_t Vyroda::VulkanAPI::getQueueFamily ( ) const
inline

◆ getSamplerAddressMode()

VkSamplerAddressMode Vyroda::VulkanAPI::getSamplerAddressMode ( TextureWrapMode mode)
Here is the caller graph for this function:

◆ getStagingBuffer()

VkBuffer Vyroda::VulkanAPI::getStagingBuffer ( std::size_t const image_index)
inline
Here is the caller graph for this function:

◆ getStagingMemory()

VkDeviceMemory Vyroda::VulkanAPI::getStagingMemory ( std::size_t const image_index)
inline

◆ getStagingMemoryPtr()

void * Vyroda::VulkanAPI::getStagingMemoryPtr ( std::size_t const image_index)
inline
Here is the caller graph for this function:

◆ getSurface()

VkSurfaceKHR Vyroda::VulkanAPI::getSurface ( ) const
inline

◆ getSurfaceFormat()

VkSurfaceFormatKHR Vyroda::VulkanAPI::getSurfaceFormat ( ) const
inline

◆ getSwapChainExtent()

VkExtent2D Vyroda::VulkanAPI::getSwapChainExtent ( ) const
inline
Here is the caller graph for this function:

◆ getSwapChainImageFormat()

VkFormat Vyroda::VulkanAPI::getSwapChainImageFormat ( ) const
inline
Here is the caller graph for this function:

◆ getValidationLayers()

std::span< const char *const > Vyroda::VulkanAPI::getValidationLayers ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVendor()

const std::string Vyroda::VulkanAPI::getVendor ( int vendorID)
inlinestatic

◆ hasStencilComponent()

bool Vyroda::VulkanAPI::hasStencilComponent ( VkFormat const format)
Here is the caller graph for this function:

◆ initDetails()

void Vyroda::VulkanAPI::initDetails ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initMemoryPool()

void Vyroda::VulkanAPI::initMemoryPool ( )
Here is the caller graph for this function:

◆ isFramebufferResized()

bool Vyroda::VulkanAPI::isFramebufferResized ( )
inline

◆ isInstanceCreated()

bool Vyroda::VulkanAPI::isInstanceCreated ( ) const
inline

◆ isValidationLayersEnabled()

bool Vyroda::VulkanAPI::isValidationLayersEnabled ( ) const
inline

◆ querySwapChainSupport()

const SwapChainSupportDetails Vyroda::VulkanAPI::querySwapChainSupport ( VkPhysicalDevice device) const
Here is the caller graph for this function:

◆ queueSubmit()

VkResult Vyroda::VulkanAPI::queueSubmit ( VkCommandBuffer cmd_buffer,
std::size_t const queue_index = 0,
std::size_t const image_index = 0 )
Here is the caller graph for this function:

◆ resetCommandPool()

void Vyroda::VulkanAPI::resetCommandPool ( VkCommandPool & commandPool)

Vulkan drawing functions, in main loop

◆ resetCurrentFrameIndex()

void Vyroda::VulkanAPI::resetCurrentFrameIndex ( )
inline

◆ setScissor()

void Vyroda::VulkanAPI::setScissor ( VkCommandBuffer cmd_buffer)

◆ setupImageMemoryBarrier()

VkImageMemoryBarrier Vyroda::VulkanAPI::setupImageMemoryBarrier ( VkImage image,
VkAccessFlags const src_access_mask,
VkAccessFlags const dst_access_mask,
VkImageLayout const old_layout,
VkImageLayout const new_layout,
std::uint32_t const mip_lvl = VK_REMAINING_MIP_LEVELS,
VkImageAspectFlags const aspect_mask = VK_IMAGE_ASPECT_COLOR_BIT )
Here is the caller graph for this function:

◆ setViewPort()

void Vyroda::VulkanAPI::setViewPort ( VkCommandBuffer cmd_buffer)

◆ souldResizeSwapChain()

bool Vyroda::VulkanAPI::souldResizeSwapChain ( )
Here is the call graph for this function:

◆ startCopyBuffer()

void Vyroda::VulkanAPI::startCopyBuffer ( std::size_t const image_index)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ startMarker()

void Vyroda::VulkanAPI::startMarker ( VkCommandBuffer buffer,
std::string const & name,
float const r,
float const g,
float const b,
float const a = 1.0f )

◆ startUpdateVertexBuffer()

void Vyroda::VulkanAPI::startUpdateVertexBuffer ( std::size_t const image_index)

◆ submit()

void Vyroda::VulkanAPI::submit ( VkQueue queue,
std::vector< VkSubmitInfo > const & submit_infos,
VkPresentInfoKHR const & present_info,
VkFence & fence )
Here is the call graph for this function:

◆ submitVertexUpdate()

void Vyroda::VulkanAPI::submitVertexUpdate ( VkSemaphore & semaphore,
std::size_t const image_index )
Here is the call graph for this function:

◆ transitionImageLayout()

ImageMemoryBarrier Vyroda::VulkanAPI::transitionImageLayout ( VkImage image,
VkImageLayout const old_layout,
VkImageLayout const new_layout,
VkImageAspectFlags const aspect_flags,
std::uint32_t layer_count = 1 )

◆ updateCurrentStagingMemoryOffset()

void Vyroda::VulkanAPI::updateCurrentStagingMemoryOffset ( std::size_t offset,
std::size_t const image_index )
inline
Here is the caller graph for this function:

◆ updateDescriptorSet() [1/2]

void Vyroda::VulkanAPI::updateDescriptorSet ( Buffer & uniform_buffer,
Buffer & storage_buffer,
VkDescriptorSet descset,
std::vector< VkDescriptorImageInfo > & image_info )

◆ updateDescriptorSet() [2/2]

void Vyroda::VulkanAPI::updateDescriptorSet ( Buffer & uniform_buffer,
VkDescriptorSet descset,
std::vector< VkDescriptorImageInfo > & image_info,
VkDescriptorType const type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER )

◆ updateDescriptorSets() [1/2]

void Vyroda::VulkanAPI::updateDescriptorSets ( std::vector< Buffer > & uniform_buffers,
VkDescriptorSet descset,
std::vector< VkDescriptorImageInfo > & image_info,
VkDescriptorType const type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER )

◆ updateDescriptorSets() [2/2]

void Vyroda::VulkanAPI::updateDescriptorSets ( std::vector< Buffer > & uniformBuffers,
std::vector< Buffer > & storageBuffers,
VkDescriptorSet descriptorSet,
std::vector< VkDescriptorImageInfo > & imageInfo,
std::vector< VkDescriptorImageInfo > & depth_map_image_info,
std::vector< VkDescriptorImageInfo > & cube_map_image_info,
Buffer & light_storage_buffer,
std::vector< VkDescriptorImageInfo > & csm_image_info )

◆ updateQueueIndex()

void Vyroda::VulkanAPI::updateQueueIndex ( )
inline

◆ updateStorageBuffer()

template<IsObjectBufferOrLightBuffer T>
void Vyroda::VulkanAPI::updateStorageBuffer ( Buffer & buffer,
T & object_buffer,
std::size_t const image_index )
inline
Here is the call graph for this function:

◆ updateStorageDescriptorSets()

void Vyroda::VulkanAPI::updateStorageDescriptorSets ( std::vector< Buffer > & uniform_buffers,
VkDescriptorSet desc_set,
VkDescriptorType const type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER )

◆ updateUniformBuffer()

void Vyroda::VulkanAPI::updateUniformBuffer ( Buffer & buffer,
std::vector< UniformBufferObject > * uniform_buffer_objects,
std::size_t const image_index )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateVertexBuffer()

void Vyroda::VulkanAPI::updateVertexBuffer ( std::vector< Vertex > const & new_vertices,
VkBuffer buffer_to_update,
std::size_t const image_index )

◆ waitIdle()

void Vyroda::VulkanAPI::waitIdle ( )

Member Data Documentation

◆ PLP_VK_COLOR_SPACE

VkColorSpaceKHR Vyroda::VulkanAPI::PLP_VK_COLOR_SPACE { VK_COLOR_SPACE_HDR10_ST2084_EXT }

◆ PLP_VK_FORMAT_COLOR

VkFormat Vyroda::VulkanAPI::PLP_VK_FORMAT_COLOR { VK_FORMAT_A2B10G10R10_UNORM_PACK32 }

◆ PLP_VK_FORMAT_DEPTH

VkFormat Vyroda::VulkanAPI::PLP_VK_FORMAT_DEPTH { VK_FORMAT_D32_SFLOAT }

◆ PLP_VK_FORMAT_DEPTH_STENCIL

VkFormat Vyroda::VulkanAPI::PLP_VK_FORMAT_DEPTH_STENCIL { VK_FORMAT_D32_SFLOAT_S8_UINT }

◆ PLP_VK_FORMAT_FONT

VkFormat Vyroda::VulkanAPI::PLP_VK_FORMAT_FONT { VK_FORMAT_R8_UNORM }

◆ PLP_VK_FORMAT_SURFACE

VkFormat Vyroda::VulkanAPI::PLP_VK_FORMAT_SURFACE { VK_FORMAT_A2B10G10R10_UNORM_PACK32 }

The documentation for this class was generated from the following files: