Skip to content

feat: Windows GPU detection through DXGI adapter enumeration #942

Closed

Description

@zackees

Context

rust/obs-gpu-status/src/platform/mod.rs detects GPUs on non-Linux hosts with nvidia-smi only. A Windows machine with only AMD or Intel graphics that falls back to Microsoft Basic Render Driver therefore detects no GPU and shows red ("No GPU was detected"), when it should show yellow ("Your GPU (...) was detected, but OBS is not using its driver").

Proposal

On Windows, enumerate adapters with IDXGIFactory1::EnumAdapters1. Keep hardware adapters (skip DXGI_ADAPTER_FLAG_SOFTWARE and vendor 0x1414), map their PCI VendorId/DeviceId to GpuDevice, and merge them with nvidia-smi results through merge_devices. The code lives in src/platform/windows.rs, behind the existing cfg_select!.

Acceptance criteria

  • RED: a Tier 1 test of a pure devices_from_dxgi(&[AdapterDesc]) mapper fails on stubs. It covers an AMD adapter, an Intel adapter, a WARP/software adapter (excluded) and Microsoft Basic Render (excluded).
  • GREEN: the tests pass; soldr cargo clippy passes for x86_64-pc-windows-msvc.
  • The Windows smoke step from the sibling issue lists the runner's adapters in detectedGpus, if any.

Decisions

  • Use the windows crate's DXGI bindings, pinned in [workspace.dependencies], rather than hand-written FFI.
  • macOS (IOKit / Metal device enumeration) is a separate follow-up. Macs rarely fall back to software rendering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions