Vulkan: Several swapchain fixes and refactors (#1132)

This commit is contained in:
goeiecool9999 2024-03-24 10:57:08 +01:00 committed by GitHub
parent 4d609f06b8
commit 17060752b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 99 additions and 84 deletions

View file

@ -127,7 +127,6 @@ class VulkanRenderer : public Renderer
friend class PipelineCompiler;
using VSync = SwapchainInfoVk::VSync;
using QueueFamilyIndices = SwapchainInfoVk::QueueFamilyIndices;
static const inline int UNIFORMVAR_RINGBUFFER_SIZE = 1024 * 1024 * 16; // 16MB
@ -421,6 +420,18 @@ private:
VkDescriptorPool m_descriptorPool;
public:
struct QueueFamilyIndices
{
int32_t graphicsFamily = -1;
int32_t presentFamily = -1;
bool IsComplete() const { return graphicsFamily >= 0 && presentFamily >= 0; }
};
static QueueFamilyIndices FindQueueFamilies(VkSurfaceKHR surface, VkPhysicalDevice device);
private:
struct FeatureControl
{
struct