GPU: Discard data when getting texture before full clear (#5719)

* GPU: Discard data when getting texture before full clear

* Fix rules and order of clear checks

* Fix formatting
This commit is contained in:
riperiperi
2023-09-25 22:07:03 +01:00
committed by GitHub
parent 8026e1c804
commit f6c3f1cdfd
10 changed files with 205 additions and 11 deletions

View File

@ -570,6 +570,18 @@ namespace Ryujinx.Graphics.Gpu.Image
return Group.CheckDirty(this, consume);
}
/// <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