Wine doesn't use the right version of Mesa

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
SupermanLeRetour
Level 1
Level 1
Posts: 5
Joined: Fri Jun 22, 2018 4:44 am

Wine doesn't use the right version of Mesa

Post by SupermanLeRetour »

Hello,

I'm trying to run Path of Exile on Wine but I'm having issue with Mesa drivers. When I run the game on integrated graphics, it works fine but of course the performance are terrible. When I run it on my graphics card (Radeon HD 7690M XT), I have shaders issues :
EE ../../../../../src/gallium/drivers/r600/r600_state_common.c:799 r600_shader_select - Failed to build shader variant (type=1) -1
EE ../../../../../src/gallium/drivers/r600/r600_shader.c:183 r600_pipe_shader_create - translation from TGSI failed !
When I activate logging, I see that Wine uses an old version on Mesa :
002e:trace:wgl:X11DRV_WineGL_InitOpenglInfo GL version : 3.0 Mesa 13.0.6.
002e:trace:wgl:X11DRV_WineGL_InitOpenglInfo GL renderer : Gallium 0.4 on AMD TURKS (DRM 2.49.0 / 4.9.0-6-amd64, LLVM 3.9.1).
002e:trace:wgl:X11DRV_WineGL_InitOpenglInfo GLX version : 1.4.
002e:trace:wgl:X11DRV_WineGL_InitOpenglInfo Server GLX version : 1.4.
002e:trace:wgl:X11DRV_WineGL_InitOpenglInfo Server GLX vendor: : SGI.
002e:trace:wgl:X11DRV_WineGL_InitOpenglInfo Client GLX version : 1.4.
002e:trace:wgl:X11DRV_WineGL_InitOpenglInfo Client GLX vendor: : Mesa Project and SGI.
002e:trace:wgl:X11DRV_WineGL_InitOpenglInfo Direct rendering enabled: True
"Mesa 13.0.6"

So I upgraded Mesa by building it myself (yay outdated Debian repositories), and now when I run glxinfo | grep OpenGL (with or without DRI_PRIME=1), I shows the newer version of Mesa :
OpenGL vendor string: X.Org
OpenGL renderer string: AMD TURKS (DRM 2.49.0 / 4.9.0-6-amd64)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.2.0-devel (git-a2790b134a)
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 18.2.0-devel (git-a2790b134a)
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.2.0-devel (git-a2790b134a)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
Here we can see Mesa 18.2.0

I think running wine with this newer version would maybe fix the shaders issues that I have, but I don't know how to tell wine to use Mesa 18 !

Could somebody help me ?

Thank you very much !
SupermanLeRetour
Level 1
Level 1
Posts: 5
Joined: Fri Jun 22, 2018 4:44 am

Re: Wine doesn't use the right version of Mesa

Post by SupermanLeRetour »

I can't find how to edit the original post so I will quickly add here that I use Wine 3.10 Staging.
SupermanLeRetour
Level 1
Level 1
Posts: 5
Joined: Fri Jun 22, 2018 4:44 am

Re: Wine doesn't use the right version of Mesa

Post by SupermanLeRetour »

Ok, after a few more digging, it appears Wine is using Mesa libs from /usr/lib/i389-linux-gnu... But when I compile Mesa, I generate 64 bits builds I guess, that go into /usr/lib/ and /usr/lib/x86_64-linux-gnu.

Is there a way to tell Wine to use the other variants ? I try LIBGL_DRIVERS_PATH=mypath without success. And I don't know how to build Mesa for i386 32 bits.
User avatar
DarkShadow44
Level 8
Level 8
Posts: 1207
Joined: Tue Nov 22, 2016 5:39 pm

Re: Wine doesn't use the right version of Mesa

Post by DarkShadow44 »

There should be nothing to "tell wine", it simply uses what's available. Do you get exactly the same shader error with modern mesa?
SupermanLeRetour
Level 1
Level 1
Posts: 5
Joined: Fri Jun 22, 2018 4:44 am

Re: Wine doesn't use the right version of Mesa

Post by SupermanLeRetour »

Ok so I don't know if this message will ever be visible but anyway :


The issue was that Debian Stretch includes an outdated version of Mesa (13.something) which has some bugs. So to play games like Path Of Exile in Wine correctly, a newer version is needed (at least 17.something). I had two choices, the first being to compile Mesa myself. That's what I tried, but configuring the build is quite complicated and I ended up with a 64bits build of Mesa. But Wine uses a 32 bits one located in /usr/lib/i386-linux-gnu/, when mine were 64 bits placed in /usr/lib/ or /usr/lib/x86_64-linux-gnu. I couldn't find how to compile Mesa for a 32 bits target.

So I had another solution, which in my opinion is not really recommended : I upgraded my Debian from Stretch (the stable release) to Buster, the current testing version of Debian. Buster comes with Mesa 18, already compiled and placed where it needs to be.
While I believe Buster is mostly safe to use, being a testing release may bring unstability to the system.
If somebody has the same issue as me and can't find how to compile Mesa for 32 bits or how to pull only Mesa from testing or unstable, you just have to change your /etc/apt/sources.list and replace every occurrence of "stretch" or "stable" with "buster". Then apt update, apt dist-upgrade and it should work. But please document yourself on what using a testing dist involves !
Hark1medes
Level 1
Level 1
Posts: 8
Joined: Sun Apr 22, 2018 10:55 am

Re: Wine doesn't use the right version of Mesa

Post by Hark1medes »

Hi Superman, while they make no guarantees, I've heard even Debian Unstable is a relatively smooth experience.

Just for future reference though, if you prefer Debian Stable but ever want to cherry-pick one or two newer packages, that's precisely what the Backports repo is intended for:
https://backports.debian.org/

At this point, so long as Buster keeps working for you, I wouldn't worry about it. If you do decide to go back to Stretch though, enabling the Backports repo should also let you grab the newer version of mesa:
https://packages.debian.org/search?keyw ... -backports
Hark1medes
Level 1
Level 1
Posts: 8
Joined: Sun Apr 22, 2018 10:55 am

Re: Wine doesn't use the right version of Mesa

Post by Hark1medes »

Sorry, blanked out for a minute; Buster is Testing, not Unstable (doh)

The main point's the same though. If you ever want to use Stable with a few Testing packages mixed in, checking if a backported version is available first isn't a bad way to go.
SupermanLeRetour
Level 1
Level 1
Posts: 5
Joined: Fri Jun 22, 2018 4:44 am

Re: Wine doesn't use the right version of Mesa

Post by SupermanLeRetour »

Hello !

Thank you for this, I didn't know it existed ! I'll definitely keep this in mind the next time I run into issues like this.

For now I will stay on the testing version. I don't need to go as far as unstable, and so far I didn't run into any issues.

Thanks for your input !
Locked