Bottles icon indicating copy to clipboard operation
Bottles copied to clipboard

[Request] Add Gallium Nine support to Bottles

Open matheuswillder opened this issue 2 years ago • 8 comments

Is your feature request related to a problem? Please describe. I went a few years without using any Linux distribution, so I'm still slowly discovering how much has been created or improved since then. One thing that caught my attention was the Gallium Nine project which, like DXVK, allows games to run much faster on Wine. But DXVK needs a GPU with Vulkan support, so unfortunately old or integrated GPUs cannot benefit from it.

I still can't get it to work on my system (Debian Stable), I think due to a lower version of Mesa than needed, but I wonder if it would be a good addition to Bottles?

Describe the solution you'd like Add Gallium Nine support to Bottles.

Describe alternatives you've considered I think it's possible to install it manually, but would be easier for users to include it directly in Bottles, as is already done with DXVK.

Additional context It's just a suggestion that might benefit other users who don't have access to Vulkan, but it currently won't benefit me (due to the Mesa requirement I mentioned above).

Edit: Just an explanation, README from the project says that:

Gallium Nine could be used with the new Crocus driver (included since Mesa 21.2) on older Shader model 3.0 aka feature level 9_3 compatible Intel gen4-7 graphics (GMA X3000, GMA 4500, HD 2000-5000; year 2007-2014).

Use the environment variable MESA_LOADER_DRIVER_OVERRIDE=crocus to force using Crocus instead of i965.

All newer Intel iGPU hardware (Broadwell+) is supported through the already working Iris driver.

That's why I said above that I couldn't get it to work on my Debian, which uses a lower version of Mesa. However, it can be used on those who have newer computers even with an older version of Mesa.

matheuswillder avatar Jan 30 '22 15:01 matheuswillder

I remembered there was already an issue on this but I can't find it. I will think about a possible integration. Btw thanks for reporting.

mirkobrombin avatar Jan 30 '22 16:01 mirkobrombin

I did a search before posting but I also couldn't find any related. Anyway, thank you very much for considering the integration and also for maintaining and developing Bottles!

matheuswillder avatar Jan 30 '22 16:01 matheuswillder

I'm trying to build it as a dependency, but there are some problems because I cannot rename files after copying.

tiziodcaio avatar Jun 13 '22 13:06 tiziodcaio

What’s the output?

mirkobrombin avatar Jun 13 '22 14:06 mirkobrombin

Name: galliumnine
Description: Gallium Nine allows to run any Direct3D 9 application with nearly no CPU overhead.
Provider: iXit
License: LGPL2.1
License_url: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
Dependencies: []
Steps:
- action: archive_extract
  file_name: gallium-nine.tar.gz
  url: https://github.com/iXit/wine-nine-standalone/releases/download/v0.8/gallium-nine-standalone-v0.8.tar.gz
  file_checksum: 131703d478b89a314a301181d8b52709
  dest: temp

- action: copy_dll
  url: temp/gallium-nine.tar/gallium-nine-standalone/lib32/
  file_name: d3d9-nine.dll.so
  dest: win32/

- action: copy_dll
  url: temp/gallium-nine.tar/gallium-nine-standalone/lib64/
  file_name: d3d9-nine.dll.so
  dest: win64/

The packager put the ddl.so extension we must change it

tiziodcaio avatar Jun 13 '22 14:06 tiziodcaio

Oh no wait, Gallium should not be managed as a dependency in Bottles but a component. need code editing

mirkobrombin avatar Jun 13 '22 15:06 mirkobrombin

Any progress on this? Since Nine is pretty complete + still getting some level of attention, I would love to try it inside Bottles.

okias avatar Jul 27 '22 20:07 okias

Just to correct what I said above: I said that this could not benefit me due to the Mesa requirement, I found that Flatpak Apps can use a Mesa version independent of the system version, so theoretically any user could benefit from this if added to Bottles. Obviously the developers know this, but here's the fix for other users who might end up reading this.

Also, I installed Debian Unstable just to test Wine with Gallium Nine and the result looks really good, it would be a nice addition if it could come to Bottles, especially now that prices for new CPUs and GPUs are still very spensive everywhere.

matheuswillder avatar Aug 20 '22 13:08 matheuswillder

I'm currently installing Gallium Nine Standalone on my own for some games under the latest WineGE runner, because I'm using an old Intel HD 4000 where DXVK runs but slowly due the poor Vulkan implementation. Results are a mixed bag, but where it works, it mades a good enough uplift from WineD3D, I'm using the flathub stable build.

  • To install Gallium Nine just drop:

    • lib32/d3d9-nine.dll.so to ../windows/syswow64/d3d9-nine.dll.

    • lib64/d3d9-nine.dll.so to ../windows/system32/d3d9-nine.dll.

    • bin64/ninewinecfg.exe.so to ../windows/system32/ninewinecfg.exe.

    • If for some reason you are using a 32-bit prefix do this instead:

      • lib32/d3d9-nine.dll.so to ../windows/system32/d3d9-nine.dll.
      • bin32/d3d9-nine.dll.so to ../windows/system32/ninewinecfg.exe.
  • Then from Bottles open a Command Prompt and call for the ninewinecfg, enable the only possible checkbox and it will be working.

The thing is: once you have enabled Gallium Nine you cannot disable it ever again, the bottle will break forever, anything related to DirectX9 is now faulty without Gallium Nine.

And there's no rule for Gallium9 to work: as examples, for GTA San Andreas everything is fine, faster than WineD3D and more responsive, but the NPCs and CJ are broken; on S.T.A.L.K.E.R. ShoC and GTA IV the game won't work but for The Sims 3 it's a perfect experience (1:1 to native Windows DX9, may be even faster) also Terraria, on WineD3D is terrible but on Gallium9 it becames playable and even faster than native on Windows 10 (on my particular HW).

My opinion may be biased but it will be interesting to at least have the option to try for Gallium9 in Bottles, just made it clear it's somewhat problematic and probably not worth trying for anyone having an Intel HD 4600+ or AMD HD 7700+ in it's current form.


Another suggestion, not related to Gallium Nine itself but to Gallium3D, it would be useful to have on Settings an easy toggle for what's the GALLIUM_HUD environment variable and list of some templates (see GALLIUM_HUD=help glxgears), is crazy how many things it can do and it's there out of the box for Gallium9 and WineD3D but not for Vulkan, I normaly use it with simple,fps, I find it more convenient that to be fighting for Bottles to use MangoHUD (I gave up on that).

SoyIago avatar Oct 07 '22 20:10 SoyIago

@SoyIago If you could report broken games into https://gitlab.freedesktop.org/mesa/mesa/-/issues/ it would be amazing (best possibly with the trace). Thank you for the HOWTO for Bottles!

okias avatar Oct 09 '22 16:10 okias