diff options
Diffstat (limited to 'src/Ryujinx.Graphics.Gpu/Image/Texture.cs')
-rw-r--r-- | src/Ryujinx.Graphics.Gpu/Image/Texture.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Ryujinx.Graphics.Gpu/Image/Texture.cs b/src/Ryujinx.Graphics.Gpu/Image/Texture.cs index 0fce4deb..022a3839 100644 --- a/src/Ryujinx.Graphics.Gpu/Image/Texture.cs +++ b/src/Ryujinx.Graphics.Gpu/Image/Texture.cs @@ -571,6 +571,18 @@ namespace Ryujinx.Graphics.Gpu.Image } /// <summary> + /// Discards all data for this texture. + /// This clears all dirty flags, modified flags, and pending copies from other textures. + /// It should be used if the texture data will be fully overwritten by the next use. + /// </summary> + public void DiscardData() + { + Group.DiscardData(this); + + _dirty = false; + } + + /// <summary> /// Synchronizes guest and host memory. /// This will overwrite the texture data with the texture data on the guest memory, if a CPU /// modification is detected. |