Limit texture cache based on total texture size (#4350)

* Limit texture cache based on total texture size

* Formatting
This commit is contained in:
gdkchan
2023-02-08 10:19:43 -03:00
committed by GitHub
parent 96cf242bcf
commit 26bf13a65d
4 changed files with 40 additions and 84 deletions

View File

@ -434,32 +434,6 @@ namespace Ryujinx.Graphics.Gpu.Image
}
}
/// <summary>
/// Checks if a texture was modified by the GPU.
/// </summary>
/// <param name="texture">The texture to be checked</param>
/// <returns>True if any region of the texture was modified by the GPU, false otherwise</returns>
public bool AnyModified(Texture texture)
{
bool anyModified = false;
EvaluateRelevantHandles(texture, (baseHandle, regionCount, split) =>
{
for (int i = 0; i < regionCount; i++)
{
TextureGroupHandle group = _handles[baseHandle + i];
if (group.Modified)
{
anyModified = true;
break;
}
}
});
return anyModified;
}
/// <summary>
/// Flush modified ranges for a given texture.
/// </summary>