Hello @9Strike, you can set env variables with ENV_VAR=1 %command% in the game's launch options.
Hi @kisak-valve
this is not what this is about. Adding DRI_PRIME=1 to the launch option doesn't change anything, because the game has no built in DRI functionality obviously. Its about adding this functionality to proton specifically to cast the game/wine render commands to the second GPU.
It feels like there's something conceptually wrong here. No application should be using the DRI infrastructure directly, only the userspace side of the driver stack. What you're describing is very similar to #65 in nature, in as far as all vulkan drivers are not listening to env variables that are used to prefer a video card with the opengl side of the graphics stack.
If you testing a game which is using dxvk, then there's some info at https://github.com/doitsujin/dxvk/issues/376 along these lines.
Ok I didn't know that's not a userspace thing. Thanks for the explanation and links.
So you may heard of the Linux Direct Rendering Interface (DRI). Its basically an interface to get a non-output GPU render an image which is displayed with the primary GPU. Here is some more information: https://en.wikipedia.org/wiki/Direct_Rendering_Infrastructure
Why should this be added?
I have a "Nvidia Optimus"-Laptop, which means that my primary GPU is an Intel iGPU, but there is a more powerful discrete GPU for Games. Because its an Laptop and it has a battery, you don't want the discrete GPU set to your primary GPU. Some applications, like glxinfo, will check for an DRI_PRIME variable. If its set to 1, it will use the Nvidia GPU, if its 0 (default), it will use the Intel GPU. You can read more about this behavior here: https://nouveau.freedesktop.org/wiki/Optimus/
It would be nice to set variables like this directly per game in steam, so you can decide which game (that uses Proton) should use which GPU.