Merge branch 'killerdevildog-fix-parsefloat-exponent-plus-sign'

This commit is contained in:
2026-09-14 07:06:21 +02:00
2 changed files with 22 additions and 2 deletions
@@ -135,6 +135,7 @@ GPUTextureView* GPUSwapChainVulkan::GetBackBufferView()
PROFILE_CPU();
auto context = _device->MainContext;
auto cmdBufferManager = context->GetCmdBufferManager();
// Keep commands recorded before acquire independent from the image-acquired semaphore wait below.
if (cmdBufferManager->HasPendingActiveCmdBuffer())
context->Flush();
@@ -152,7 +153,6 @@ GPUTextureView* GPUSwapChainVulkan::GetBackBufferView()
acquiredBackBuffer.WaitForSubmit();
const auto backBuffer = &_backBuffers[_acquiredImageIndex].Handle;
auto cmdBuffer = cmdBufferManager->GetCmdBuffer();
// Transition to render target (typical usage in most cases when calling backbuffer getter)
@@ -171,6 +171,17 @@ GPUTextureView* GPUSwapChainVulkan::GetBackBufferView()
void GPUSwapChainVulkan::Begin(RenderTask* task)
{
GPUSwapChain::Begin(task);
// Wait for the backbuffer to be available
if (_currentImageIndex != -1)
{
auto& backBuffer = _backBuffers[_currentImageIndex];
if (backBuffer.SubmitCmdBuffer)
{
backBuffer.SubmitCmdBuffer->Wait();
backBuffer.SubmitCmdBuffer = nullptr;
}
}
}
bool GPUSwapChainVulkan::Resize(int32 width, int32 height)
@@ -458,7 +458,16 @@ bool ParseFloat(const C* str, T* ret)
if (*str == 'e' || *str == 'E')
{
str++;
T powerer = *str == '-' ? str++, (T)0.1 : (T)10;
T powerer = (T)10;
if (*str == '-')
{
powerer = (T)0.1;
str++;
}
else if (*str == '+')
{
str++;
}
T power = 0;
while (*str >= '0' && *str <= '9')
{