mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Don't try to replay maps with empty writes.
* This can lead to crashes if we try to optimise with a buffer upload and try to create a buffer of 0 bytes. Easier just to skip these no-op maps.
This commit is contained in:
@@ -897,7 +897,8 @@ bool WrappedID3D12Device::Serialise_MapDataWrite(Serialiser *localSerialiser,
|
||||
SERIALISE_ELEMENT(uint64_t, begin, (uint64_t)range.Begin);
|
||||
SERIALISE_ELEMENT(uint64_t, end, (uint64_t)range.End);
|
||||
|
||||
if(m_State < WRITING && GetResourceManager()->HasLiveResource(res))
|
||||
// don't do anything if end <= begin because the range is empty.
|
||||
if(m_State < WRITING && GetResourceManager()->HasLiveResource(res) && end > begin)
|
||||
{
|
||||
ID3D12Resource *r = GetResourceManager()->GetLiveAs<ID3D12Resource>(res);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user