Skip to content

Add Discrete key

Jan requested to merge Jan200101/switcheroo-control:PR/discrete-key into master

Implements #39

Some notes:

  • amdgpu implementation relies on libdrm_amdgpu
    • Checks for a discrete GPU the same way as Mesa
  • Nouveau implement queries the device through libdrm to get the relevant platform
    • In this PR the proprietary Nvidia Drivers are hardcoded as discrete, in the future a proper implementation could be made.
  • No Intel implementation at the moment
    • libdrm_i915 does not appear to have any logic for querying Xe GPUs yet
    • Mesa implements support for this, but statically vendors all of the code, not feasible to copy without a lot of extra code.
    • Intel has a publicly available list of hardware ID's, a list could be made with all known discrete GPUs https://dgpu-docs.intel.com/devices/hardware-table.html
Edited by Jan

Merge request reports