vk_pipeline_cache: Fix directory creation failure if shaders/vulkan/ is missing
Some checks failed
citra-build / source (push) Has been cancelled
citra-build / linux (appimage) (push) Has been cancelled
citra-build / linux (fresh) (push) Has been cancelled
citra-build / macos (arm64) (push) Has been cancelled
citra-build / macos (x86_64) (push) Has been cancelled
citra-build / windows (msvc) (push) Has been cancelled
citra-build / windows (msys2) (push) Has been cancelled
citra-build / android (push) Has been cancelled
citra-format / clang-format (push) Has been cancelled
citra-build / macos-universal (push) Has been cancelled

This commit is contained in:
OpenSauce04 2025-09-13 00:55:44 +01:00
parent a607e3dd22
commit 246e06d1a4
2 changed files with 9 additions and 3 deletions

View File

@ -556,12 +556,15 @@ bool PipelineCache::EnsureDirectories() const {
};
return create_dir(FileUtil::GetUserPath(FileUtil::UserPath::ShaderDir)) &&
create_dir(GetPipelineCacheDir());
create_dir(GetVulkanDir()) && create_dir(GetPipelineCacheDir());
}
std::string PipelineCache::GetVulkanDir() const {
return FileUtil::GetUserPath(FileUtil::UserPath::ShaderDir) + "vulkan" + DIR_SEP;
}
std::string PipelineCache::GetPipelineCacheDir() const {
return FileUtil::GetUserPath(FileUtil::UserPath::ShaderDir) + "vulkan" + DIR_SEP + "pipeline" +
DIR_SEP;
return GetVulkanDir() + "pipeline" + DIR_SEP;
}
void PipelineCache::SwitchPipelineCache(u64 title_id, const std::atomic_bool& stop_loading,

View File

@ -108,6 +108,9 @@ private:
/// Create pipeline cache directories. Returns true on success.
bool EnsureDirectories() const;
/// Returns the Vulkan shader directory
std::string GetVulkanDir() const;
/// Returns the pipeline cache storage dir
std::string GetPipelineCacheDir() const;