Minor code improvements (#1124)

This commit is contained in:
goeiecool9999 2024-03-18 09:18:02 +01:00 committed by GitHub
parent eaa82817dd
commit 42d14eec96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 17 additions and 20 deletions

View file

@ -973,7 +973,7 @@ void _emitOperandInputCode(LatteDecompilerShaderContext* shaderContext, LatteDec
}
else
{
cemuLog_log(LogType::Force, "Unsupported shader ALU operand sel 0x%x\n", aluInstruction->sourceOperand[operandIndex].sel);
cemuLog_log(LogType::Force, "Unsupported shader ALU operand sel {:#x}\n", aluInstruction->sourceOperand[operandIndex].sel);
debugBreakpoint();
}

View file

@ -30,8 +30,6 @@ public:
void Flush(bool waitIdle = false) override;
void NotifyLatteCommandProcessorIdle() override;
void UpdateVSyncState();
void EnableDebugMode() override;
void SwapBuffers(bool swapTV = true, bool swapDRC = true) override;

View file

@ -706,8 +706,8 @@ SwapchainInfoVk& VulkanRenderer::GetChainInfo(bool mainWindow) const
void VulkanRenderer::StopUsingPadAndWait()
{
m_destroyPadSwapchainNextAcquire = true;
m_padCloseReadySemaphore.wait();
m_destroyPadSwapchainNextAcquire.test_and_set();
m_destroyPadSwapchainNextAcquire.wait(true);
}
bool VulkanRenderer::IsPadWindowActive()
@ -2557,11 +2557,11 @@ bool VulkanRenderer::AcquireNextSwapchainImage(bool mainWindow)
if(!IsSwapchainInfoValid(mainWindow))
return false;
if(!mainWindow && m_destroyPadSwapchainNextAcquire)
if(!mainWindow && m_destroyPadSwapchainNextAcquire.test())
{
RecreateSwapchain(mainWindow, true);
m_destroyPadSwapchainNextAcquire = false;
m_padCloseReadySemaphore.notify();
m_destroyPadSwapchainNextAcquire.clear();
m_destroyPadSwapchainNextAcquire.notify_all();
return false;
}

View file

@ -414,8 +414,7 @@ private:
}m_state;
std::unique_ptr<SwapchainInfoVk> m_mainSwapchainInfo{}, m_padSwapchainInfo{};
Semaphore m_padCloseReadySemaphore;
bool m_destroyPadSwapchainNextAcquire = false;
std::atomic_flag m_destroyPadSwapchainNextAcquire{};
bool IsSwapchainInfoValid(bool mainWindow) const;
VkRenderPass m_imguiRenderPass = VK_NULL_HANDLE;