mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Fix replay of vulkan map commands passing the wrong range size
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user