mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-01-08 08:00:44 +01:00
separate metal shader cache
This commit is contained in:
parent
2e93b08b39
commit
27902009c6
@ -257,7 +257,11 @@ void LatteShaderCache_Load()
|
||||
#endif
|
||||
|
||||
// get cache file name
|
||||
const auto pathGeneric = ActiveSettings::GetCachePath("shaderCache/transferable/{:016x}_shaders.bin", cacheTitleId);
|
||||
fs::path pathGeneric;
|
||||
if (g_renderer->GetType() == RendererAPI::Metal)
|
||||
pathGeneric = ActiveSettings::GetCachePath("shaderCache/transferable/{:016x}_mtlshaders.bin", cacheTitleId);
|
||||
else
|
||||
pathGeneric = ActiveSettings::GetCachePath("shaderCache/transferable/{:016x}_shaders.bin", cacheTitleId);
|
||||
const auto pathGenericPre1_25_0 = ActiveSettings::GetCachePath("shaderCache/transferable/{:016x}.bin", cacheTitleId); // before 1.25.0
|
||||
const auto pathGenericPre1_16_0 = ActiveSettings::GetCachePath("shaderCache/transferable/{:08x}.bin", CafeSystem::GetRPXHashBase()); // before 1.16.0
|
||||
|
||||
|
@ -70,7 +70,9 @@ std::list<fs::path> _getCachesPaths(const TitleId& titleId)
|
||||
ActiveSettings::GetCachePath(L"shaderCache/precompiled/{:016x}_spirv.bin", titleId),
|
||||
ActiveSettings::GetCachePath(L"shaderCache/precompiled/{:016x}_gl.bin", titleId),
|
||||
ActiveSettings::GetCachePath(L"shaderCache/transferable/{:016x}_shaders.bin", titleId),
|
||||
ActiveSettings::GetCachePath(L"shaderCache/transferable/{:016x}_vkpipeline.bin", titleId)};
|
||||
ActiveSettings::GetCachePath(L"shaderCache/transferable/{:016x}_mtlshaders.bin", titleId),
|
||||
ActiveSettings::GetCachePath(L"shaderCache/transferable/{:016x}_vkpipeline.bin", titleId),
|
||||
ActiveSettings::GetCachePath(L"shaderCache/transferable/{:016x}_mtlpipeline.bin", titleId)};
|
||||
|
||||
cachePaths.remove_if(
|
||||
[](const fs::path& cachePath)
|
||||
|
@ -106,6 +106,8 @@ void MergeShaderAndPipelineCacheFiles()
|
||||
auto filename = it.path().filename().generic_string();
|
||||
if (std::regex_match(filename, std::regex("^[0-9a-fA-F]{16}(?:_shaders.bin)")))
|
||||
MergeShaderCacheFile(filename);
|
||||
if (std::regex_match(filename, std::regex("^[0-9a-fA-F]{16}(?:_mtlshaders.bin)")))
|
||||
MergeShaderCacheFile(filename);
|
||||
}
|
||||
printf("\nScanning for pipeline cache files to merge...\n");
|
||||
for (const auto& it : fs::directory_iterator("shaderCache/transferable/"))
|
||||
@ -115,6 +117,8 @@ void MergeShaderAndPipelineCacheFiles()
|
||||
auto filename = it.path().filename().generic_string();
|
||||
if (std::regex_match(filename, std::regex("^[0-9a-fA-F]{16}(?:_vkpipeline.bin)")))
|
||||
MergePipelineCacheFile(filename);
|
||||
if (std::regex_match(filename, std::regex("^[0-9a-fA-F]{16}(?:_mtlpipeline.bin)")))
|
||||
MergePipelineCacheFile(filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user