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:
baldurk
2016-09-08 14:43:51 +02:00
parent 0df4a0e2f3
commit b8bd7559d5
@@ -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;