mirror of
https://github.com/azahar-emu/azahar
synced 2025-11-06 15:09:58 +01:00
vk_pipeline_cache: Fix directory creation failure if shaders/vulkan/ is missing
This commit is contained in:
parent
118d124852
commit
a674eb8367
@ -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…
x
Reference in New Issue
Block a user