mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Make sure unmap chunks for textures are saved in the base record
* Putting chunks in the subresource chunks is a no-no as these are never actually referenced and pulled into the frame capture, they're just used for locating the right data pointer. Putting an unmap in here could lead to texture data going missing on replay if the texture was never actually marked as dirty.
This commit is contained in:
@@ -7897,6 +7897,8 @@ void WrappedID3D11DeviceContext::Unmap(ID3D11Resource *pResource, UINT Subresour
|
||||
m_pDevice->GetResourceManager()->GetResourceRecord(GetIDForResource(pResource));
|
||||
RDCASSERT(record);
|
||||
|
||||
D3D11ResourceRecord *baserecord = record;
|
||||
|
||||
if(record->NumSubResources > (int)Subresource)
|
||||
record = (D3D11ResourceRecord *)record->SubResources[Subresource];
|
||||
|
||||
@@ -7912,7 +7914,7 @@ void WrappedID3D11DeviceContext::Unmap(ID3D11Resource *pResource, UINT Subresour
|
||||
|
||||
Chunk *chunk = scope.Get();
|
||||
|
||||
record->AddChunk(chunk);
|
||||
baserecord->AddChunk(chunk);
|
||||
record->SetDataPtr(chunk->GetData());
|
||||
|
||||
record->DataInSerialiser = true;
|
||||
|
||||
Reference in New Issue
Block a user