Open akien-mga opened 8 months ago
FTR, I have a WIP branch which aims to use the proper EGL extension for device enumeration (thanks to the work of @hpvb). It's potentially riskier as we can't fork like we used to with the DRI_PRIME
stuff, but a mesa folk guaranteed us that it shouldn't be an issue.
Edit: For some mystical reason I completely missed that you already reported hpvb's work in the OP, I'm really sorry for repeating what you said :sweat_smile:. That said, I'm carrying the rest of the work by integrating it in the engine based on the probing code built by them.
Tested versions
System information
Fedora Linux 39 (KDE Plasma) - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 7600M XT (RADV NAVI33) () - AMD Ryzen 7 7840HS w/ Radeon 780M Graphics (16 Threads)
Issue description
When running the Godot project manager with the Wayland driver and the GL compatibility backend, the following warnings are printed:
See https://github.com/godotengine/godot/pull/86180#issuecomment-1916479457 and following comments for context.
The current DetectPrimeEGL logic tries all integer values from
DRI_PRIME=0
toDRI_PRIME=3
to see whether more than 2 GPUs may be available, and attempt to pick the best one.Mesa doesn't seem to like running
DRI_PRIME=2
orDRI_PRIME=3
when the GPU devices count is only 2. Maybe it provides a way to query what that GPU devices count is so we don't attempt the ids that aren't supported? It's pretty much Mesa's ownERR_FAIL_INDEX
we need to work around on the calling side ;)Likewise, it seems to complain about
DRI_PRIME=0
. It's a bit weird as we even have a message recommending using it to force using the default device, but apparently that's not correct usage? So with 2 GPUs it's onlyDRI_PRIME=1
to pick the second one, and no env variable to pick the first? Seems pretty weird.All in all a pretty low priority issue, but silencing those warnings would be nice.
@hpvb has done some work on a better GPU detection for EGL which may solve this issue.
The GLX
detect_prime
doesn't raise warnings as currently it only tests no env var andDRI_PRIME=1
. But if we decide to sync it with the current EGL one to support more than 2 GPUs, we'd have a similar issue.Steps to reproduce
godot --display-driver wayland --rendering-driver opengl3
Minimal reproduction project (MRP)
n/a