support Vulkan

This commit is contained in:
Andy 2018-12-22 12:06:08 +01:00
parent 9791c40ddb
commit 1374c06957
Signed by: arno
GPG Key ID: 9076D5E6B31AE99C
4 changed files with 87 additions and 5 deletions

View File

@ -44,6 +44,25 @@ RUN apt-get -y install libnm-glib4:i386 libnm-util2:i386
# https://github.com/ValveSoftware/steam-for-linux/issues/3307
RUN apt-get -y install fontconfig:i386
# Enable Vulkan library.
# DXVK is a Vulkan-based compatibility layer for Direct3D 11.
# It allows running 3D applications on Linux using Wine.
# To fully leverage the DXVK, you need the following:
# 1. Vulkan library installed;
# 2. Capable GPU that supports Vulkan;
# 3. Latest GPU drivers which support Vulkan;
#
# $ cat /home/user/.local/share/Steam/steamapps/common/Proton\ 3.16/dist/lib64/wine/dxvk/version
# 60a03a29599bf1f8c73efdbcf288e91ef261bc58 dxvk (v0.90-10-g60a03a2)
#
# https://developer.nvidia.com/vulkan-driver
# https://en.wikipedia.org/wiki/Vulkan_(API)#Compatibility
# https://github.com/lutris/lutris/wiki/How-to:-DXVK
# https://github.com/doitsujin/dxvk/wiki/Driver-support
# https://www.protondb.com
# https://lutris.net
RUN apt-get -y install libvulkan1 libvulkan1:i386 vulkan-utils
LABEL maintainer="Andrey Arapov <andrey.arapov@nixaid.com>"
COPY ./launch /launch
ENTRYPOINT [ "/bin/bash", "/launch" ]

View File

@ -1,6 +1,6 @@
NS ?= andrey01
NAME ?= steam
VERSION ?= 0.1
VERSION ?= 1.0
default: build

View File

@ -2,6 +2,10 @@
## Changes
### Dec 22 2018:
- support Vulkan;
### Dec 21 2018:
- got rid of 'wrong ELF class' messages in the logs;
@ -59,7 +63,7 @@ GPU:
```sh
git clone https://git.nixaid.com/arno/steam.git
cd steam
docker-compose up
docker-compose build && docker-compose up
```
If Steam does not start, you may need to allow your user making connections to
@ -84,6 +88,52 @@ If you are getting `segmentation fault` error or Steam does not start, then you
docker-compose run --rm steam --reset
```
## Vulkan / DXVK
DXVK is a Vulkan-based compatibility layer for DirectX 11.
It allows running 3D applications on Linux using Wine.
To fully leverage the DXVK, you need the following:
1. Vulkan library installed;
2. Capable GPU that supports Vulkan;
3. Latest GPU drivers which support Vulkan;
4. Wine 3.10+ with the [DXVK](https://github.com/doitsujin/dxvk/) (Steam's Proton already has DXVK installed);
5. The game that supports DirectX 11;
```
$ cat /home/user/.local/share/Steam/steamapps/common/Proton\ 3.16/dist/lib64/wine/dxvk/version
60a03a29599bf1f8c73efdbcf288e91ef261bc58 dxvk (v0.90-10-g60a03a2)
```
### Test Vulkan
```
$ docker-compose run --rm --entrypoint bash steam
root@steam:/# id user >/dev/null 2>&1
root@steam:/# [ $? -eq 0 ] || useradd -s /bin/bash -d /home/user -u ${USER_ID:-1000} user
root@steam:/# su -l user
user@steam:~$ LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/hostlibs/32:/hostlibs/64:"
user@steam:~$ LD_LIBRARY_PATH=${LD_LIBRARY_PATH} vulkaninfo | more
user@steam:~$ LD_LIBRARY_PATH=${LD_LIBRARY_PATH} vulkan-smoketest
```
### Test DXVK
First, you need DirectX 10/11 game.
```
$ docker-compose exec steam
$ echo 'user_settings = { "DXVK_HUD": "devinfo,fps", }' > .local/share/Steam/steamapps/common/Proton\ 3.16/user_settings.py
```
After that, launch your game and you should be able to see DXVK HUD in the left upper corner of the screen.
# Links
Below is just a bunch of links, someone might find them useful.
@ -101,3 +151,15 @@ Below is just a bunch of links, someone might find them useful.
- http://repo.steampowered.com/steam/archive/precise/steam_latest.deb
- http://repo.steamstatic.com/steam/
- https://developer.nvidia.com/vulkan-driver
- https://en.wikipedia.org/wiki/Vulkan_(API)#Compatibility
- https://github.com/lutris/lutris/wiki/How-to:-DXVK
- https://github.com/doitsujin/dxvk/wiki/Driver-support
- https://www.protondb.com
- https://lutris.net

View File

@ -1,11 +1,10 @@
version: '3.7'
version: '2'
services:
steam:
init: true
hostname: steam
network_mode: bridge
image: andrey01/steam
build: .
# DNS cache is needed to avoid resolver abuse
# https://github.com/ValveSoftware/steam-for-linux/issues/3401
dns: 127.0.0.1
@ -40,6 +39,8 @@ services:
# Location to your NVIDIA drivers:
- /usr/lib/i386-linux-gnu:/hostlibs/32:ro
- /usr/lib/x86_64-linux-gnu:/hostlibs/64:ro
# Needed for Vulkan ICD Discovery
- /usr/share/vulkan/icd.d:/usr/share/vulkan/icd.d:ro
# security_opt:
# - apparmor=unconfined
cap_add: