mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-25 11:35:12 +00:00
Vulkan: Fix barrier batching past limit (#6339)
If more than 16 barriers were queued at one time, the _queuedBarrierCount would no longer match the number of remaining barriers, because when breaking out of the loop consuming them it deleted all barriers, not just the 16 that were consumed. Should fix freezes that started occurring with #6240. Fixes issue #6338.
This commit is contained in:
parent
6f5fcb7970
commit
4f63782bac
1 changed files with 5 additions and 2 deletions
|
@ -95,6 +95,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
List<BarrierWithStageFlags<T>> list) where T : unmanaged
|
List<BarrierWithStageFlags<T>> list) where T : unmanaged
|
||||||
{
|
{
|
||||||
int firstMatch = -1;
|
int firstMatch = -1;
|
||||||
|
int end = list.Count;
|
||||||
|
|
||||||
for (int i = 0; i < list.Count; i++)
|
for (int i = 0; i < list.Count; i++)
|
||||||
{
|
{
|
||||||
|
@ -111,6 +112,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
if (count >= target.Length)
|
if (count >= target.Length)
|
||||||
{
|
{
|
||||||
|
end = i + 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -128,6 +130,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
if (count >= target.Length)
|
if (count >= target.Length)
|
||||||
{
|
{
|
||||||
|
end = i + 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -146,13 +149,13 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (firstMatch == 0)
|
if (firstMatch == 0 && end == list.Count)
|
||||||
{
|
{
|
||||||
list.Clear();
|
list.Clear();
|
||||||
}
|
}
|
||||||
else if (firstMatch != -1)
|
else if (firstMatch != -1)
|
||||||
{
|
{
|
||||||
int deleteCount = list.Count - firstMatch;
|
int deleteCount = end - firstMatch;
|
||||||
|
|
||||||
list.RemoveRange(firstMatch, deleteCount);
|
list.RemoveRange(firstMatch, deleteCount);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue