Fix replay of vulkan map commands passing the wrong range size

This commit is contained in:
baldurk
2017-11-16 17:44:20 +00:00
parent d206a012f3
commit 6efb21b8e9
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ struct VkInitParams
uint32_t GetSerialiseSize();
// check if a frame capture section version is supported
static const uint64_t CurrentVersion = 0x7;
static const uint64_t CurrentVersion = 0x8;
static bool IsSupportedVersion(uint64_t ver);
};
@@ -597,6 +597,7 @@ bool WrappedVulkan::Serialise_vkUnmapMemory(SerialiserType &ser, VkDevice device
}
SERIALISE_ELEMENT(MapOffset);
SERIALISE_ELEMENT(MapSize);
if(IsReplayingAndReading())
{
@@ -721,8 +722,9 @@ bool WrappedVulkan::Serialise_vkFlushMappedMemoryRanges(SerialiserType &ser, VkD
if(IsReplayingAndReading())
{
VkResult ret = ObjDisp(device)->MapMemory(Unwrap(device), Unwrap(MemRange.memory),
MemRange.offset, memRangeSize, 0, (void **)&MappedData);
VkResult ret =
ObjDisp(device)->MapMemory(Unwrap(device), Unwrap(MemRange.memory), MemRange.offset,
MemRange.size, 0, (void **)&MappedData);
if(ret != VK_SUCCESS)
RDCERR("Error mapping memory on replay: %s", ToStr(ret).c_str());
}