dxvk
dxvk copied to clipboard
Call of Duty: Modern Warfare Remastered: Shader compile conflict?
Software information
Call of Duty®: Modern Warfare® Remastered
This game has an option not found in any other game I know of, where it appears to have an option to precompile its own shaders.
The issue, is that if these are enabled (which they are by default) you will experience massive stutter, the common solutions is either to disable it, or use the DXVK-ASYNC fork, which you can see here. https://www.protondb.com/app/393080
There's never been a formal issue report about this to DXVK nor the Proton git, (from what I saw) so that's what this is.
Supposedly the game will attempt to store its shaders in the "player" directory in the games folders, though I cannot verify how it behaves on windows. What I will say is with the games compiler enabled, the DXVK cache file grew as normal, but nothing in the player folder did. I know VKD3D hands any app that attempts to make its own shaders a dummy file, but I am unsure if DXVK has anything like that.
Never got in game with the compiler enabled as the loading bar seemingly went on forever.
System information
- GPU: GTX 3080
- Driver: 525 beta
- Wine version: Proton Experimental bleeding edge
- DXVK version: 2.0
Log files
(incoming, last time I posted to gist it forced a browser reset, don't wanna lose what I just typed!)
I'm not sure that i fully understand. Are you saying the game will stutter more when the two options above are enabled? Is this during gameplay or only in main menu and loading screens?
Never got in game with the compiler enabled as the loading bar seemingly went on forever.
What is forever and is this only with dxvk 2.0?
D3D11 doesn't have any APIs to manually handle shader caching as an application. It's all the responsibility of the driver. So I don't know what the game is storing in the player directory.
The issue, is that if these are enabled (which they are by default) you will experience massive stutter
Is that still a problem with DXVK 2.0 and a driver that supports graphics_pipeline_libraries?
I'm not sure that i fully understand. Are you saying the game will stutter more when the two options above are enabled? Is this during gameplay or only in main menu and loading screens?
Never got in game with the compiler enabled as the loading bar seemingly went on forever.
What is forever and is this only with dxvk 2.0?
As in after 5+ minutes it was still loading, game did not crash or anything.
And no, it’s been an issue for maybe a year?
cod4remaster has a poor customized shader compile processing, even in WIndows some devices need over 5 min to load. For Windows without DXVK, a possible solution is use https://github.com/microsoft/DirectXShaderCompiler to replace the shader compiler dll in game folder. I'm not sure whether this solution can also apply to DXVK.
EDIT: The new dx compiler based on LLVM is not compatible with RTSS OSD, after replace dll, u should exit RTSS first then run game.
DXC (the project you linked) only compiles HLSL to DXIL, the format used by Direct3D 12. If MW Remastered doesn't use D3D12, I highly suspect using the DXC DLL is placebo.
DXC (the project you linked) only compiles HLSL to DXIL, the format used by Direct3D 12. If MW Remastered doesn't use D3D12, I highly suspect using the DXC DLL is placebo.
In fact, DXC can also use in D3D11 or even early programs. If one program loaded and used d3dcompiler_xx.dll
, just rename d3dcompiler_dxc_bridge.dll
to d3dcompiler_xx.dll
the game used and replace it, then also copy dxcompiler.dll
to game directory, run game u will find that game loaded DXC instead of origin d3dcompiler_xx.dll
if u use Process Explorer to check loaded dlls. At least on Windows 10/11, it works on most games. Even Chrome can use this method although DXC looks really buggy on Chrome (all texts in webpage will be missing but images still shown).
This page has some description: https://github.com/microsoft/DirectXShaderCompiler/wiki/D3DCompiler-DXC-Bridge
It can be used to recompile the runtime-compiled shaders of an app into shader model 6 without having to rebuild it or modify any of its source files.
From the page you linked.
D3D11 doesn't support shader model 5, only D3D12 does.
It can be used to recompile the runtime-compiled shaders of an app into shader model 6 without having to rebuild it or modify any of its source files.
(On the page you linked.
D3D11 doesn't support shader model 5, only D3D12 does.
We definitely need an apitrace of the game.
Are we even talking about the shader compilation that's being done inside DXVK (i.e. the whole DXBC->SPV->GPU binary stack) or just d3dcompiler stuff to do HLSL->DXBC (which, yes, requires Microsoft's d3dcompiler library and is very slow)?
Really not sure what the problem here is supposed to be.
I cannot verify how it behaves on windows
GPU: RTX 3080
According to the modders' experience, you should disable shader compilation ('Cache shaders' option) in MW:R & MW2:CR on modern GPUs to avoid stuttering and long map loadings, this is relevant for the native Windows build (without DXVK), but it can be argued that this also applies to Wine.
@qinlili23333 I doubt that your dll is useful for this particular case, after replacing d3dcompiler_47.dll the game throws an error: 'IDXGISwapChain::Present failed: … GetDeviceRemovedReason' even without DXVK
That link doesn't work. You probably need to be on the discord server already for that to work.
That link doesn't work. You probably need to be on the discord server already for that to work.
Ok, I removed the link (info is already seen in the screenshot).
Here is the warning that modders show in their client: https://github.com/h1-mod/h1-mod/blob/87d20bb856666c82a9966b7cccb1ae03484b1941/data/zonetool/h1_mod_common/localizedstrings/english.json#L27