MangoHud
MangoHud copied to clipboard
refactor gpu detection
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