diff options
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/Texture.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Image/Texture.cs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/Texture.cs b/Ryujinx.Graphics.Gpu/Image/Texture.cs index 26e102a9..6d2510f1 100644 --- a/Ryujinx.Graphics.Gpu/Image/Texture.cs +++ b/Ryujinx.Graphics.Gpu/Image/Texture.cs @@ -73,7 +73,7 @@ namespace Ryujinx.Graphics.Gpu.Image public bool ChangedSize { get; private set; } /// <summary> - /// Set when a texture's GPU VA has ever been partially or fully unmapped. + /// Set when a texture's GPU VA has ever been partially or fully unmapped. /// This indicates that the range must be fully checked when matching the texture. /// </summary> public bool ChangedMapping { get; private set; } @@ -628,7 +628,7 @@ namespace Ryujinx.Graphics.Gpu.Image } /// <summary> - /// Fully synchronizes guest and host memory. + /// Fully synchronizes guest and host memory. /// This will replace the entire texture with the data present in guest memory. /// </summary> public void SynchronizeFull() @@ -1127,7 +1127,7 @@ namespace Ryujinx.Graphics.Gpu.Image { TextureCreateInfo createInfo = TextureManager.GetCreateInfo(view.Info, _context.Capabilities, ScaleFactor); - ITexture newView = parent.HostTexture.CreateView(createInfo, view.FirstLayer + firstLayer, view.FirstLevel + firstLevel); + ITexture newView = parent.HostTexture.CreateView(createInfo, view.FirstLayer + firstLayer, view.FirstLevel + firstLevel); view.ReplaceView(parent, view.Info, newView, view.FirstLayer + firstLayer, view.FirstLevel + firstLevel); } @@ -1188,6 +1188,15 @@ namespace Ryujinx.Graphics.Gpu.Image IsModified = true; Group.SignalModifying(this, bound, !wasModified); } + + if (bound) + { + IncrementReferenceCount(); + } + else + { + DecrementReferenceCount(); + } } /// <summary> |
