mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-12-03 06:24:18 +01:00
simplify flush
This commit is contained in:
parent
163eeea102
commit
1b44269d70
@ -16,6 +16,7 @@
|
|||||||
#include "Cafe/HW/Latte/Core/LatteShader.h"
|
#include "Cafe/HW/Latte/Core/LatteShader.h"
|
||||||
#include "Cafe/HW/Latte/Core/LatteIndices.h"
|
#include "Cafe/HW/Latte/Core/LatteIndices.h"
|
||||||
#include "Cemu/Logging/CemuDebugLogging.h"
|
#include "Cemu/Logging/CemuDebugLogging.h"
|
||||||
|
#include "Common/precompiled.h"
|
||||||
#include "Foundation/NSTypes.hpp"
|
#include "Foundation/NSTypes.hpp"
|
||||||
#include "HW/Latte/Core/LatteConst.h"
|
#include "HW/Latte/Core/LatteConst.h"
|
||||||
#include "HW/Latte/Renderer/Metal/MetalCommon.h"
|
#include "HW/Latte/Renderer/Metal/MetalCommon.h"
|
||||||
@ -311,14 +312,15 @@ bool MetalRenderer::BeginFrame(bool mainWindow)
|
|||||||
|
|
||||||
void MetalRenderer::Flush(bool waitIdle)
|
void MetalRenderer::Flush(bool waitIdle)
|
||||||
{
|
{
|
||||||
if (m_recordedDrawcalls > 0)
|
if (m_recordedDrawcalls > 0 || waitIdle)
|
||||||
CommitCommandBuffer();
|
CommitCommandBuffer();
|
||||||
if (waitIdle)
|
if (waitIdle)
|
||||||
{
|
{
|
||||||
for (auto commandBuffer : m_commandBuffers)
|
for (auto commandBuffer : m_commandBuffers)
|
||||||
{
|
{
|
||||||
if (commandBuffer.m_commited)
|
cemu_assert_debug(commandBuffer.m_commited);
|
||||||
WaitForCommandBufferCompletion(commandBuffer.m_commandBuffer);
|
|
||||||
|
WaitForCommandBufferCompletion(commandBuffer.m_commandBuffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user