Fix issue where mapped memory updates weren't masked. Closes #2083

* After simplification memory that's only used for tiled resources would have a
  single interval with finish() == UINT64_MAX, which failed the iteration check.
This commit is contained in:
baldurk
2020-10-28 14:20:01 +00:00
parent 3d46e105a3
commit 769f5d05da
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -2394,6 +2394,9 @@ ReplayStatus WrappedVulkan::ReadLogInitialisation(RDCFile *rdc, bool storeStruct
m_FrameReader = new StreamReader(reader, frameDataSize);
for(auto it = m_CreationInfo.m_Memory.begin(); it != m_CreationInfo.m_Memory.end(); ++it)
it->second.SimplifyBindings();
ReplayStatus status = ContextReplayLog(m_State, 0, 0, false);
if(status != ReplayStatus::Succeeded)
@@ -2464,9 +2467,6 @@ ReplayStatus WrappedVulkan::ReadLogInitialisation(RDCFile *rdc, bool storeStruct
FreeAllMemory(MemoryScope::IndirectReadback);
for(auto it = m_CreationInfo.m_Memory.begin(); it != m_CreationInfo.m_Memory.end(); ++it)
it->second.SimplifyBindings();
return ReplayStatus::Succeeded;
}
@@ -765,7 +765,7 @@ bool WrappedVulkan::Serialise_vkUnmapMemory(SerialiserType &ser, VkDevice device
// iterate the bindings that this map region overlaps, if we overlap with any tiled memory we
// need to take the slow path
while(it->finish() < finish)
while(it != bindings.end() && it->start() < finish)
{
if(it->value() == VulkanCreationInfo::Memory::Tiled)
{
@@ -806,7 +806,7 @@ bool WrappedVulkan::Serialise_vkUnmapMemory(SerialiserType &ser, VkDevice device
// iterate the bindings that this map region overlaps, and only memcpy the bits that we overlap
// which are linear
while(it->finish() < finish)
while(it != bindings.end() && it->start() < finish)
{
if(it->value() != VulkanCreationInfo::Memory::Tiled)
{
@@ -968,7 +968,7 @@ bool WrappedVulkan::Serialise_vkFlushMappedMemoryRanges(SerialiserType &ser, VkD
// iterate the bindings that this map region overlaps, if we overlap with any tiled memory we
// need to take the slow path
while(it->finish() < finish)
while(it != bindings.end() && it->start() < finish)
{
if(it->value() == VulkanCreationInfo::Memory::Tiled)
{
@@ -1009,7 +1009,7 @@ bool WrappedVulkan::Serialise_vkFlushMappedMemoryRanges(SerialiserType &ser, VkD
// iterate the bindings that this map region overlaps, and only memcpy the bits that we overlap
// which are linear
while(it->finish() < finish)
while(it != bindings.end() && it->start() < finish)
{
if(it->value() != VulkanCreationInfo::Memory::Tiled)
{