mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-25 23:25:41 +00:00
MetalDevice: Fix render command encoder leak
and subsequent crash on shutdown.
This commit is contained in:
parent
08acc3144c
commit
1b9e72e3a6
|
@ -1829,6 +1829,7 @@ void MetalDevice::BeginRenderPass()
|
||||||
m_inline_upload_encoder = nil;
|
m_inline_upload_encoder = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@autoreleasepool {
|
||||||
MTLRenderPassDescriptor* desc;
|
MTLRenderPassDescriptor* desc;
|
||||||
if (!m_current_framebuffer)
|
if (!m_current_framebuffer)
|
||||||
{
|
{
|
||||||
|
@ -1842,8 +1843,9 @@ void MetalDevice::BeginRenderPass()
|
||||||
desc = m_current_framebuffer->GetDescriptor();
|
desc = m_current_framebuffer->GetDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_render_encoder = [m_render_cmdbuf renderCommandEncoderWithDescriptor:desc];
|
m_render_encoder = [[m_render_cmdbuf renderCommandEncoderWithDescriptor:desc] retain];
|
||||||
SetInitialEncoderState();
|
SetInitialEncoderState();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetalDevice::EndRenderPass()
|
void MetalDevice::EndRenderPass()
|
||||||
|
|
Loading…
Reference in a new issue