GPUDevice: Fix incorrect suffix on D3D shader cache

This commit is contained in:
Stenzek 2023-08-23 17:31:41 +10:00
parent 520e94226d
commit 7a1af36e8d
1 changed files with 5 additions and 1 deletions

View File

@ -36,6 +36,7 @@ Log_SetChannel(GPUDevice);
#include "common/windows_headers.h" #include "common/windows_headers.h"
#include "d3d11_device.h" #include "d3d11_device.h"
#include "d3d12_device.h" #include "d3d12_device.h"
#include "d3d_common.h"
#endif #endif
#ifdef WITH_OPENGL #ifdef WITH_OPENGL
@ -350,7 +351,10 @@ std::string GPUDevice::GetShaderCacheBaseName(const std::string_view& type) cons
{ {
#ifdef _WIN32 #ifdef _WIN32
case RenderAPI::D3D11: case RenderAPI::D3D11:
ret = fmt::format("d3d11_{}{}", type, debug_suffix); ret = fmt::format(
"d3d11_{}_{}{}", type,
D3DCommon::GetFeatureLevelShaderModelString(D3D11Device::GetInstance().GetD3DDevice()->GetFeatureLevel()),
debug_suffix);
break; break;
case RenderAPI::D3D12: case RenderAPI::D3D12:
ret = fmt::format("d3d12_{}{}", type, debug_suffix); ret = fmt::format("d3d12_{}{}", type, debug_suffix);