mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-09 00:11:17 +12:00
rework the command buffer system
This commit is contained in:
parent
2890819118
commit
8a8037377f
5 changed files with 66 additions and 54 deletions
|
@ -3,13 +3,7 @@
|
|||
|
||||
bool LatteQueryObjectMtl::getResult(uint64& numSamplesPassed)
|
||||
{
|
||||
if (!m_commandBuffer)
|
||||
{
|
||||
numSamplesPassed = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!CommandBufferCompleted(m_commandBuffer))
|
||||
if (m_commandBuffer && !CommandBufferCompleted(m_commandBuffer))
|
||||
return false;
|
||||
|
||||
uint64* resultPtr = m_mtlr->GetOcclusionQueryResultsPtr();
|
||||
|
@ -38,7 +32,7 @@ void LatteQueryObjectMtl::end()
|
|||
m_range.end = m_mtlr->GetOcclusionQueryIndex();
|
||||
m_mtlr->EndOcclusionQuery();
|
||||
|
||||
m_commandBuffer = m_mtlr->GetCurrentCommandBuffer()->retain();
|
||||
if (m_mtlr->IsCommandBufferActive())
|
||||
m_commandBuffer = m_mtlr->GetAndRetainCurrentCommandBufferIfNotCompleted();
|
||||
if (m_commandBuffer)
|
||||
m_mtlr->RequestSoonCommit();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue