Skip to content

#5611 Select a discrete gpu when possible#5619

Merged
akleshchev merged 1 commit intodevelopfrom
andreyk/5611_gpu
Apr 8, 2026
Merged

#5611 Select a discrete gpu when possible#5619
akleshchev merged 1 commit intodevelopfrom
andreyk/5611_gpu

Conversation

@akleshchev
Copy link
Copy Markdown
Contributor

@akleshchev akleshchev commented Apr 7, 2026

Use d3d11 to create and hold context for a specific gpu until login as a way to keep high performance gpu as a current gpu.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to keep the Windows viewer on the high-performance (discrete) GPU through the login phase by creating and holding a D3D11 device/context early, then releasing it once login completes (watchdog init).

Changes:

  • Add Win32 window hooks to request/hold a “preferred” GPU via a D3D11 device/context during startup.
  • Enumerate DXGI adapters and pick a preferred adapter (currently highest dedicated VRAM), with logging.
  • Release the held D3D11 device/context on initWatchdog() (login complete), and optionally warn if the adapter LUID changed.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 11 comments.

File Description
indra/llwindow/llwindowwin32.h Declares new GPU selection/diagnostic helper methods and documents intent.
indra/llwindow/llwindowwin32.cpp Implements D3D11-based adapter selection/retention and releases it after login completes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread indra/llwindow/llwindowwin32.cpp Outdated
Comment thread indra/llwindow/llwindowwin32.cpp Outdated
Comment thread indra/llwindow/llwindowwin32.cpp Outdated
Comment thread indra/llwindow/llwindowwin32.h Outdated
Comment thread indra/llwindow/llwindowwin32.h Outdated
Comment thread indra/llwindow/llwindowwin32.cpp
Comment thread indra/llwindow/llwindowwin32.cpp Outdated
Comment thread indra/llwindow/llwindowwin32.cpp Outdated
Comment thread indra/llwindow/llwindowwin32.cpp Outdated
Comment thread indra/llwindow/llwindowwin32.cpp
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread indra/llwindow/llwindowwin32.cpp
Comment thread indra/llwindow/llwindowwin32.cpp
Comment thread indra/llwindow/llwindowwin32.cpp
Comment thread indra/llwindow/llwindowwin32.cpp
Comment thread indra/llwindow/llwindowwin32.cpp
Comment thread indra/llwindow/llwindowwin32.h Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread indra/llwindow/llwindowwin32.cpp
@akleshchev akleshchev marked this pull request as ready for review April 7, 2026 20:22
@akleshchev akleshchev merged commit 130c50c into develop Apr 8, 2026
23 of 24 checks passed
@akleshchev akleshchev deleted the andreyk/5611_gpu branch April 8, 2026 13:47
@github-actions github-actions bot locked and limited conversation to collaborators Apr 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modern GPU and CPU underutilized by viewer, resulting in poor framerate and sometimes freezes

4 participants