Repository navigation
obs-gpu-status: Detect Windows GPUs through DXGI (#942) - #958
Merged
Merged
Conversation
zackees
enabled auto-merge
October 16, 2026 01:37
3 tasks
zackees
force-pushed
the
feat/942-dxgi-gpus
branch
from
October 16, 2026 02:20
ff6bc11 to
2726f47
Compare
…XGI (RED) On Windows only nvidia-smi finds GPUs, so an AMD- or Intel-only machine on Microsoft Basic Render Driver shows red instead of yellow. Refs #942
devices_from_dxgi() keeps hardware adapters from known vendors and drops software and Microsoft adapters (Basic Render Driver, Hyper-V video). platform::windows enumerates them with CreateDXGIFactory1, EnumAdapters1 and GetDesc1; the results merge with nvidia-smi. An AMD- or Intel-only machine on Basic Render Driver is now yellow, not red. Fixes #942
merge_devices only merged into unnamed entries, and DXGI names every GPU, so on Windows nvidia-smi added each NVIDIA GPU a second time. Match on vendor and device ID; a match fills in a missing name. Also assert DXGI_ADAPTER_DESC1's size (312 bytes on 64-bit) at compile time. Refs #942
zackees
force-pushed
the
feat/942-dxgi-gpus
branch
from
October 16, 2026 04:12
2726f47 to
86e23a3
Compare
Member
Author
|
Review fix: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #942 (part of #939).
On Windows only
nvidia-smifound GPUs. An AMD- or Intel-only machine that fell back toMicrosoft Basic Render Drivertherefore detected no GPU and showed red, when it should show yellow ("your GPU was detected, but OBS is not using its driver").Change
dxgi::devices_from_dxgi()(pure, tested on every host): keeps hardware adapters from NVIDIA, AMD and Intel, and dropsDXGI_ADAPTER_FLAG_SOFTWAREadapters and Microsoft's vendor0x1414(Basic Render Driver, Hyper-V video). Trailing NULs and spaces are trimmed from names.platform::windows::dxgi_adapters():CreateDXGIFactory1→EnumAdapters1→GetDesc1, called through the COM vtables. This is about 60 lines, behind the crate'scfg_select!boundary. The workspace only haswindows-sys, which has no COM vtables, so no new dependency was added. The results are merged withnvidia-smi.RED → GREEN
Add failing tests for Windows GPU detection through DXGI): 4 tests fail ontodo!(), includingamd_only_machine_on_basic_render_is_yellow_not_red.obs-gpu-statustests pass. Clippy and the Dylints are clean on the host and forx86_64-pc-windows-msvc.system_probe_does_not_paniccallssystem_devices(), and so the real DXGI enumeration, in theRust Tests (windows-2025-vs2026)job.