mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 00:50:40 +00:00
When starting a chunk assert that it starts from 0
Help to catch the mistake of starting a chunk inside an active chunk ie. calling SCOPED_SERIALISE_CHUNK inside an existing SCOPED_SERIALISE_CHUNK
This commit is contained in:
committed by
Baldur Karlsson
parent
ae9ce88930
commit
a5636c7bec
@@ -341,6 +341,9 @@ void Serialiser<SerialiserMode::Writing>::SetChunkMetadataRecording(uint32_t fla
|
||||
template <>
|
||||
uint32_t Serialiser<SerialiserMode::Writing>::BeginChunk(uint32_t chunkID, uint64_t byteLength)
|
||||
{
|
||||
// cannot start a chunk inside a chunk
|
||||
RDCASSERTMSG("Beginning a chunk inside another chunk", m_Write->GetOffset() == 0,
|
||||
m_Write->GetOffset());
|
||||
{
|
||||
// chunk index needs to be valid
|
||||
RDCASSERT(chunkID > 0);
|
||||
|
||||
Reference in New Issue
Block a user