mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Clamp masked writes to mapped memory region against size. Closes #2268
* When manually masking writes to mapped memory with tiled resources we need to avoid overrunning the bounds of the mapped region.
This commit is contained in:
@@ -1103,6 +1103,9 @@ bool WrappedVulkan::Serialise_vkFlushMappedMemoryRanges(SerialiserType &ser, VkD
|
||||
// *sooner*.
|
||||
size_t size = size_t(RDCMIN(it->finish(), finish) - offs);
|
||||
|
||||
// cap the size by the mapped memory region
|
||||
size = RDCMIN(MemRange.size, size);
|
||||
|
||||
memcpy(MappedData + offs, m_MaskedMapData.data() + offs, size);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user