mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-03 20:48:22 +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:
1 parent
0df4a0e2f3
commit
b8bd7559d5
1 file changed
+3
-1
@@ -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