Vulkan shaders steam linux

Steam Beta adds Vulkan shader processing

Valve has enabled the next step towards making Steam games on Linux run smoother in the latest Steam Beta release.

This is something Valve has been working towards for some time now, as the Steam Client has been able to download pre-compiled GPU shaders, which you might have seen when something pops up in your Steam Downloads with an OpenGL and Vulkan icon below.

In the latest Steam Beta from May 25, it wasn’t actually mentioned but there’s a new option you can enable in the Shader Pre-Caching settings to «Allow background processing of Vulkan shaders». So it will process in the background and then when you go to click play, if it’s not done on that particular title it should then kick into full-gear and attempt to process before loading the game. For those interested in a little background, it’s using the Fossilize library and Vulkan layer which you can find on Valve’s GitHub.

Note: Right now on NVIDIA the it seems the main processing will only use 1 core due to an issue, hopefully that will be solved soon. On AMD it’s able to use multiple threads when it needs to. It appears you can tweak background thread count by going to «steam://open/console» and tweaking the «unShaderBackgroundProcessingThreads» var, but do so at your own risk.

The result should be that you see much improved performance. We’re not talking a boost to the maximum framerate but reducing overall stutter. Something that has been a big problem in some games. As the idea is that instead of the game building it all up as it’s playing, it’s got it all ready for you when you hit play and this applies to both native/supported titles and Proton.

It doesn’t just do it for installed games, it will do it as you’re downloading them too, so by the time you’ve finished downloading it might even be all ready.

This is a very interesting tech! I wonder how they implemented it. The D3D shaders are stored in the game resources which can be in whatever proprietary format the developers choose so they can’t be automatically extracted and transpiled to SPIR-V (the Vulkan binary shader format). Fortunately, this format is standardized at the spec level so you can use the same shader cache on any GPU, be it AMD, NVIDIA or Intel and you won’t need to rebuild it each time you update the driver (remember that pain with OpenGL?). It’s not a problem for correctly ported games as the port developer (like Feral) can create a native SPIR-V cache ahead of time so the game just loads the shader it needs directly. That’s why Shadow of the Tomb Raider runs so smooth natively and stutters like hell on DXVK.

I also had severe freezes in Halo 2 at the level start and often when you get to a new area, it’s not just stutter but a full freeze for 2-3 seconds. That’s how bad it is. Interestingly, Steam downloaded the shader updates several times even though I didn’t play the game at the time! If I played it I could explain it as a shader cache «corruption» from the Steam point of view, like I compiled some more shaders and it found differencies and updated it. But that wasn’t the case. And the file was bigger and bigger every time so something definitely is going on behind the scenes.

Читайте также:  Драйвера acer aspire 5520g для windows 10

Still, the only way I see to eliminate this stuttering that’s caused by shader transpiling is to actually play the game so it loads the shaders and causes DXVK to process and cache them. So how do Valve do that? Do they have a dedicated employee that plays non-native games from start to finish to cause it to load all the shaders it has? I doubt that’s the case. If you look at the %STEAMROOT%/steamapps/shadercache/%appid%/ directory it’s pretty interesting. Let’s take a look at Halo (976730):

976730
├── DXVK_state_cache
│ └── MCC-Win64-Shipping.dxvk-cache
├── fozpipelinesv4
│ ├── steamapp_pipeline_cache.foz
│ └── steam_pipeline_cache.foz
├── nvidiav1
│ └── GLCache
│ └── ad4b934e19c9451ee3bd46c449bff6c8
│ └── 30d616d94318fb8e
│ ├── steamapp_shader_cache0.bin
│ ├── steamapp_shader_cache0.toc
│ ├── steam_shader_cache.bin
│ └── steam_shader_cache.toc
└── swarm
└── steam_shader_cache
├── bucket_1695.swarc
└── bucket_211696.swarc
Ok, the usual DXVK cache is there but it’s really small, only 3.1 Mb. steamapp_pipeline_cache.foz is 51 Mb, steam_pipeline_cache.foz is 285 Mb. Probably that’s the main one. GLCache is smaller (64 Mb in total, probably the same stuff you can find in your

/.nv directory; weird, I have no idea why there’s even any mention of OpenGL when all I use is DXVK) but the suspicious directory is swarm (313 Mb, the individual files are 287 Mb and 26 Mb). That’s a p2p-like name and I suspect Steam uploads players caches to their servers and combines them into a shared cache to push it back to everybody later. That’s how they might crowdsource the shaders.

I couldn’t find any information regarding this system and it would be very interesting to read how it all works.

Edit: oh well, it says it right there, lol:

Last edited by rkfg on 26 May 2020 at 10:22 am UTC

Источник

Vulkan shaders steam linux

Steam for Linux

I have the same problem on my PC (100% Manjaro Linux) since at least 4-6 months which I especially noticed playing Rocket League.
Sometimes it launches instantly (2/10) and the other times it displays the vulkan shader progress bar (even after I restart the game).

BUT when I skip it (I have done this for Halo and Rocket League) the games did both still run — I never had that a game after skipping wouldn’t load.

Multiple other titles do not have a problem with this (idk the names but I have played a lot of Windows titles using Proton and a lot of them do never ask this twice or do complete the progress bar so fast that I don’t really care 1-4s).

I think the shader jobs are broken up incrementally and simply updated over time and as the Proton & shader process are refined are repeated. Gets annoying, but I usually let Steam do its thing and patiently wait. Good time to catch up on some docs, surf the web or doodle in Inkscape -whatever. My favorite thing is when I have 5 games in queue for shader cache with one being around 5GB and two others at about 2GB -you get the idea —yes, that happened to me. twice.

What ya gonna do.

Читайте также:  Wifi link 5100 agn drivers windows 10

I made the question because it happened two or three times with the same game («a hat in time»). Each time i allowed the extremely long process to end while doing something else, but for whatever reason i had to do it again (maybe related to the game crashing?). Hope the way steam is handling this process improves.

I dont use the same library files in different machines (yet), but i would try that sometime to see what happens. Im also using manjaro.

+1, I have the same issue on «a hat in time».

It takes forever, every time I launch the game.
That by itself is a turn off.

Then it will crash when I am configuring my controller.
I cant even play the game anymore.

is there any chance of exiting the game after the lengthy shader compilation and before the crash?

then running it again to confirm it doesn’t do it again unless it crashes or something gets updated (game/proton/related OS components)

is there any chance of exiting the game after the lengthy shader compilation and before the crash?

then running it again to confirm it doesn’t do it again unless it crashes or something gets updated (game/proton/related OS components)

[. ] In addition, I often see dowanloads for it telling something about shaders. What’s the catch here? It’*s an «old» game — it should be enoug

that’s shader caches.

they change when the game changes. but they also need to change when vulkan changes, etc

so even if the game itself gets no update at all, there may be need for shader updates

Источник

Vulkan shaders steam linux

Path of Exile

If you are updating the vulkan drivers ( Nvidia, Mesa, AMDVLK ) regulary like I do with mesa-git, steam checks if the drivers have changed, if so, it recompiles the shaders

I don’t usually skip this process

although today I’ve noticed PoE taking alot longer than usual and the shader download I did for PoE earlier today as 4.3GB. wtf

If you are updating the vulkan drivers ( Nvidia, Mesa, AMDVLK ) regulary like I do with mesa-git, steam checks if the drivers have changed, if so, it recompiles the shaders

I don’t usually skip this process

although today I’ve noticed PoE taking alot longer than usual and the shader download I did for PoE earlier today as 4.3GB. wtf

i dont skip this eather it just randomly started happening even before i was using vulcan setting in the game. i too have noticed its taking longer each time.

Источник

Vulkan shaders steam linux

Vulkan — это замена OpenGL и будущее графики в Linux, которое означает лучший игровой процесс и улучшения производительности.

В таких играх, как DoTA 2, уже некоторое время используется Vulkan, а новые проекты, такие как DXVK, помогают пользователям Linux играть в свои любимые игры из Windows, как никогда раньше.

Настроить Vulkan довольно просто для любого дистрибутива, независимо от вашей видеокарты. Это руководство охватывает текущие версии Debian, Ubuntu, Fedora, OpenSUSE и Arch.

Уточнение

  • # — команду linux необходимо выполнялась от пользователя root или пользователя с его привилегиями
  • $ — команду linux необходимо выполнять от имени привилегированного пользователя с помощью команды sudo

Установка Vulkan

ВЫ ЗНАЛИ?
Если вы хотите скомпилировать программу, основанную на Vulkan, вам потребуется дополнительно установить библиотеку разработки libvulkan-dev

Debian

AMD — вам необходимо выполнить следующие команды:

NVIDIA — для начала вам необходимо загрузить и установить новые драйвера от NVIDIA, которые уже включают поддержку Vulkan, а потом добавить утилиты Vulkan от Debian.

Читайте также:  Igo primo nextgen windows ce

Ubuntu

Здесь дела обстоят немного лучше 🙂

AMD — лучше всего добавить в систему PPA-репозиторий с последними версиями драйверов Mesa и обновить ее. Для этого выполните следующие команды:

После этого установите пакеты Vulkan.

NVIDIA — тут также есть отличный PPA-репозиторий с проприетарными драйверами NVIDIA. Добавьте его в свою систему и обновите ее.

Теперь установите новые драйверы и сам Vulkan. Например:

*где 410 — это версия драйвера NVIDIA подходящая для вашей видеокарты и версии Ubuntu (304/340/384/390/410/415/418/430/440/450/455/460)

Fedora

AMD — в системе уже должны быть установлены последние версии драйверов AMD. Установите пакеты Vulkan с помощью dnf .

NVIDIA — проприетарные драйверы доступны в репозитории RPMFusion. Добавьте его в свою систему:

И затем установите драйверы с Vulkan.

OpenSUSE

AMD — в системе уже должны быть установлены последние версии драйверов AMD. Установите пакеты Vulkan с помощью zypper .

NVIDIA — перейдите к документации OpenSUSE и следуйте процедуре для вашей версии OpenSUSE. После установки драйверов, установите пакеты Vulkan.

Arch Linux

AMD — у вас уже установлены последние версии драйверов AMD Mesa, просто установите поддержку Vulkan.

NVIDIA — установите драйверы NVIDIA, они включают поддержку Vulkan.

Vulkan Info


Для того чтобы убедиться, что у вас установлен и работает Vulkan в вашей системе — запустите команду vulkaninfo . Если вы получите информацию о своей видеокарте, вы узнаете, что Vulkan работает.

DoTA 2

Есть еще один более практичный способ увидеть, как Vulkan работает в вашей системе. Вы можете установить и играть в DoTA 2. Это одна из первых игр для Linux, полностью поддерживающих Vulkan, и в нее можно играть бесплатно. Единственное, что вам нужно, это учетная запись Steam.

Сначала установите Steam в свою систему. Он доступен во всех вышеперечисленных дистрибутивах. Когда у вас есть Steam, вы можете достаточно легко установить DoTA 2.

Когда вы установите DoTA 2, вы заметите ряд новых режимов при их выборе на главной странице игры. Выберите Vulkan для поддержки и Steam начнет его скачивать.

Запустите DoTA 2 и откройте настройки. Измените графический API на Vulkan и перезапустите игру. Когда DoTA 2 снова запустится, он будет работать уже с Vulkan.

Тест производительности OpenGL против Vulkan

В этом параллельном сравнении показана разницу FPS (кадров в секунду) между OpenGL и Vulkan для Dota 2 в Linux. Эти тесты проводились на одном компьютере с использованием переключателя опций для переключения между двумя API. Тестирование проводилось при разрешении 1080p с ползунком качества, установленным на максимальное значение.

Hardware

  • NVIDIA GeForce RTX 2080 8GB
  • i7 9700K @ 4.6Ghz
  • 16GB DDR4 RAM
  • NVMe SSD

Drivers

  • Ubuntu – NVIDIA 430 nonfree
  • OpenGL 4.6
  • Vulkan 1.1.126

Dota 2

  • Максимальные настройки
  • 240 FPS Предел частоты кадров (рекомендуется)
  • Patch 7.24

Results

  • OpenGL В среднем: 114
  • OpenGL 1% Низкий: 100
  • Vulkan В среднем: 135
  • Vulkan 1% Низкий: 101

Заключительные мысли

Теперь вы используете Vulkan на своем рабочем столе Linux. Если вы прошли через DoTA 2, у вас уже есть рабочая игра, в которой он используется. Все другие инструменты и программы на основе Vulkan теперь также открыты для вас, в том числе для использования с Wine и DXVK. Это открывает множество новых игр для вашей системы.

Поддержка Vulkan только улучшается. Все больше игр используют его, и другие утилиты Linux также расширяются. Wine даже разрабатывает поддержку DirextX 12 с Vulkan. Обновляйте свою систему и наслаждайтесь прогрессом.

Если вы нашли ошибку, пожалуйста, выделите фрагмент текста и нажмите Ctrl+Enter.

Источник

Оцените статью