Просмотр исходного кода

Fix disposed textures being updated on TextureBindingsManager (#3750)

* Fix disposed textures being updated on TextureBindingsManager

* PR feedback
gdkchan 3 лет назад
Родитель
Сommit
88a8d1e567
1 измененных файлов с 2 добавлено и 8 удалено
  1. 2 8
      Ryujinx.Graphics.Gpu/Image/Texture.cs

+ 2 - 8
Ryujinx.Graphics.Gpu/Image/Texture.cs

@@ -137,11 +137,6 @@ namespace Ryujinx.Graphics.Gpu.Image
         /// </summary>
         public LinkedListNode<Texture> CacheNode { get; set; }
 
-        /// <summary>
-        /// Event to fire when texture data is disposed.
-        /// </summary>
-        public event Action<Texture> Disposed;
-
         /// <summary>
         /// Physical memory ranges where the texture data is located.
         /// </summary>
@@ -1448,7 +1443,6 @@ namespace Ryujinx.Graphics.Gpu.Image
             DisposeTextures();
 
             HostTexture = hostTexture;
-            InvalidatedSequence++;
         }
 
         /// <summary>
@@ -1603,6 +1597,8 @@ namespace Ryujinx.Graphics.Gpu.Image
         /// </summary>
         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();