From 88a8d1e5674075040713bf71666498a4a94b4d29 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 9 Oct 2022 15:23:52 -0300 Subject: [PATCH] Fix disposed textures being updated on TextureBindingsManager (#3750) * Fix disposed textures being updated on TextureBindingsManager * PR feedback --- Ryujinx.Graphics.Gpu/Image/Texture.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Ryujinx.Graphics.Gpu/Image/Texture.cs b/Ryujinx.Graphics.Gpu/Image/Texture.cs index c104e860dc..847cfbfe5e 100644 --- a/Ryujinx.Graphics.Gpu/Image/Texture.cs +++ b/Ryujinx.Graphics.Gpu/Image/Texture.cs @@ -137,11 +137,6 @@ namespace Ryujinx.Graphics.Gpu.Image /// public LinkedListNode CacheNode { get; set; } - /// - /// Event to fire when texture data is disposed. - /// - public event Action Disposed; - /// /// Physical memory ranges where the texture data is located. /// @@ -1448,7 +1443,6 @@ namespace Ryujinx.Graphics.Gpu.Image DisposeTextures(); HostTexture = hostTexture; - InvalidatedSequence++; } /// @@ -1603,6 +1597,8 @@ namespace Ryujinx.Graphics.Gpu.Image /// private void DisposeTextures() { + InvalidatedSequence++; + _currentData = null; HostTexture.Release(); @@ -1637,8 +1633,6 @@ namespace Ryujinx.Graphics.Gpu.Image { DisposeTextures(); - Disposed?.Invoke(this); - if (Group.Storage == this) { Group.Dispose();