!hzgkCxLtCOTmFXGauj:nixos.org

NixOS Gaming

448 Members
Gaming things, my hands are typing words.127 Servers

Load older messages


SenderMessageTime
22 Mar 2025
@olivia:computer.surgeryolivia(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:computer.surgeryolivialooks like vkd3d advertising this unconditionally02:17:00
@olivia:computer.surgeryoliviahow difficult would it be for you to test a vkd3d patch?02:17:07
@codebam:fedora.imSeansure I can test02:17:20
@olivia:computer.surgeryoliviaalso, would it be possible to confirm that the PSO hash mismatch messages are correlated to the stutters with higher confidence?02:17:54
@olivia:computer.surgeryoliviapossible we're totally looking in the wrong place here02:17:59
@codebam:fedora.imSeansure let me double check02:18:11
@codebam:fedora.imSeanyes they definitely correlate02:20:54
@olivia:computer.surgeryoliviacool!02:22:57
@olivia:computer.surgeryolivia 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:computer.surgeryolivia 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
@codebam:fedora.imSeanokay let me figure out how to build proton 😅02:23:58
@olivia:computer.surgeryoliviahahaha good luck02:26:06
@olivia:computer.surgeryolivia looks like vkd3d-proton is in nixpkgs 02:26:36
@codebam:fedora.imSeanoh, should I just use that?02:26:52
@codebam:fedora.imSeanand apply a patch02:26:57
@olivia:computer.surgeryolivia 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:computer.surgeryoliviabut this would be the approach I would investigate02:27:51
@olivia:computer.surgeryoliviaalso fair warning: very much no guarantee this patch will work. It's purely a guess02:28:04
@codebam:fedora.imSeanokay it's alright I'll just figure out how to build proton-tkg02:28:13
@olivia:computer.surgeryoliviaI'm looking to see if there's some general way to override supported features that wasn't obvious in the README02:29:54
@olivia:computer.surgeryolivia it doesn't look like it from the implementation of d3d12_device_CheckFeatureSupport 02:30:42
@olivia:computer.surgeryoliviaoh I guess that would kinda make sense because afaict the enabled/disabled state is communicated through a different mechanism for each feature02:31:29
@olivia:computer.surgeryoliviawhich seems like a very strange api decision if I'm right lol02:31:35
@codebam:fedora.imSeanif I wanted to apply that patch to the vkd3d-proton package in nixpkgs. how would I do that?02:31:44
@codebam:fedora.imSean I think I would just put it in steam.extraCompatPackages 02:32:23
@codebam:fedora.imSean * I think I would just put it in programs.steam.extraCompatPackages 02:32:31
@olivia:computer.surgeryolivia
pkgs.vkd3d-proton.overrideAttrs (old: {
    patches = (old.patches or []) ++ [
        ./hide-shader-cache.patch
    ];
}
02:33:04
@olivia:computer.surgeryolivia
pkgs.vkd3d-proton.overrideAttrs (old: {
    patches = (old.patches or []) ++ [
        ./hide-shader-cache.patch
    ];
})
02:33:12
@olivia:computer.surgeryolivia (with the patch contents in hide-shader-cache.patch 02:33:40

Show newer messages


Back to Room ListRoom Version: 10