aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/TextureGroupHandle.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TextureGroupHandle.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Image/TextureGroupHandle.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TextureGroupHandle.cs b/Ryujinx.Graphics.Gpu/Image/TextureGroupHandle.cs
index 27ee1e49..0b69b6c7 100644
--- a/Ryujinx.Graphics.Gpu/Image/TextureGroupHandle.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TextureGroupHandle.cs
@@ -141,6 +141,22 @@ namespace Ryujinx.Graphics.Gpu.Image
}
/// <summary>
+ /// Synchronize dependent textures, if any of them have deferred a copy from this texture.
+ /// </summary>
+ public void SynchronizeDependents()
+ {
+ foreach (TextureDependency dependency in Dependencies)
+ {
+ TextureGroupHandle otherHandle = dependency.Other.Handle;
+
+ if (otherHandle.DeferredCopy == this)
+ {
+ otherHandle._group.Storage.SynchronizeMemory();
+ }
+ }
+ }
+
+ /// <summary>
/// Signal that a copy dependent texture has been modified, and must have its data copied to this one.
/// </summary>
/// <param name="copyFrom">The texture handle that must defer a copy to this one</param>