Merge remote-tracking branch 'origin/master' into 1.12

# Conflicts:
#	Source/Editor/Options/InterfaceOptions.cs
#	Source/Engine/Audio/OpenAL/AudioBackendOAL.cpp
#	Source/Engine/Graphics/Graphics.cpp
#	Source/Engine/GraphicsDevice/Vulkan/CmdBufferVulkan.cpp
#	Source/Engine/GraphicsDevice/Vulkan/CmdBufferVulkan.h
#	Source/Engine/GraphicsDevice/Vulkan/Config.h
#	Source/Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.cpp
#	Source/Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.h
#	Source/Engine/GraphicsDevice/Vulkan/QueueVulkan.cpp
This commit is contained in:
Wojtek Figat
2026-03-10 15:08:43 +01:00
28 changed files with 381 additions and 201 deletions

View File

@@ -2253,16 +2253,15 @@ FenceVulkan* FenceManagerVulkan::AllocateFence(bool createSignaled)
return fence;
}
bool FenceManagerVulkan::WaitForFence(FenceVulkan* fence, uint64 timeInNanoseconds) const
bool FenceManagerVulkan::WaitForFence(FenceVulkan* fence, float timeoutSeconds) const
{
if (fence->IsSignaled)
return false;
PROFILE_CPU();
ZoneColor(TracyWaitZoneColor);
ASSERT(_usedFences.Contains(fence));
if (timeInNanoseconds)
timeInNanoseconds = 1000ll * 1000ll * 1000LL; // 1s
const VkResult result = vkWaitForFences(_device->Device, 1, &fence->Handle, true, timeInNanoseconds);
uint64 timeNanoseconds = (uint64)((double)timeoutSeconds * 1000000000.0);
const VkResult result = vkWaitForFences(_device->Device, 1, &fence->Handle, true, timeNanoseconds);
LOG_VULKAN_RESULT(result);
if (result == VK_SUCCESS)
{
@@ -2290,11 +2289,11 @@ void FenceManagerVulkan::ReleaseFence(FenceVulkan*& fence)
fence = nullptr;
}
void FenceManagerVulkan::WaitAndReleaseFence(FenceVulkan*& fence, uint64 timeInNanoseconds)
void FenceManagerVulkan::WaitAndReleaseFence(FenceVulkan*& fence, float timeoutSeconds)
{
ScopeLock lock(_device->_fenceLock);
if (!fence->IsSignaled)
WaitForFence(fence, timeInNanoseconds);
WaitForFence(fence, timeoutSeconds);
ResetFence(fence);
_usedFences.Remove(fence);
_freeFences.Add(fence);