mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-25 23:25:41 +00:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user