#3575 Adjust VRAM budget test a bit

meow-7.2.2
Andrey Kleshchev 2025-04-01 23:24:51 +03:00 committed by Andrey Kleshchev
parent 2da46c3830
commit 0c056c77f4
1 changed files with 12 additions and 3 deletions

View File

@ -4684,9 +4684,18 @@ void LLWindowWin32::LLWindowWin32Thread::checkDXMem()
if (phys_mb > 0)
{
// Intel uses 'shared' vram, cap it to 25% of total memory
// Todo: consider caping all adapters at least to 50% ram
budget_mb = llmin(budget_mb, (UINT64)(phys_mb * 0.25));
if (gGLManager.mIsIntel)
{
// Intel uses 'shared' vram, cap it to 25% of total memory
// Todo: consider a way of detecting integrated Intel and AMD
budget_mb = llmin(budget_mb, (UINT64)(phys_mb * 0.25));
}
else
{
// More budget is generally better, but the way viewer
// utilizes even dedicated VRAM leaves a footprint in RAM
budget_mb = llmin(budget_mb, (UINT64)(phys_mb * 0.75));
}
}
else
{