diff options
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TextureCache.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Image/TextureCache.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TextureCache.cs b/Ryujinx.Graphics.Gpu/Image/TextureCache.cs index ea64f46c..a6fa9652 100644 --- a/Ryujinx.Graphics.Gpu/Image/TextureCache.cs +++ b/Ryujinx.Graphics.Gpu/Image/TextureCache.cs @@ -100,6 +100,18 @@ namespace Ryujinx.Graphics.Gpu.Image } /// <summary> + /// Determines if any texture exists within the target memory range. + /// </summary> + /// <param name="memoryManager">The GPU memory manager</param> + /// <param name="gpuVa">GPU virtual address to search for textures</param> + /// <param name="size">The size of the range</param> + /// <returns>True if any texture exists in the range, false otherwise</returns> + public bool IsTextureInRange(MemoryManager memoryManager, ulong gpuVa, ulong size) + { + return _textures.FindOverlaps(memoryManager.GetPhysicalRegions(gpuVa, size), ref _textureOverlaps) != 0; + } + + /// <summary> /// Determines if a given texture is "safe" for upscaling from its info. /// Note that this is different from being compatible - this elilinates targets that would have detrimental effects when scaled. /// </summary> |
