mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-08-19 23:28:42 +02:00
Fix disposed textures being updated on TextureBindingsManager (#3750)
* Fix disposed textures being updated on TextureBindingsManager * PR feedback
This commit is contained in:
parent
bf77d1cab9
commit
88a8d1e567
1 changed files with 2 additions and 8 deletions
|
@ -137,11 +137,6 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public LinkedListNode<Texture> CacheNode { get; set; }
|
public LinkedListNode<Texture> CacheNode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Event to fire when texture data is disposed.
|
|
||||||
/// </summary>
|
|
||||||
public event Action<Texture> Disposed;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Physical memory ranges where the texture data is located.
|
/// Physical memory ranges where the texture data is located.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1448,7 +1443,6 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||||
DisposeTextures();
|
DisposeTextures();
|
||||||
|
|
||||||
HostTexture = hostTexture;
|
HostTexture = hostTexture;
|
||||||
InvalidatedSequence++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1603,6 +1597,8 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void DisposeTextures()
|
private void DisposeTextures()
|
||||||
{
|
{
|
||||||
|
InvalidatedSequence++;
|
||||||
|
|
||||||
_currentData = null;
|
_currentData = null;
|
||||||
HostTexture.Release();
|
HostTexture.Release();
|
||||||
|
|
||||||
|
@ -1637,8 +1633,6 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||||
{
|
{
|
||||||
DisposeTextures();
|
DisposeTextures();
|
||||||
|
|
||||||
Disposed?.Invoke(this);
|
|
||||||
|
|
||||||
if (Group.Storage == this)
|
if (Group.Storage == this)
|
||||||
{
|
{
|
||||||
Group.Dispose();
|
Group.Dispose();
|
||||||
|
|
Loading…
Reference in a new issue