When I launch the game in Vulkan mode turning on flashlight produces stutters only once, and it never happens again on any consecutive play sessions unless I delete Half-Life 2's shader cache.
That's funny. The Vulkan mode of Half-Life 2 is DXVK baked into the game.
That's funny. The Vulkan mode of Half-Life 2 is DXVK baked into the game.
I know.
But is there any reason why Nvidia's shader cache (I mention Nvidia here, since I don't have any AMD hardware atm to test it there, but maybe it's the same as well?) would "skip" some seemingly random dx shaders and never cache them while successfully caching others, yet dx translated to vk via DXVK manages to successfully cache ALL the shaders? I'd appreciate any technical details on that matter.
There shouldn't be any reason in theory.
HL2 uses an older DXVK version internally. Could you try older DXVK versions and see if they have the same issue and if they dont, find the version with which the problem started?
Sorry for my gibberish explanation, I am afraid you misunderstood me. It's the DXVK that actually works properly on Windows, and DirectX doesn't. To reiterate when I use DXVK all the shaders always get properly cached which is not the case when DXVK is not being used.
This is not a bug report, rather I would like to better understand why exactly DXVK does better job at caching shaders. Just curios.
Uh, you'll have to ask the people working on Nvidias D3D9 driver. No idea.
@K0bin
Hey! I actually realized what's going on. Maybe that is a trivial information and you already know that, but apparently Nvidia drivers have never cached directx 9 shaders to begin with. That was never a feature. I personally did not know that, but that is one of the reasons why dxvk eliminates stuttering in pretty much all directx 9 games on Windows.
TIL.
That's odd.
Nothing extracted yet.
To better understand my question let me give you an easily reproducible example.
I launch Half-Life 2 in default dx9 mode on Windows and turn on flashlight. This produces a frametime spike which visually looks like a stutter. Once the shader has been compiled I obviously don't get any frametime spikes when triggering this particular shader again during that play session. However once I restart the game the first time I use the flashlight the shader compiles again and causes the same frametime spike as if shader cache never existed.
This is not the case for DXVK. When I launch the game in Vulkan mode turning on flashlight produces stutters only once, and it never happens again on any consecutive play sessions unless I delete Half-Life 2's shader cache.
So, my question is what exactly does dxvk do to guarantee all shaders to get properly cached?