Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Latest DXVK release allows for shader pre-compilation #124

Closed
deep2p4ce opened this issue Nov 14, 2022 · 7 comments
Closed

Latest DXVK release allows for shader pre-compilation #124

deep2p4ce opened this issue Nov 14, 2022 · 7 comments

Comments

@deep2p4ce
Copy link
Contributor

Hey,
So a few days ago I found out about the latest release (Version 2.0) of DXVK and it's changes to shader compilation.
It says: "On drivers which support VK_EXT_graphics_pipeline_library, including the IndependentInterpolationDecoration feature, Vulkan shaders will now be compiled at the time the game loads its D3D shaders, rather than at draw time. This reduces or eliminates shader compile stutter in many games."

So I switched to Proton Experimental for Apex in steam, because it's using the latest dxvk release, deleted my cache files and started the game. On start up the game compiled the shaders for about 2 mins and after that I was good to go.
I played a few games on the different maps and I've had no more issues with stuttering. Also the r5apex.dxvk-cache file is now only 12 Bit in size and won't increase.

Does it also work for you guys?

@Gustash
Copy link

Gustash commented Nov 14, 2022

Not sure if the stable Nvidia driver now supports VK_EXT_graphics_pipeline_library, I do know the Vulkan beta does. For AMD and Intel GPL is still a WIP, so this won't make a difference for those platforms right now. Hopefully that's ready soon

@bcook254
Copy link
Owner

bcook254 commented Nov 14, 2022

I'm running a 1660 Ti and have had zero stutter since the new DXKV was pulled in to Proton-GE. It's good to know that Proton Experimental also has it now which usually means the stable Proton will add it at some point.

Not sure if the stable Nvidia driver now supports VK_EXT_graphics_pipeline_library

Nvidia 520.56 or later seems to be the version that supports this extension. More information is available on the doitsujin/dxvk wiki and in the DXVK v2.0 release notes. From a quick browse it seems that Mesa support for this extension is still a WIP, but if you're feeling brave you can build the drivers and enable it yourself.

On start up the game compiled the shaders for about 2 mins

Was this the Vulkan shader pre-caching? Or actually in game at the launch screen?

Also the r5apex.dxvk-cache file is now only 12 Bit in size and won't increase

Same for me! This 12 bytes is the header of the state cache file. This file should now contain only a few entries if some specific situations are encountered (tessellation shaders) which Apex does not seem to have.

@bcook254 bcook254 pinned this issue Nov 14, 2022
@deep2p4ce
Copy link
Contributor Author

Was this the Vulkan shader pre-caching? Or actually in game at the launch screen?

If I'm remembering correctly it was at the launch screen. I heard my fans ramping up. But I could also be wrong. I wasn't paying much attention at that time.

I'm glad this feature also works for you!
And I'm glad I no longer have to build up the shader cache by myself. The last few months I could not use this repos' cache (and contribute) because I had to use Proton 7.0-4 or otherwise my game would start to severely stutter/lag after about 25 to 30mins. I couldn't figure out why but using Proton 7.0-4 allowed me to play the game without stuttering.

Anyways, glad this feature works like a charm for Apex.

Cheers

@loudan-arc
Copy link

Interestingly from my personal testing with my RX 5700 XT and Ryzen 3600 (via EndeavourOS with both the Linux 5 LTS and Linux 6 kernels), until the recent Spellbound update this 2023, this repo's cache was just what I needed to run the game just fine with Proton Experimental via either AMDVLK or Mesa, because without it, I'd get the severe shader compilation based stutter that is normally experienced otherwise when loading each map for the first time for every update.

Right now it's just outright ignored, though whether it's because the cache has no longer been updated for a while or if the newer updates to Proton Experimental changed it is unclear. Either way, the only way to minimize stutters outright is to run it with DX12 Beta via VKD3D, at the expense of around ~10 FPS less than at DX11/DXVK with some minor input lag. Otherwise, even using Proton GE and Mesa still leads to that severe shader compilation based stutter (it's just only barely "tolerable" compared to using standard Proton and Mesa or AMDVLK, and I'll still ideally need to solo Q a few times into maps).

@bcook254
Copy link
Owner

@loudan-arc Maybe the last update had some minor map changes that have some shader changes so you're file is being regenerated. Unfortunately since DXVK 2 most people haven't needed to generate this file since it seems most of us are on Nvidia cards. I wish I had some better information for you but not being on an AMD card I won't be able to help much.

My 2 suggestions are

  1. Play a few rounds on each map and see if your state cache file is getting more entries
  2. Try using ProtonGE and DXVK_ASYNC=1 in your launch options for DX11.

@korymofucknhall
Copy link

korymofucknhall commented Jan 24, 2023

I am using a GTX 1080 Ti with 515 driver and Proton Experimental Bleeding Edge and I NEED this file every time the map updates. So I am assuming that you will no longer be of any help to the people who DO still need this file?

@bcook254
Copy link
Owner

I am using a GTX 1080 Ti with 515 driver and Proton Experimental Bleeding Edge and I NEED this file every time the map updates. So I am assuming that you will no longer be of any help to the people who DO still need this file?

Using DXVK 2.0+ and Nvidia 525+ means that a state cache file is no longer generated at all and therefore the only way that updates will be provided in this repo will be through community contributions. Based on the lack of any merge requests I assuming there are very few people who need this file any more. There is nothing more that I can do at this point other than recommending,

  1. Use the Nvidia 525+ drivers and DXVK 2.0+.
  2. Use an older version of ProtonGE with DXVK_ASYNC support enabled.
  3. Generate the cache file as much as possible on your own system.
  4. Find people online who are in the same situation and willing to contribute.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants