| 22 Mar 2025 |
olivia | (under the hypothesis that the application is either misusing the shader cache, or that vkd3d's compatibility check is wrong, but that vkd3d's internal shader cache might still work fine here) | 02:16:09 |
olivia | looks like vkd3d advertising this unconditionally | 02:17:00 |
olivia | how difficult would it be for you to test a vkd3d patch? | 02:17:07 |
Sean | sure I can test | 02:17:20 |
olivia | also, would it be possible to confirm that the PSO hash mismatch messages are correlated to the stutters with higher confidence? | 02:17:54 |
olivia | possible we're totally looking in the wrong place here | 02:17:59 |
Sean | sure let me double check | 02:18:11 |
Sean | yes they definitely correlate | 02:20:54 |
olivia | cool! | 02:22:57 |
olivia | alright, try this:
diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c
index a14d30bd..47ad210c 100644
--- a/libs/vkd3d/device.c
+++ b/libs/vkd3d/device.c
@@ -4648,13 +4648,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(d3d12_device_i
return E_INVALIDARG;
}
- /* We cannot query shader cache features from the Vulkan driver,
- * but all relevant drivers have their own disk cache, so we'll
- * advertize support for the AUTOMATIC_*_CACHE feature bits. */
- data->SupportFlags = D3D12_SHADER_CACHE_SUPPORT_SINGLE_PSO |
- D3D12_SHADER_CACHE_SUPPORT_LIBRARY |
- D3D12_SHADER_CACHE_SUPPORT_AUTOMATIC_INPROC_CACHE |
- D3D12_SHADER_CACHE_SUPPORT_AUTOMATIC_DISK_CACHE;
+ /* Don't advertise shader cache support, to work around a possible
+ * shader cache problem with Monster Hunter Wilds */
+ data->SupportFlags = D3D12_SHADER_CACHE_SUPPORT_NONE;
TRACE("Shader cache support flags %#x.\n", data->SupportFlags);
return S_OK;
| 02:23:06 |
olivia | alright, try this:
diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c
index a14d30bd..47ad210c 100644
--- a/libs/vkd3d/device.c
+++ b/libs/vkd3d/device.c
@@ -4648,13 +4648,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(d3d12_device_i
return E_INVALIDARG;
}
- /* We cannot query shader cache features from the Vulkan driver,
- * but all relevant drivers have their own disk cache, so we'll
- * advertize support for the AUTOMATIC_*_CACHE feature bits. */
- data->SupportFlags = D3D12_SHADER_CACHE_SUPPORT_SINGLE_PSO |
- D3D12_SHADER_CACHE_SUPPORT_LIBRARY |
- D3D12_SHADER_CACHE_SUPPORT_AUTOMATIC_INPROC_CACHE |
- D3D12_SHADER_CACHE_SUPPORT_AUTOMATIC_DISK_CACHE;
+ /* Don't advertise shader cache support, to work around a possible
+ * shader cache problem with Monster Hunter Wilds */
+ data->SupportFlags = D3D12_SHADER_CACHE_SUPPORT_NONE;
TRACE("Shader cache support flags %#x.\n", data->SupportFlags);
return S_OK;
| 02:23:11 |
Sean | okay let me figure out how to build proton 😅 | 02:23:58 |
olivia | hahaha good luck | 02:26:06 |
olivia | looks like vkd3d-proton is in nixpkgs | 02:26:36 |
Sean | oh, should I just use that? | 02:26:52 |
Sean | and apply a patch | 02:26:57 |
olivia | assuming you're running proton through steam or something, I'm not sure how to make the vkd3d-proton package from nixpkgs available there | 02:27:20 |
olivia | but this would be the approach I would investigate | 02:27:51 |
olivia | also fair warning: very much no guarantee this patch will work. It's purely a guess | 02:28:04 |
Sean | okay it's alright I'll just figure out how to build proton-tkg | 02:28:13 |
olivia | I'm looking to see if there's some general way to override supported features that wasn't obvious in the README | 02:29:54 |
olivia | it doesn't look like it from the implementation of d3d12_device_CheckFeatureSupport | 02:30:42 |
olivia | oh I guess that would kinda make sense because afaict the enabled/disabled state is communicated through a different mechanism for each feature | 02:31:29 |
olivia | which seems like a very strange api decision if I'm right lol | 02:31:35 |
Sean | if I wanted to apply that patch to the vkd3d-proton package in nixpkgs. how would I do that? | 02:31:44 |
Sean | I think I would just put it in steam.extraCompatPackages | 02:32:23 |
Sean | * I think I would just put it in programs.steam.extraCompatPackages | 02:32:31 |
olivia | pkgs.vkd3d-proton.overrideAttrs (old: {
patches = (old.patches or []) ++ [
./hide-shader-cache.patch
];
}
| 02:33:04 |
olivia | pkgs.vkd3d-proton.overrideAttrs (old: {
patches = (old.patches or []) ++ [
./hide-shader-cache.patch
];
})
| 02:33:12 |
olivia | (with the patch contents in hide-shader-cache.patch | 02:33:40 |