mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-01-08 08:00:44 +01:00
fix: present issue
This commit is contained in:
parent
4022755a33
commit
db709c3495
@ -137,6 +137,7 @@ void MetalRenderer::SwapBuffers(bool swapTV, bool swapDRC)
|
|||||||
debug_printf("skipped present!\n");
|
debug_printf("skipped present!\n");
|
||||||
}
|
}
|
||||||
m_drawable = nullptr;
|
m_drawable = nullptr;
|
||||||
|
m_drawableAcquired = false;
|
||||||
|
|
||||||
CommitCommandBuffer();
|
CommitCommandBuffer();
|
||||||
}
|
}
|
||||||
@ -145,6 +146,14 @@ void MetalRenderer::DrawBackbufferQuad(LatteTextureView* texView, RendererOutput
|
|||||||
sint32 imageX, sint32 imageY, sint32 imageWidth, sint32 imageHeight,
|
sint32 imageX, sint32 imageY, sint32 imageWidth, sint32 imageHeight,
|
||||||
bool padView, bool clearBackground)
|
bool padView, bool clearBackground)
|
||||||
{
|
{
|
||||||
|
if (m_drawableAcquired)
|
||||||
|
{
|
||||||
|
debug_printf("drawable already acquired this frame\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_drawableAcquired = true;
|
||||||
|
|
||||||
// Acquire drawable
|
// Acquire drawable
|
||||||
m_drawable = m_metalLayer->nextDrawable();
|
m_drawable = m_metalLayer->nextDrawable();
|
||||||
if (!m_drawable)
|
if (!m_drawable)
|
||||||
|
@ -216,6 +216,7 @@ private:
|
|||||||
MetalEncoderType m_encoderType = MetalEncoderType::None;
|
MetalEncoderType m_encoderType = MetalEncoderType::None;
|
||||||
MTL::CommandEncoder* m_commandEncoder = nullptr;
|
MTL::CommandEncoder* m_commandEncoder = nullptr;
|
||||||
CA::MetalDrawable* m_drawable = nullptr;
|
CA::MetalDrawable* m_drawable = nullptr;
|
||||||
|
bool m_drawableAcquired = false;
|
||||||
|
|
||||||
// State
|
// State
|
||||||
MetalState m_state;
|
MetalState m_state;
|
||||||
|
Loading…
Reference in New Issue
Block a user