aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/GpuChannel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Gpu/GpuChannel.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/GpuChannel.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/GpuChannel.cs b/Ryujinx.Graphics.Gpu/GpuChannel.cs
index b9d91f93..f3bdd576 100644
--- a/Ryujinx.Graphics.Gpu/GpuChannel.cs
+++ b/Ryujinx.Graphics.Gpu/GpuChannel.cs
@@ -59,9 +59,24 @@ namespace Ryujinx.Graphics.Gpu
{
oldMemoryManager.Physical.BufferCache.NotifyBuffersModified -= BufferManager.Rebind;
oldMemoryManager.Physical.DecrementReferenceCount();
+ oldMemoryManager.MemoryUnmapped -= MemoryUnmappedHandler;
}
memoryManager.Physical.BufferCache.NotifyBuffersModified += BufferManager.Rebind;
+ memoryManager.MemoryUnmapped += MemoryUnmappedHandler;
+
+ // Since the memory manager changed, make sure we will get pools from addresses of the new memory manager.
+ TextureManager.ReloadPools();
+ }
+
+ /// <summary>
+ /// Memory mappings change event handler.
+ /// </summary>
+ /// <param name="sender">Memory manager where the mappings changed</param>
+ /// <param name="e">Information about the region that is being changed</param>
+ private void MemoryUnmappedHandler(object sender, UnmapEventArgs e)
+ {
+ TextureManager.ReloadPools();
}
/// <summary>