From 7a1af36e8dae54c1dbc15c51992d7b17337be277 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 23 Aug 2023 17:31:41 +1000 Subject: [PATCH] GPUDevice: Fix incorrect suffix on D3D shader cache --- src/util/gpu_device.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/util/gpu_device.cpp b/src/util/gpu_device.cpp index 46a82e36a..1c5e2aca9 100644 --- a/src/util/gpu_device.cpp +++ b/src/util/gpu_device.cpp @@ -36,6 +36,7 @@ Log_SetChannel(GPUDevice); #include "common/windows_headers.h" #include "d3d11_device.h" #include "d3d12_device.h" +#include "d3d_common.h" #endif #ifdef WITH_OPENGL @@ -350,7 +351,10 @@ std::string GPUDevice::GetShaderCacheBaseName(const std::string_view& type) cons { #ifdef _WIN32 case RenderAPI::D3D11: - ret = fmt::format("d3d11_{}{}", type, debug_suffix); + ret = fmt::format( + "d3d11_{}_{}{}", type, + D3DCommon::GetFeatureLevelShaderModelString(D3D11Device::GetInstance().GetD3DDevice()->GetFeatureLevel()), + debug_suffix); break; case RenderAPI::D3D12: ret = fmt::format("d3d12_{}{}", type, debug_suffix);