aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2022-10-09 15:23:52 -0300
committerGitHub <noreply@github.com>2022-10-09 15:23:52 -0300
commit88a8d1e5674075040713bf71666498a4a94b4d29 (patch)
treedca1976cd216dcb4033e156dd13d8616decc4178
parentbf77d1cab93467676156ebfbd5cf0ae057266e6f (diff)
Fix disposed textures being updated on TextureBindingsManager (#3750)1.1.298
* Fix disposed textures being updated on TextureBindingsManager * PR feedback
-rw-r--r--Ryujinx.Graphics.Gpu/Image/Texture.cs10
1 files changed, 2 insertions, 8 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/Texture.cs b/Ryujinx.Graphics.Gpu/Image/Texture.cs
index c104e860..847cfbfe 100644
--- a/Ryujinx.Graphics.Gpu/Image/Texture.cs
+++ b/Ryujinx.Graphics.Gpu/Image/Texture.cs
@@ -138,11 +138,6 @@ namespace Ryujinx.Graphics.Gpu.Image
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>
public MultiRange Range { get; private set; }
@@ -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();