vk_pipeline_cache: Fix directory creation failure if shaders/vulkan/ is missing
This commit is contained in:
parent
a607e3dd22
commit
246e06d1a4
2 changed files with 9 additions and 3 deletions
|
|
@ -556,12 +556,15 @@ bool PipelineCache::EnsureDirectories() const {
|
||||||
};
|
};
|
||||||
|
|
||||||
return create_dir(FileUtil::GetUserPath(FileUtil::UserPath::ShaderDir)) &&
|
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 {
|
std::string PipelineCache::GetPipelineCacheDir() const {
|
||||||
return FileUtil::GetUserPath(FileUtil::UserPath::ShaderDir) + "vulkan" + DIR_SEP + "pipeline" +
|
return GetVulkanDir() + "pipeline" + DIR_SEP;
|
||||||
DIR_SEP;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PipelineCache::SwitchPipelineCache(u64 title_id, const std::atomic_bool& stop_loading,
|
void PipelineCache::SwitchPipelineCache(u64 title_id, const std::atomic_bool& stop_loading,
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,9 @@ private:
|
||||||
/// Create pipeline cache directories. Returns true on success.
|
/// Create pipeline cache directories. Returns true on success.
|
||||||
bool EnsureDirectories() const;
|
bool EnsureDirectories() const;
|
||||||
|
|
||||||
|
/// Returns the Vulkan shader directory
|
||||||
|
std::string GetVulkanDir() const;
|
||||||
|
|
||||||
/// Returns the pipeline cache storage dir
|
/// Returns the pipeline cache storage dir
|
||||||
std::string GetPipelineCacheDir() const;
|
std::string GetPipelineCacheDir() const;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue