| ▲ | jimbob45 5 hours ago | ||||||||||||||||||||||||||||||||||||||||
I’m not even a neophyte here but why don’t precompiled shaders solve that? | |||||||||||||||||||||||||||||||||||||||||
| ▲ | raincole 5 hours ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||
It kinda does. Kinda. Steam constantly downloads precompiled shaders for your games. Especially on Linux. | |||||||||||||||||||||||||||||||||||||||||
| ▲ | MindSpunk 4 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||
Depends what you're precompiling. For Vulkan you already ship "pre-compiled" shaders in SPIR-V form. The SPIR-V needs to be compiled to GPU ISA before it can run. You can't, in general, pre-compile the SPIR-V to GPU ISA because you don't know the target device you're running on until the app launches. You would have to precompile ISA for every GPU you ever plan to run on, for every platform, for every driver version they've ever released that you will run on. Also you need to know when new hardware and drivers come out and have pre-compiled ISA ready for them. Steam tries to do this. They store pre-compiled ISA tagged with the GPU+Driver+Platform, then ship it to you. Kinda works if they have the shaders for a game compiled for your GPU/Driver/Platform. In reality your cache hit rate will be spotty and plenty of people are going to stutter. OpenGL/DirectX11 still has this problem too, but it's all hidden in the driver. Drivers would do a lot of heroics to hide compilation stutter. They'd still often fail though and developers had no way to really manage it out outside of some truly disgusting hacks. | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
| ▲ | ozarkerD 5 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||
Can't precompile for all the combinations of hardware, driver version, operating systems, etc... It's not really a vulkan specific problem and it's hard to solve. (for desktops anyways) | |||||||||||||||||||||||||||||||||||||||||