vk: Optimize heap check iterator
- Significant boost in some scenarios
This commit is contained in:
@@ -1161,9 +1161,9 @@ void VKGSRender::check_heap_status(u32 flags)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
heap_critical = false;
|
heap_critical = false;
|
||||||
u32 test = 1u << std::countr_zero(flags);
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
const u32 test = 1u << std::countr_zero(flags);
|
||||||
switch (flags & test)
|
switch (flags & test)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@@ -1203,7 +1203,6 @@ void VKGSRender::check_heap_status(u32 flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
flags &= ~test;
|
flags &= ~test;
|
||||||
test <<= 1;
|
|
||||||
}
|
}
|
||||||
while (flags && !heap_critical);
|
while (flags && !heap_critical);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user