Update to latest zvulkan

This commit is contained in:
dpjudas 2025-03-22 04:44:33 +01:00
commit 5e22b07db2
16 changed files with 260 additions and 219 deletions

View file

@ -29,7 +29,6 @@
#include "vk_framebuffer.h"
CVAR(Bool, vk_hdr, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
CVAR(Bool, vk_exclusivefullscreen, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
VkFramebufferManager::VkFramebufferManager(VulkanRenderDevice* fb) : fb(fb)
{
@ -57,8 +56,7 @@ void VkFramebufferManager::AcquireImage()
if (!SwapChain)
return;
bool exclusiveFullscreen = fb->IsFullscreen() && vk_exclusivefullscreen;
if (SwapChain->Lost() || fb->GetClientWidth() != CurrentWidth || fb->GetClientHeight() != CurrentHeight || fb->GetVSync() != CurrentVSync || CurrentHdr != vk_hdr || CurrentExclusiveFullscreen != exclusiveFullscreen)
if (SwapChain->Lost() || fb->GetClientWidth() != CurrentWidth || fb->GetClientHeight() != CurrentHeight || fb->GetVSync() != CurrentVSync || CurrentHdr != vk_hdr)
{
Framebuffers.clear();
@ -66,9 +64,8 @@ void VkFramebufferManager::AcquireImage()
CurrentHeight = fb->GetClientHeight();
CurrentVSync = fb->GetVSync();
CurrentHdr = vk_hdr;
CurrentExclusiveFullscreen = exclusiveFullscreen;
SwapChain->Create(CurrentWidth, CurrentHeight, CurrentVSync ? 2 : 3, CurrentVSync, CurrentHdr, CurrentExclusiveFullscreen);
SwapChain->Create(CurrentWidth, CurrentHeight, CurrentVSync ? 2 : 3, CurrentVSync, CurrentHdr);
}
PresentImageIndex = SwapChain->AcquireImage(SwapChainImageAvailableSemaphore.get());

View file

@ -32,5 +32,4 @@ private:
int CurrentHeight = 0;
bool CurrentVSync = false;
bool CurrentHdr = false;
bool CurrentExclusiveFullscreen = false;
};