summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowwin32.h
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-04-07 03:26:40 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-04-08 16:46:59 +0300
commit130c50cf8d4de021f510b17fd02fcac88a67c5e6 (patch)
tree67739a76f5429321bf47798bab55b773cc9c43f8 /indra/llwindow/llwindowwin32.h
parent1d2cf48afa29b3b77a83cc1c7b85e56eaec8b95d (diff)
#5611 Select a discrete gpu when possible
Diffstat (limited to 'indra/llwindow/llwindowwin32.h')
-rw-r--r--indra/llwindow/llwindowwin32.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h
index d7fc715258..aab2635a34 100644
--- a/indra/llwindow/llwindowwin32.h
+++ b/indra/llwindow/llwindowwin32.h
@@ -172,6 +172,17 @@ protected:
void handleCompositionMessage(U32 indexes);
bool handleImeRequests(WPARAM request, LPARAM param, LRESULT *result);
+ // Additional function to request and hold a high-performance GPU on Windows 10+
+ //
+ // Laptops can dynamically switch between integrated and discrete GPUs.
+ // The Viewer has gpu-specific optimizations, and this switching can cause problems and crashes.
+ // The login screen requires low performance, which can lead to the OS deciding to switch to the integrated GPU.
+ // To avoid this, we request and hold a high-performance GPU using A D3D11 context until login.
+ // For diagnostics, we also log GPU changes.
+ void requestHighPerformanceGPU() const;
+ bool detectGPUChange() const;
+ void clearHighPerformanceGPURequest() const;
+
protected:
//
// Platform specific methods