[Windows] Try reading GPU driver information directly from registry.#109346
[Windows] Try reading GPU driver information directly from registry.#109346Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
Calinou
left a comment
There was a problem hiding this comment.
Tested locally on wine-staging 10.12 using the MRP linked in #109344, it works as expected. Code looks good to me.
Before
The line in the middle is a WINE debug print showing an error.
Getting driver information...
02c0:err:ole:com_get_class_object apartment not initialised
Driver: <null> <null>
After
Getting driver information...
Driver: NVIDIA GeForce RTX 5090 32.0.15.6094
It works with llvmpipe too (--gpu-index 1):
Getting driver information...
Driver: llvmpipe (LLVM 20.1.6, 256 bits) 31.0.10.1000
|
I wonder if this should be considered fixing a bug and be merged for 4.5 |
Maybe, my only concern it is not tested on a lot of hardware, but there's still fallback to the old code, so it's probably OK. |
I agree, it would be nice to get more testing with this. If we are very happy with it, we can always cherry pick for 4.5.1 |
|
Thanks! |
|
Cherry-picked to 4.5 |
|
Cherry-picked to 4.4 |
Fixes #109317
Reading registry is significantly faster (200-700 usec) than WMI (700000-1900000 usec). It returns the same value on all systems I have tested (NVIDIA and AMD GPUs), and might be more reliable (returns reasonable results on Wine, while WMI doesn't).