Bug 22412 - Vulkan loader and validation layers, to enable playing games like DOOM (2016) and Wolfenstein II with wine.
Summary: Vulkan loader and validation layers, to enable playing games like DOOM (2016)...
Alias: None
Product: Mageia
Classification: Unclassified
Component: New RPM package request (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: High normal
Target Milestone: ---
Assignee: Rémi Verschelde
QA Contact:
URL: https://github.com/KhronosGroup
: 23149 23747 (view as bug list)
Depends on:
Reported: 2018-01-17 18:38 CET by Christian Fesl
Modified: 2018-12-11 18:28 CET (History)
4 users (show)

See Also:
Source RPM:
Status comment:

Vulkan SPEC files. (2.53 KB, application/x-compressed-tar)
2018-12-09 19:22 CET, Alan Richter
SPECs and Patches for vulkan (3.26 KB, application/octet-stream)
2018-12-09 19:35 CET, Alan Richter
wine.spec with --with-vulkan and with -d3d9. (28.29 KB, text/x-matlab)
2018-12-11 05:18 CET, Alan Richter

Description Christian Fesl 2018-01-17 18:38:21 CET
Description of problem:

I want to play DOOM (2016) and Wolfenstein II with wine.
Wine (2.21 staging) compilation with the necessary patches also works flawlessly. But if I want to play under Vulkan I get the following error message:

"error while loading shared libraries: libvulkan.so.1: cannot open shared object file: No such file or directory"

A Mageia version from the Fedora package [vulkan-](https://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/source/tree/Packages/v/vulkan- would be nice (which includes libvulkan.so.1)

Unfortunately, my RPM SPEC skills are not good enough to write it my self.

How reproducible:

Steps to Reproduce:
Start a program which uses libvulkan.so (games under wine or demos from the Vulkan SDK)
Comment 1 Marja Van Waes 2018-01-18 07:56:41 CET
@ Akien

I just saw you here

>  akien-mga Linux: Fix name of embedded libvulkan.so

Am I missing something, should Christian already be able to play his games without anything new being packaged??

CC: (none) => marja11, rverschelde

Comment 2 Christian Fesl 2018-01-18 19:42:35 CET
> Am I missing something


There is no Mageia package that contains lib64vulkan.so and in your link I can't find a file or a package. 

With this package (complete Vulkan SDK) it works (I can play games) but that is overkill.


We only need the Vulkan loader and validation layers to run games.


This package from the ROSA repositories is quite enough to get Vulkan to work.


Of course you can not compile any Vulkan applications with the Vulkan loader and validation but that's okay for me because I only want to play and not to compile!
Comment 3 Marja Van Waes 2018-01-18 20:43:31 CET
(In reply to Christian Fesl from comment #2)
> > Am I missing something
> Yes
> There is no Mageia package that contains lib64vulkan.so and in your link I
> can't find a file or a package. 

The question and the link weren't for you, but for Akien. It puzzled me that his commit fixed a similar error as you had seen
> ./bin/bloom: error while loading shared libraries: libvulkan.so.1: cannot
> open shared object file: No such file or directory
and that he uses the nick akien-mga, which sounds to me that he wears his Mageia hat there. He is our main games packager.

Anyway, assigning this package request to all packagers collectively. On a voluntary basis, one of them might, if there are no license or other legal issues, want to integrate it to the distribution and maintain it for bug and security fixes.

You might also want to join the packager team to maintain this piece of software: see https://wiki.mageia.org/en/Becoming_a_Mageia_Packager

(Setting version to Cauldron, because new packages need to be built for Cauldron first. Once it's there, this bug report can be reopened as a request to backport the package to stable.)

Version: 6 => Cauldron
Summary: Vulkan loader and validation layers => Vulkan loader and validation layers, to enable playing games like DOOM (2016) and Wolfenstein II with wine.
Assignee: bugsquad => pkg-bugs

Comment 4 Marja Van Waes 2018-06-08 22:18:43 CEST
*** Bug 23149 has been marked as a duplicate of this bug. ***

CC: (none) => arichter

Comment 5 Alan Richter 2018-06-09 18:29:08 CEST
The Fedora 29 libVulkan packages are also sufficient to link programs and rebuild wine with vulkan support.  (add --with-vulkan to the wine spec file)  You will be able to play DOOM 2016 with a radeon card but the older wolfenstein games (the old blood and the new order) require a level of OpenGL that is not present in mesa 18.1.1.  You CAN play the older Wolfenstein games as well as DOOM 2016 using an nVidia card and the OpenGL renderer.
Comment 6 Alan Richter 2018-09-13 22:44:20 CEST
I have been able to build Vulkan SRPMs that build and work for i586 and x86_64, I have not tried them for ARM.

I would like to submit the SRPMs for consideration into Cauldron but at present I don't have the time to become a maintainer, although I would like to become one in the future. 

The titles to my SRPMs are:


The contents of the SPRMs are pretty much the .tar.xz file from Khronos and the SPEC files.  

These SRPMs build successfully on plain-vanilla, patched Mageia 6. 

These files are sufficient to build wine with the "--with-vulkan" configuration line allowing DOOM_2016 to run with the Vulkan renderer.  They also allows DXVK (https://github.com/doitsujin/dxvk/releases) libraries to be compiled and used under wine.
Comment 7 Rémi Verschelde 2018-10-22 20:24:57 CEST
Thanks for working on this Alan, I'll review it and see how to include all this into Cauldron, and eventually as an update to Mageia 6.

Assignee: pkg-bugs => rverschelde

Comment 8 Rémi Verschelde 2018-10-22 20:25:57 CEST
Raising severity as the lack of those packages actually means that many Vulkan programs can't be run at all even though the hardware would support it.

Severity: enhancement => normal

Comment 9 Marja Van Waes 2018-10-22 20:30:53 CEST
*** Bug 23747 has been marked as a duplicate of this bug. ***

CC: (none) => joselp

Comment 10 Alan Richter 2018-12-09 19:22:53 CET
Created attachment 10541 [details]
Vulkan SPEC files.

First, congratulations on MGA 7, I've been running cauldron for a couple of months and it's wonderful, thank you for all your work.  

Second and back on topic, I can't emphasize enough the importance of having the Vulkan SDK available for Mageia.  Even though Mageia Mesa has the libvulkan_radeon and libvulkan_intel portions of mesa which allows Steam for Linux to run vulkan titles, the absence of the SDK prevents wine from being compiled with --with-vulkan and prevents windows vulkan titles and titles that use DXVK from running.  

You'll need the following files:


wget the above files into ~/rpmbuild/SOURCES 
build vulkan-headers, and install 
build vulkan-loader and install vulkan-loader and vulkan-loader-devel
build glslang and install glslang 
build vulkan-tools and install vulkan-tools. 

When I say build, I man "rpmbuild -ba xxxx.spec". 

vulkan loader will need to be built for i586 for x86_64 systems. 

Everything builds and works on both x86_64 and i586 although I will admit that my SPECs are pretty shoddy.  

If you've made it this far, thank you and most of all, thank you for your brilliant work on Mageia 7, I've got an AMD Raven Ridge based system and Mageia 7 runs beautifully on it which is something other distros can't boast.
Comment 11 Alan Richter 2018-12-09 19:35:53 CET
Created attachment 10542 [details]
SPECs and Patches for vulkan

I missed some glsl patches in the SOURCE directory.  It should be possible to un-tar the tgz file wget the sources and build everything.
Comment 12 Rémi Verschelde 2018-12-10 08:41:39 CET
Thanks for the reminder (and your great packaging work) Alan, I'll have a closer look at it today.
Rémi Verschelde 2018-12-10 08:41:44 CET

Priority: Normal => High

Comment 13 Rémi Verschelde 2018-12-10 15:19:39 CET
I've imported a first batch, taking the time to properly adapt them to Mageia policies and contribute fixes upstream (glslang really needed some love, and still does).

So, available in Cauldron for now:


(SPIRV-Headers and SPIRV-Tools were needed for proper HLSL support in glslang.)

I'll probably start on the Vulkan stack tomorrow, already spent quite a few hours on glslang packaging (and some preparatory work in Mesa to prevent the conflict with its existing lib64vulkan-devel).
Rémi Verschelde 2018-12-10 15:19:45 CET


Comment 14 Alan Richter 2018-12-10 16:10:25 CET
Thank you Rémi, I only sent enough along to get libvulkan.so and lib64vulkan.so and for vulkan-cube to work.  However, you are doing it right and are keeping up the high standards Mageia stands for.  

Once the Vulkan SDK is in the repository, perhaps wine can be built with the --with-vulkan flag enabling vulkan games to be played in wine as well as enabling DXVK which to is becoming a very big thing. Even with the minimal stuff I sent along, it's possible to build DXVK from source and it works quite well in cauldron. 

Thank you again for adding Vulkan SDK to Mageia, and thank you for doing it right.
Comment 15 Rémi Verschelde 2018-12-10 23:20:04 CET
Now built the following:

vulkan-loader- (also fixing broken ASM support in CMake buildsystem)

And I rebuilt mesa to rename lib(64)vulkan_intel and lib(64)vulkan_radeon into a common lib(64)mesavulkan-drivers, and lib(64)vulkan-devel into lib(64)mesavulkan-devel (to avoid confusion with the Vulkan SDK).

I'll have a look at Wine tomorrow once the above have built successfully against all Mageia arches.
Comment 16 Alan Richter 2018-12-11 05:18:49 CET
Created attachment 10547 [details]
wine.spec with --with-vulkan and with -d3d9.

Rémi, your RPMS are delicious, great work and thanks for making it look so easy, you're quite amazing for getting so much put together so quickly.  

I tried the wine 4.0-1.RC1 binaries but they didn't work, not surprisingly.  I did a diff on the wine.spec files and the "--with-vulkan" is missing from "configure2_5x":
I am attaching my vulgarly hacked wine.spec file which also includes the d3d9 patch set which does wonders for games like singularity and bioshock2.


The key here is "--with-vulkan" and can be tested by installing the Vulkan SDK for Windows: 
And running wine vkcube.ex in the Bin and the Bin32 directories.  

At present, obviously, I'm running wine 3.21 because the d3d9 patches haven't been released yet. 

I'm no .spec guy but if the hooks for d3d9 could get into wine for Mageia, that would certainly be a feather in Mageia's cap.  

Thank you again for all your hard work, you sure made what you did look easy but I'm sure it was still a challenge.  

Seeing Vulkan in the Mageia repositories has completely made my day and I'm thrilled to see it part of my favorite Linux distribution.
Comment 17 Rémi Verschelde 2018-12-11 08:53:45 CET
Thanks for your spec, I'll look into it now. Normally --with-vulkan is the default so it should not need to be specified manually as long as `pkgconfig(vulkan)`, but I'll double check.

I'll look into d3d9, I also plan to package vkd3d which wine can use too. Not sure if dxvk is easy to plug in to the current wine or if it needs a specific patchset.
Comment 18 Rémi Verschelde 2018-12-11 12:54:53 CET
Had to do some work to fix libification of spirv-tools, glslang and vulkan-validation-layers to ensure that their lib and devel packages have the characteristics we need in Mageia.

Then packaged vkd3d-1.1-1.mga7, and rebuilt wine-4.0-1.rc1.2.mga7 against the Vulkan loader library and vkd3d (+ ffmpeg while at it).
Vulkan should now work properly with Wine. Note that for Intel/AMD, you may have to install lib64mesavulkan-drivers manually.

I left out the d3d9 patches for now. Wine Staging is cutting-edge enough for Mageia releases, and if Wine devs decided not to integrate d3d9 in Staging, I won't try to be smarter :)
Lutris already handles pretty well the needs for more specialized Wine versions needed by some applications.

Full list of new/updated packages:


Closing as fixed, but please keep giving feedback here as you test the new packages to ensure that everything works as expected.

Thanks again for doing the initial packaging work, between Fedora packages and your edits this simplified my work a lot.

Resolution: (none) => FIXED

Comment 19 Rémi Verschelde 2018-12-11 13:56:25 CET
Had some buildsystem mishaps so some of those packages have newer builds:

Comment 20 Alan Richter 2018-12-11 18:24:14 CET
I ran vkcube.exe with both the 32 bit and 64 bit with the wine-4.0-1.rc1.3.mga7 using the official Mageia vulkan and mesa RPMS and both worked properly.  

I rebuilt DXVK 0.93 using the official Mageia packages and it built correcly, however I still had to use my RPMS since DXVK requires mingw-winpthreads-6.0 and Cauldron currently has mingw-winpthreads-5.0.2.  

I had to rebuild mingw-crt, mingw-headers, and mingw-winpthreads with mingw-w64-v6.0.0.tar.bz2.  Fortunately all three used the same ".bz2" file so it was pretty easy.

I finally ran up Win-Steam with wine-4.0.1 with the DXVK libraries and ran prey2017, the game came up and the DXVK_HUD displayed the right stuff so I would definitely say this ticket is closed unless you feel like repackaging mingw with 6.0?  

I agree with you regarding d3d9, some games it helps, some games it hurts and it adds more complexity to wine; besides it'll give me an excuse to recompile my own wine when I want to play with d3d9. 

Thank you for doing all this, I hope it was a fun couple of days because it took me a lot longer to figure out my small portion than it took you to do all correctly.
Comment 21 Rémi Verschelde 2018-12-11 18:28:50 CET
Thanks for the tests!

Updating MinGW would be a good idea, could you open another bug report about it to share your spec updates? I'll have a look at it.

Note You need to log in before you can comment on or make changes to this bug.