Serialise out empty map writes. Closes #2323

This commit is contained in:
baldurk committed 2021-07-23 13:18:51 +01:00
1 parent 34a65857b1
commit 03648a9580
1 file changed
+7 -1
+7 -1
View File
@@ -1676,9 +1676,15 @@ void WrappedID3D12Device::Unmap(ID3D12Resource *Resource, UINT Subresource, byte
D3D12_RANGE range = {0, (SIZE_T)map.totalSize};
if(pWrittenRange)
{
range = *pWrittenRange;
if(capframe && range.End > range.Begin)
// clamp end if it's lower than begin
if(range.End < range.Begin)
range.End = range.Begin;
}
if(capframe)
MapDataWrite(Resource, Subresource, mapPtr, range);
}