MangoHud icon indicating copy to clipboard operation
MangoHud copied to clipboard

refactor gpu detection

Open 17314642 opened this issue 7 months ago • 0 comments

Also fixes #1693

I'm suggesting to not rely on vendor id anymore since we know vendor by querying driver name. Device id is still needed because it is used in amdgpu.cpp to distinguish steam deck.

For example, different mali gpus all have different vendor ids:

Example 1 (https://github.com/Oblomov/clinfo/issues/46):

Number of devices                                 1
  Device Name                                     Mali-G71
  Device Vendor                                   ARM
  Device Vendor ID                                0x60a00002

Example 2 (https://github.com/termux/termux-packages/issues/13821):

Number of devices                                 1
  Device Name                                     Mali-G610 MC6 r0p0
  Device Vendor                                   ARM
  Device Vendor ID                                0xa8670000

Example 3 (https://magazine.odroid.com/article/clinfo-compiling-the-essential-opencl-gpu-tuning-utility-for-the-odroid-xu4/):

Number of devices 2
Device Name Mali-T628
Device Vendor ARM
Device Vendor ID 0x6200010

17314642 avatar May 31 '25 20:05 17314642