13#include <vulkan/vulkan.h>
91 VkPhysicalDevice
GetGPU()
const {
return m_GPU; }
114 void TransitionImageLayout(VkImage image, VkFormat format, VkImageLayout oldLayout, VkImageLayout newLayout);
129 void CopyBufferToImage(VkBuffer buffer, VkImage image, uint32_t width, uint32_t height);
143 void InitializeDefaultDescriptorSets(uint32_t MaxFramesInFlight);
170 inline FVulkanDescriptorSetsLayout* GetDefaultDescriptorSetLayout()
const {
return m_DefaultDescriptorSetLayout; }
172 inline VulkanTexture* GetDefaultTexture()
const {
return m_DefaultTexture; }
174 inline VulkanShader* GetDefaultShader()
const {
return m_DefaultShader; }
194 void PopulateWithDescriptorSetsLayout(FVulkanDescriptorSetsLayout& OutLayout);
197 VkDevice m_LogicalDevice;
198 FVulkanDynamicRHI* m_VulkanDynamicRHI;
200 VkPhysicalDevice m_GPU;
201 VkQueue m_GraphicsQueue;
202 VkQueue m_PresentQueue;
203 VulkanTexture* m_DefaultTexture;
204 VulkanShader* m_DefaultShader;
207 VkCommandPool m_CommandPool;
210 FVulkanDescriptorSetsLayout* m_DefaultDescriptorSetLayout;
211 KarmaVector<class FVulkanDescriptorPool*> m_DescriptorPool;
212 KarmaVector<FVulkanDescriptorSets*> m_DefaultDescriptorSets;
213 uint32_t m_MaxFramesInFlight = 0;
215 FVulkanFenceManager m_FenceManager;
Header file for Vulkan synchronization primitives.
Definition VulkanDescriptorSets.h:126
FVulkanDevice(FVulkanDynamicRHI *InRHI, VkPhysicalDevice InGpu)
Constructor for FVulkanDevice.
Definition VulkanDevice.cpp:9
VkCommandPool GetCommandPool() const
Retrives the Vulkan command pool for the commandbuffers.
Definition VulkanDevice.h:98
~FVulkanDevice()
Destructor for FVulkanDevice.
Definition VulkanDevice.cpp:16
void TransitionImageLayout(VkImage image, VkFormat format, VkImageLayout oldLayout, VkImageLayout newLayout)
Transitions the layout of an image from oldLayout to newLayout.
Definition VulkanDevice.cpp:189
FVulkanFenceManager & GetFenceManager()
Getter for the default texture (unreal grid).
Definition VulkanDevice.h:166
VkDevice GetLogicalDevice() const
Retrieves the Vulkan logical device handle.
Definition VulkanDevice.h:84
bool HasStencilComponent(VkFormat format)
Checks if the given format has a stencil component.
Definition VulkanDevice.cpp:338
VkPhysicalDevice GetGPU() const
Retrieves the Vulkan physical device handle.
Definition VulkanDevice.h:91
void CopyBufferToImage(VkBuffer buffer, VkImage image, uint32_t width, uint32_t height)
Copies data from a buffer to a Vulkan image.
Definition VulkanDevice.cpp:282
void WaitUntilIdle()
Waits on the host by blocking the calling CPU thread until the Vulkan logical device completes all pe...
Definition VulkanDevice.cpp:183
void Destroy()
Destroys the logical vkdevice by making Vulkan API call.
Definition VulkanDevice.cpp:21
FVulkanDynamicRHI * GetVulkanDynamicRHI() const
Getter for the present queue created in FVulkanDevice::InitGPU().
Definition VulkanDevice.h:159
VkQueue GetGraphicsQueue() const
Getter for the graphics queue created in FVulkanDevice::InitGPU().
Definition VulkanDevice.h:152
void InitGPU()
Creates the Vulkan logical device and default vulkan resources.
Definition VulkanDevice.cpp:37
Vulkan implementation of the Dynamic RHI.
Definition VulkanDynamicRHI.h:131
Definition VulkanSynchronization.h:26
Represents a Vulkan swapchain, managing the images used for rendering and presentation.
Definition VulkanSwapChain.h:49
Vulkan specific implementation of Shader class.
Definition VulkanShader.h:28
Vulkan specific implementation of Texture class.
Definition VulkanTexture.h:30
Karma's std::vector wrapper with additional functionalities.
Definition KarmaTypes.h:243
Definition VulkanDescriptorSets.h:161