0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2025-01-10 19:52:00 +00:00

vk: regression: potentially fix various random graphical anomalies

This commit is contained in:
Evan Husted 2025-01-05 22:25:05 -06:00
parent b661bdd997
commit 845dd9a8db

View file

@ -168,13 +168,15 @@ namespace Ryujinx.Graphics.Vulkan
return BinarySearch(list, offset, size) >= 0;
}
public readonly IEnumerable<Range> FindOverlaps(int offset, int size)
public readonly List<Range> FindOverlaps(int offset, int size)
{
var list = _ranges;
if (list == null)
{
yield break;
return null;
}
List<Range> result = null;
int index = BinarySearch(list, offset, size);
@ -187,10 +189,12 @@ namespace Ryujinx.Graphics.Vulkan
do
{
yield return list[index++];
(result ??= []).Add(list[index++]);
}
while (index < list.Count && list[index].OverlapsWith(offset, size));
}
return result;
}
private static int BinarySearch(List<Range> list, int offset, int size)