Every article tag can be clicked to get a list of all articles in that category. Every article tag also has an RSS feed! You can customize an RSS feed too!
We do often include affiliate links to earn us some pennies. See more here.
Divinity: Original Sin [Official Site] is one game that the stable open source Mesa drivers currently cannot run without hacks, but it looks like the Mesa team has been testing it.

Just today a commit was sent in to Mesa which mentioned "drirc: Allow extension midshader for Divinity: Original Sin (EE)". It's interesting to see game-specific changes like this, as some games will sadly need them.

You can see the commit here, which has already landed in Mesa-git. You can see the actual bug report about it here.

Hopefully with this patch landed, it means more people can enjoy another highly rated Linux-native game on open source drivers. It might still need other hacks to run, as previously it needed more than one change.

While this is only changing a config file to have this game-specific change in by default, it's still nice that users don't have to look up what to do to get it working.

I cannot test it personally, as I don't have an AMD card to test with. Article taken from GamingOnLinux.com.
5 Likes
About the author -
author picture
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly checked on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly. You can also follow my personal adventures on Bluesky.
See more from me
The comments on this article are closed.
All posts need to follow our rules. For users logged in: please hit the Report Flag icon on any post that breaks the rules or contains illegal / harmful content. Guest readers can email us for any issues.
48 comments
Page: «3/3
  Go to:

Shmerl Jan 9, 2017
In any case, I don't see the harm in them requiring adherence to standard practices, like the XDG directory spec.

I fully agree here. I meant mostly that it shouldn't become a programmatic dependency, like games needing to use some Steam specific APIs and such.
Colombo Jan 9, 2017
Just to clarify:
You can play Divinity: Original Sin right now with stable Mesa, and you don't need any patches to mesa to get it running.
[...]
Thank you very much! The game runs very fine now! Is there a way to make the game starting directly from Steam with the Hack applied? Obviously the Multiplayer won't work like this.

Why won't Multiplayer work like this?

You can run it from steam without problem, steam runs the runner.sh (or whatever), so if you just put all the code into runner.sh, you are good.
cRaZy-bisCuiT Jan 10, 2017
Thanks for the guide below. Please do allow me to adjust it a bit so online gaming will be possible - obviously it won't work without being started by Steam - Steam runtime need to be up and running.

All you need is to set the environment variable allow_glsl_extension_directive_midshader=true, and you'll need to LD_PRELOAD the preload-shim linked in the upstream bug report (link.

Step by step guide:
1) Download the source for the LD_PRELOAD shim
2) Compile it using the command given inside the just downloaded patch file. This will give you a divos-hack.so file.
gcc -s -O2 -shared -fPIC -o divos-hack.{so,c} -ldl
3) Copy the just created divos-hack.so file to your Divinity: Original Sin game folder (the subfolder called game, within the install path)
4) Right click on the game in the Steam Library, choose "Properties" -> "SET LAUNCH OPTIONS..." and enter the Following:

allow_glsl_extension_directive_midshader=true LD_PRELOAD="divos-hack.so" %command%


Just to clarify:
You can play Divinity: Original Sin right now with stable Mesa, and you don't need any patches to mesa to get it running.
All you need is to set the environment variable allow_glsl_extension_directive_midshader=true, and you'll need to LD_PRELOAD the preload-shim linked in the upstream bug report (link.

Step by step guide:
1) Download the source for the LD_PRELOAD shim
2) Compile it using the command given inside the just downloaded patch file. This will give you a divos-hack.so file.
gcc -s -O2 -shared -fPIC -o divos-hack.{so,c} -ldl
3) Copy the just created divos-hack.so file to your Divinity: Original Sin game folder (the subfolder called game, within the install path)
4) now, from said game folder, run Divinity using the following command:
allow_glsl_extension_directive_midshader=true LD_PRELOAD="divos-hack.so" ./runner.sh


Last edited by cRaZy-bisCuiT on 12 January 2017 at 12:01 am UTC
cRaZy-bisCuiT Jan 10, 2017
[quote=Colombo][quote=cRaZy-bisCuiT]
Just to clarify:
Why won't Multiplayer work like this?

You can run it from steam without problem, steam runs the runner.sh (or whatever), so if you just put all the code into runner.sh, you are good.
Thanks, that would work as well! I just added another possible solution above.
MayeulC Jan 11, 2017
allow_glsl_extension_directive_midshader=true LD_PRELOAD="divos-hack.so" ./runner.sh %command%

I didn't try, but I think that ./runner.sh is redundant here (or could prevent the game from being launched, actually).

I also generally avoid changing the game's files, in case they get updated by Steam, so I would advise against modifying runner.sh :)
soulsource Jan 11, 2017
Ah, right. I didn't think about Steam, as I bought Divinity:OS at GoG.
For Steam you'll need to preserve the original LD_PRELOAD variable, as Steam also sets it (for the Steam Overlay, for instance).
I think the correct launch options should be:
allow_glsl_extension_directive_midshader=true LD_PRELOAD="divos-hack.so:$LD_PRELOAD" %command%
It might be necessary to give the full path to divos-hack.so in case Steam runs the program from a different folder.

Thanks for bringing this up, I'll edit my original post.
Al3s Jan 11, 2017
Thanks to all. The game is working flawless with your help
cRaZy-bisCuiT Jan 12, 2017
allow_glsl_extension_directive_midshader=true LD_PRELOAD="divos-hack.so" ./runner.sh %command%

I didn't try, but I think that ./runner.sh is redundant here (or could prevent the game from being launched, actually).

I also generally avoid changing the game's files, in case they get updated by Steam, so I would advise against modifying runner.sh :)
Sorry, that was a typo. I did correct that one. :)
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
The comments on this article are closed.