KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
Karma::KarmaGui_ImplVulkan_InitInfo Struct Reference

A data structure for Vulkan's initialization done in KarmaGuiRenderer::KarmaGui_ImplVulkan_Init(). More...

#include <KarmaGuiVulkanHandler.h>

Public Attributes

VkInstance Instance
 The handle to Vulkan's instance object, for use in backend.
VkPhysicalDevice PhysicalDevice
 The handle to the Vulkan's software representaion of GPU, for use in backend.
VkDevice Device
 A logical device handle. Device is an appropriate instance using which swapchains, framebuffers, and all such Vulkan resources are instantiated and created. For use in backend.
uint32_t QueueFamily
 Graphics queue family (valued in unsigned integer) properties used for creating commandpool, swapchain, and logical device. For backend.
VkQueue Queue
 Opaque handle to a queue object. For backend submission of queues via vkQueueSubmit.
VkDescriptorPool DescriptorPool
 A fresh descriptor pool created in KarmaGuiRenderer::CreateDescriptorPool() (seperate from VulkanVertexArray::CreateDescriptorPool()) for the uniforms and texture purposes. In this backend chiefly for KarmaGuiVulkanHandler::KarmaGui_ImplVulkan_AddTexture routine.
VkRenderPass RenderPass
 A handle to render pass object which represents a collection of attachments (depth attachment or colo(u)r attachment ), subpasses, and dependencies between the subpasses, and describes how the attachments are used over the course of the subpasses.
VkPipelineCache PipelineCache
 Usually this cache is set to VK_NULL_HANDLE, indicating that pipeline caching is disabled; or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command.
uint32_t Subpass
 Not sure what the use of this Subpass is. Seems vestigial?
uint32_t MinImageCount
 The minimum number of images the specified device supports for a swapchain created for the surface, and will be at least one plus one.
uint32_t ImageCount
 The number of elements in the pSwapchainImages array, i.e number of presentable swapchain images available (vkGetSwapchainImagesKHR).
VkSampleCountFlagBits MSAASamples
 Is a VkSampleCountFlagBits value specifying the number of samples used in rasterization. This value is ignored for the purposes of setting the number of samples used in rasterization if the pipeline is created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state set, but if VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state is not set, it is still used to define the size of the pSampleMask array.
const VkAllocationCallbacks * Allocator
 A pointer to a valid VkAllocationCallbacks structure. Structure containing callback function pointers for memory allocation.

Detailed Description

A data structure for Vulkan's initialization done in KarmaGuiRenderer::KarmaGui_ImplVulkan_Init().

Mostly, with the exception of DescriptorPool, the handles are referring to the objects, instantiated by VulkanContext::Init() function, set via KarmaGuiRenderer::SetUpKarmaGuiRenderer

Note
Should be zero cleared before use

Member Data Documentation

◆ Allocator

const VkAllocationCallbacks* Karma::KarmaGui_ImplVulkan_InitInfo::Allocator

A pointer to a valid VkAllocationCallbacks structure. Structure containing callback function pointers for memory allocation.

Note
Since Dear ImGui's implementation is using this technique, I am just not interfering where I'd be using NULL.
Since
Karma 1.0.0

◆ DescriptorPool

VkDescriptorPool Karma::KarmaGui_ImplVulkan_InitInfo::DescriptorPool

A fresh descriptor pool created in KarmaGuiRenderer::CreateDescriptorPool() (seperate from VulkanVertexArray::CreateDescriptorPool()) for the uniforms and texture purposes. In this backend chiefly for KarmaGuiVulkanHandler::KarmaGui_ImplVulkan_AddTexture routine.

Since
Karma 1.0.0

◆ Device

VkDevice Karma::KarmaGui_ImplVulkan_InitInfo::Device

A logical device handle. Device is an appropriate instance using which swapchains, framebuffers, and all such Vulkan resources are instantiated and created. For use in backend.

Since
Karma 1.0.0

◆ ImageCount

uint32_t Karma::KarmaGui_ImplVulkan_InitInfo::ImageCount

The number of elements in the pSwapchainImages array, i.e number of presentable swapchain images available (vkGetSwapchainImagesKHR).

Since
Karma 1.0.0

◆ Instance

VkInstance Karma::KarmaGui_ImplVulkan_InitInfo::Instance

The handle to Vulkan's instance object, for use in backend.

Since
Karma 1.0.0

◆ MinImageCount

uint32_t Karma::KarmaGui_ImplVulkan_InitInfo::MinImageCount

The minimum number of images the specified device supports for a swapchain created for the surface, and will be at least one plus one.

Note
Taken from VulkanContext and supposed to be >= 2.
Since
Karma 1.0.0

◆ MSAASamples

VkSampleCountFlagBits Karma::KarmaGui_ImplVulkan_InitInfo::MSAASamples

Is a VkSampleCountFlagBits value specifying the number of samples used in rasterization. This value is ignored for the purposes of setting the number of samples used in rasterization if the pipeline is created with the VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT dynamic state set, but if VK_DYNAMIC_STATE_SAMPLE_MASK_EXT dynamic state is not set, it is still used to define the size of the pSampleMask array.

This is using in the rasterization stage of the graphics pipeline to determine how many samples per pixel will be used when rendering.

Note
>= VK_SAMPLE_COUNT_1_BIT (0 -> default to VK_SAMPLE_COUNT_1_BIT). This setting disables multisampling, equivalent to no anti-aliasing, where each pixel has a single sample for color and depth processing during rasterization. Images created with this sample count cannot be used for multisample resolve operations or multisampled samplers, as they are treated as non-multisampled. Higher values like VK_SAMPLE_COUNT_2_BIT or VK_SAMPLE_COUNT_4_BIT enable multiple samples per pixel for improved anti-aliasing quality
In rasterization stage the primitives are converted to fragments. Each fragment corresponds to a pixel in the framebuffer. When multisampling is enabled, multiple samples are taken within each pixel to improve image quality and reduce aliasing effects.
Remarks
While using higher sample counts (for instance VK_SAMPLE_COUNT_4_BIT), I couldn't produce coherent 2D image here, despit of setting VK_SAMPLE_COUNT_4_BIT in KarmaGuiHandler::CreateOffScreenRenderResources() and appropriately setting image, depthimage, and pipeline to use that sample count. Perplexity isn't particularly able to help. So, I am leaving VK_SAMPLE_COUNT_1_BIT (no multisampling).
See also
KarmaGuiVulkanHandler::KarmaGui_ImplVulkan_CreatePipeline
Since
Karma 1.0.0

◆ PhysicalDevice

VkPhysicalDevice Karma::KarmaGui_ImplVulkan_InitInfo::PhysicalDevice

The handle to the Vulkan's software representaion of GPU, for use in backend.

Since
Karma 1.0.0

◆ PipelineCache

VkPipelineCache Karma::KarmaGui_ImplVulkan_InitInfo::PipelineCache

Usually this cache is set to VK_NULL_HANDLE, indicating that pipeline caching is disabled; or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command.

Since
Karma 1.0.0

◆ Queue

VkQueue Karma::KarmaGui_ImplVulkan_InitInfo::Queue

Opaque handle to a queue object. For backend submission of queues via vkQueueSubmit.

Since
Karma 1.0.0

◆ QueueFamily

uint32_t Karma::KarmaGui_ImplVulkan_InitInfo::QueueFamily

Graphics queue family (valued in unsigned integer) properties used for creating commandpool, swapchain, and logical device. For backend.

For instance Queue family #0 supports transfer, graphics, compute, and presentation

Since
Karma 1.0.0

◆ RenderPass

VkRenderPass Karma::KarmaGui_ImplVulkan_InitInfo::RenderPass

A handle to render pass object which represents a collection of attachments (depth attachment or colo(u)r attachment ), subpasses, and dependencies between the subpasses, and describes how the attachments are used over the course of the subpasses.

Taken from the one created in VulkanContext::CreateRenderPass().

Note
Used to set KarmaGui_ImplVulkan_Data::RenderPass (backend data) in KarmaGuiVulkanHandler::KarmaGui_ImplVulkan_Init()
See also
KarmaGuiRenderer::SetupKarmaGuiRenderer
Since
Karma 1.0.0

◆ Subpass

uint32_t Karma::KarmaGui_ImplVulkan_InitInfo::Subpass

Not sure what the use of this Subpass is. Seems vestigial?

Since
Karma 1.0.0

The documentation for this struct was generated from the following file: