mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-23 06:56:40 +00:00
Keep chunk count valid with duplicated chunks
This commit is contained in:
@@ -295,6 +295,19 @@ Chunk *Chunk::Duplicate()
|
||||
|
||||
memcpy(ret->m_Data, m_Data, m_Length);
|
||||
|
||||
#if !defined(RELEASE)
|
||||
int64_t newval = Atomic::Inc64(&m_LiveChunks);
|
||||
Atomic::ExchAdd64(&m_TotalMem, m_Length);
|
||||
|
||||
if(newval > m_MaxChunks)
|
||||
{
|
||||
int breakpointme = 0;
|
||||
(void)breakpointme;
|
||||
}
|
||||
|
||||
m_MaxChunks = RDCMAX(newval, m_MaxChunks);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user