mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-07 15:31:18 +12:00
release command buffers properly
This commit is contained in:
parent
e5dcd93dc3
commit
b5954d8f5b
4 changed files with 43 additions and 31 deletions
|
@ -22,6 +22,9 @@ LatteQueryObjectMtl::~LatteQueryObjectMtl()
|
|||
{
|
||||
if (m_queryIndex != INVALID_UINT32)
|
||||
m_mtlr->ReleaseOcclusionQueryIndex(m_queryIndex);
|
||||
|
||||
if (m_commandBuffer)
|
||||
m_commandBuffer->release();
|
||||
}
|
||||
|
||||
void LatteQueryObjectMtl::begin()
|
||||
|
@ -35,7 +38,7 @@ void LatteQueryObjectMtl::end()
|
|||
m_mtlr->SetActiveOcclusionQueryIndex(INVALID_UINT32);
|
||||
if (m_mtlr->IsCommandBufferActive())
|
||||
{
|
||||
m_commandBuffer = m_mtlr->GetCurrentCommandBuffer();
|
||||
m_commandBuffer = m_mtlr->GetCurrentCommandBuffer()->retain();
|
||||
m_mtlr->RequestSoonCommit();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue