mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-01-07 15:48:15 +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");
|
||||
}
|
||||
m_drawable = nullptr;
|
||||
m_drawableAcquired = false;
|
||||
|
||||
CommitCommandBuffer();
|
||||
}
|
||||
@ -145,6 +146,14 @@ void MetalRenderer::DrawBackbufferQuad(LatteTextureView* texView, RendererOutput
|
||||
sint32 imageX, sint32 imageY, sint32 imageWidth, sint32 imageHeight,
|
||||
bool padView, bool clearBackground)
|
||||
{
|
||||
if (m_drawableAcquired)
|
||||
{
|
||||
debug_printf("drawable already acquired this frame\n");
|
||||
return;
|
||||
}
|
||||
|
||||
m_drawableAcquired = true;
|
||||
|
||||
// Acquire drawable
|
||||
m_drawable = m_metalLayer->nextDrawable();
|
||||
if (!m_drawable)
|
||||
|
@ -216,6 +216,7 @@ private:
|
||||
MetalEncoderType m_encoderType = MetalEncoderType::None;
|
||||
MTL::CommandEncoder* m_commandEncoder = nullptr;
|
||||
CA::MetalDrawable* m_drawable = nullptr;
|
||||
bool m_drawableAcquired = false;
|
||||
|
||||
// State
|
||||
MetalState m_state;
|
||||
|
Loading…
Reference in New Issue
Block a user