mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-21 05:05:44 +00:00
Make sure to unwrap parameters to vkInvalidateMappedMemoryRanges
This commit is contained in:
@@ -555,7 +555,7 @@ VkResult WrappedVulkan::vkFlushMappedMemoryRanges(
|
||||
}
|
||||
}
|
||||
|
||||
VkMappedMemoryRange *unwrapped = new VkMappedMemoryRange[memRangeCount];
|
||||
VkMappedMemoryRange *unwrapped = GetTempArray<VkMappedMemoryRange>(memRangeCount);
|
||||
for(uint32_t i=0; i < memRangeCount; i++)
|
||||
{
|
||||
unwrapped[i] = pMemRanges[i];
|
||||
@@ -564,8 +564,6 @@ VkResult WrappedVulkan::vkFlushMappedMemoryRanges(
|
||||
|
||||
VkResult ret = ObjDisp(device)->FlushMappedMemoryRanges(Unwrap(device), memRangeCount, unwrapped);
|
||||
|
||||
SAFE_DELETE_ARRAY(unwrapped);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -574,9 +572,16 @@ VkResult WrappedVulkan::vkInvalidateMappedMemoryRanges(
|
||||
uint32_t memRangeCount,
|
||||
const VkMappedMemoryRange* pMemRanges)
|
||||
{
|
||||
VkMappedMemoryRange *unwrapped = GetTempArray<VkMappedMemoryRange>(memRangeCount);
|
||||
for(uint32_t i=0; i < memRangeCount; i++)
|
||||
{
|
||||
unwrapped[i] = pMemRanges[i];
|
||||
unwrapped[i].memory = Unwrap(unwrapped[i].memory);
|
||||
}
|
||||
|
||||
// don't need to serialise this, readback from mapped memory is not captured
|
||||
// and is only relevant for the application.
|
||||
return ObjDisp(device)->InvalidateMappedMemoryRanges(Unwrap(device), memRangeCount, pMemRanges);
|
||||
return ObjDisp(device)->InvalidateMappedMemoryRanges(Unwrap(device), memRangeCount, unwrapped);
|
||||
}
|
||||
|
||||
// Generic API object functions
|
||||
|
||||
Reference in New Issue
Block a user