Shader Compilation on PC: About to become a bigger bottleneck?

Essentially this is how I'd like to see this stuff implemented in the future. I'll use Steam as an example, but it could apply to any launcher or application itself.

  • User purchases a game on Steam
  • Begins downloading a game, time passes...
  • Download finishes and Steam automatically kicks off a batch file which begins the shader compilation process in the background (think of it as just another "pre-requisite" required to install)
  • Progress of pre-compilation is detailed in the downloads tab
  • Pre-compilation finishes and automatically closes
  • Game is *actually* ready to play when you click play

I honestly think this is the best way to go about it! It's an unfortunate reality that we have to do this on our own machines... but the goal should be to make it as frictionless as possible for gamers. I think perhaps removing the large initial pre-comp process from being "inside the game" and moving it instead to the "download/install/decrypt/compile" stage where perhaps it more suitably belongs, will be much better. People know and understand that things aren't ready yet when Steam is still downloading/decrypting/installing... but when they finally get into the game.. they expect the game to be ready. I think doing it this way would help a lot. Because I know for myself personally, if a game is downloading, installing or decrypting... I'm on the net messing around or listening to a video or something while I'm waiting, and you don't feel like you're just wasting time as much. When a user gets into a game, they expect to be able to play right away.. that's the way it should be.

Yes exactly this. It can take an hour or more to download and install a game so a few extra minutes (even 20) at this stage is far less intrusive than finally thinking the install is complete and you can play, only to be met with another wait.
 

I also like this reply in that thread, it's also applicable if you think about how many programmers there are and their level of skill/knowledge.


More programmers will get better, potentially faster and more reliable results using Java. If you know what you are doing and aren't scared that C++ has less guardrails to protect you than Java, then you can get faster performance with it, but if you don't really know what you are doing (and sometimes even if you do), you can quickly run into trouble with C++.

Same with Dx11 vs. Dx12/Vulkan. I wouldn't equate Dx12/Vulkan to ASM. That's a weird correlation as Dx12/Vulkan are still higher level languages, just lower level than Dx11. Thus Java/Python vs. C++ is a more apt comparison.

Regards,
SB
 
Last edited:
So regarding the slower code part, Valve released Half Life Alyx with Vulkan support, to run on Linux and Windows, and even Valve failed to get it running to the stability and performance of DX11.

At 8K, the 4090 does 110p in DX11, but switch to Vulkan and you lose 20fps. Even Valve themselves couldn't optimize the Vulkan path to be better than DX11.


So, you pick the only video card where it doesn't increase? 4080? Increases in Vulkan. 3080? Increases in Vulkan. 3070? Increases in Vulkan. All AMD cards? Increases in Vulkan.

Man, that one outlier proves that Vulkan is garbage. :p

That said, I do wonder what bottleneck the 4090 is running into at higher resolutions that prevents it from increasing performance in Dx12 in all resolutions like all other video cards? It's interesting that 1080p is the only resolution where the 4090 beats the 7900 XTX in Vulkan. So, something about the 4090 is obviously holding it back at higher resolutions. The 7900 XTX in Dx12 beats the 4090 in Dx11 in all resolutions except 1080p.

Hell, the 4080 is faster than the 4090 once you get to the higher resolutions with Dx12. So something definitely weird going on with the 4090.

Regards,
SB
 
Last edited:
What does "Even Valve" mean ? It's a weirdly organized studio, not focusing on games anymore, where you do what you want. I would guess the main focus was on the VR part.
 
4080? Increases in Vulkan. 3080? Increases in Vulkan. 3070? Increases in Vulkan
Are you looking at the same 8K graph?

3080
DX11: 74
Vulk: 60

4080
DX11: 91
Vulk: 64

3070
DX11: 56
Vulk: 27

And min fps takes a huge nose dive too, the 3070 runs out of VRAM in Vulkan, yet it doesn't in DX11.

What does "Even Valve" mean ?
Yeah, this is a VR title by the way, and they have a huge interest in optimizing Vulkan to work on Linux and Steam Deck, yet even with their huge resources, and vested interest, they couldn't do it.
 
So regarding the slower code part, Valve released Half Life Alyx with Vulkan support, to run on Linux and Windows, and even Valve failed to get it running to the stability and performance of DX11.

At 8K, the 4090 does 110p in DX11, but switch to Vulkan and you lose 20fps. Even Valve themselves couldn't optimize the Vulkan path to be better than DX11.

As you get closer to extremities in general, you can no longer rely on 'generic' all for 1 device type coding to get the maximum throughput of each card. Probably why we see DX11 doing better here.

This is generally where consoles do well, and PC does worse. You can either choose to make something run really well at the low end, but have poorer scaling at the high end, or make something run well at the higher end, but have poorer scaling at the lower end.

Typically developers will choose dead in the middle type coding.
 
That said, I do wonder what bottleneck the 4090 is running into at higher resolutions that prevents it from increasing performance in Dx12 in all resolutions like all other video cards? It's interesting that 1080p is the only resolution where the 4090 beats the 7900 XTX in Vulkan. So, something about the 4090 is obviously holding it back at higher resolutions. The 7900 XTX in Dx12 beats the 4090 in Dx11 in all resolutions except 1080p.
Man you are obviosuly looking at a completely different graph or something, there is no DX12 in this game, only DX11 and Vulkan, and no, no card is beating any card in 1080p, they are all CPU limited at 120fps, and the 4090 is 50% faster than 7900XTX at 8K. Please go back and look again.
 
More programmers will get better, potentially faster and more reliable results using Java. If you know what you are doing and aren't scared that C++ has less guardrails to protect you than Java, then you can get faster performance with it, but if you don't really know what you are doing (and sometimes even if you do), you can quickly run into trouble with C++.

Same with Dx11 vs. Dx12/Vulkan. I wouldn't equate Dx12/Vulkan to ASM. That's a weird correlation as Dx12/Vulkan are still higher level languages, just lower level than Dx11. Thus Java/Python vs. C++ is a more apt comparison.

Regards,
SB

That guy is just being pedantic. The analogy is fine. The whole promise of Mantle/DX12/Vulkan is that people who “know what they’re doing” will get better results. It didn’t happen.
 
That guy is just being pedantic. The analogy is fine. The whole promise of Mantle/DX12/Vulkan is that people who “know what they’re doing” will get better results. It didn’t happen.
Can anyone prove they were "people who know" ?
 
Are you looking at the same 8K graph?

3080
DX11: 74
Vulk: 60

4080
DX11: 91
Vulk: 64

3070
DX11: 56
Vulk: 27

And min fps takes a huge nose dive too, the 3070 runs out of VRAM in Vulkan, yet it doesn't in DX11.


Yeah, this is a VR title by the way, and they have a huge interest in optimizing Vulkan to work on Linux and Steam Deck, yet even with their huge resources, and vested interest, they couldn't do it.

Whooops, I was looking at the wrong graph. My bad!

So, worse for NV cards but better for AMD cards. Scales better on lower end AMD cards than the higher end ones.

I guess lucky me that the 6800 was cheaper than the 3070 when I finally decided to upgrade my 1070 since the future currently is Dx12/Vulkan. 6 months ago I would have gotten the 3070 as it was cheaper and 8 GB of RAM didn't seem like nearly the drawback than it does now.

Regards,
SB
 
Good question. It’s been 8 years which should be enough time for folks to figure it out. If I recall correctly DICE were big backers of Mantle in the early days so presumably they had a clue. The results in Frostbite though speak for themselves.

Keep in mind some of the biggest backers of Mantle (like Repi) have moved on from DICE.

Regards,
SB
 
So, worse for NV cards but better for AMD cards. Scales better on lower end AMD cards than the higher end ones.
Slightly better for AMD cards, doesn't change the overall picture though, NVIDIA cards are still faster in Vulkan, yet they are massively more faster in DX11.

This is the classic case that Kronos talked about in their latest blog, Vulkan API (before the recent API extensions) held back the most dominant hardware configuration in performance, for no extra benefits, users gained nothing from this but VRAM problems, stutters, shader compilation and worse performance.
 
Back
Top