diff options
author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2025-05-06 15:34:16 -0400 |
---|---|---|
committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2025-05-06 15:34:16 -0400 |
commit | d679e7f3bacd7bba5493257f0e6c1c2366bf960a (patch) | |
tree | b351be1516815a9ebd49bf57e86d7f7125537bec /indra/llwindow/llwindowwin32.cpp | |
parent | 47a5c7a41340a18d90a5a8724762ff32f9ac8afd (diff) | |
parent | 9180a110bd5b0e41f182c32017b5dccd2eb265be (diff) |
Merge branch 'release/2025.04' into geenz/gltf-mesh-import
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 832cf254d1..4fca74497f 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -4040,7 +4040,15 @@ void LLWindowWin32::fillCompositionLogfont(LOGFONT *logfont) break; } - logfont->lfHeight = mPreeditor->getPreeditFontSize(); + if (mPreeditor) + { + logfont->lfHeight = mPreeditor->getPreeditFontSize(); + } + else + { + // todo: extract from some font * LLUI::getScaleFactor() intead + logfont->lfHeight = 10; + } logfont->lfWeight = FW_NORMAL; } @@ -4684,9 +4692,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 { |