mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-01-09 11:17:20 -03:00
vk: regression: potentially fix various random graphical anomalies
Some checks are pending
Canary release job / Create tag (push) Waiting to run
Canary release job / Release for linux-arm64 (push) Waiting to run
Canary release job / Release for linux-x64 (push) Waiting to run
Canary release job / Release for win-x64 (push) Waiting to run
Canary release job / Release MacOS universal (push) Waiting to run
Some checks are pending
Canary release job / Create tag (push) Waiting to run
Canary release job / Release for linux-arm64 (push) Waiting to run
Canary release job / Release for linux-x64 (push) Waiting to run
Canary release job / Release for win-x64 (push) Waiting to run
Canary release job / Release MacOS universal (push) Waiting to run
This commit is contained in:
parent
b661bdd997
commit
845dd9a8db
1 changed files with 7 additions and 3 deletions
|
@ -168,13 +168,15 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
return BinarySearch(list, offset, size) >= 0;
|
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;
|
var list = _ranges;
|
||||||
if (list == null)
|
if (list == null)
|
||||||
{
|
{
|
||||||
yield break;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<Range> result = null;
|
||||||
|
|
||||||
int index = BinarySearch(list, offset, size);
|
int index = BinarySearch(list, offset, size);
|
||||||
|
|
||||||
|
@ -187,10 +189,12 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
yield return list[index++];
|
(result ??= []).Add(list[index++]);
|
||||||
}
|
}
|
||||||
while (index < list.Count && list[index].OverlapsWith(offset, size));
|
while (index < list.Count && list[index].OverlapsWith(offset, size));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int BinarySearch(List<Range> list, int offset, int size)
|
private static int BinarySearch(List<Range> list, int offset, int size)
|
||||||
|
|
Loading…
Reference in a new issue