mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-27 13:11:20 -08:00
shader: Reorder shader cache directories
This commit is contained in:
parent
3025b2f605
commit
cb78a1b494
@ -238,16 +238,13 @@ void ShaderCache::LoadDiskResources(u64 title_id, std::stop_token stop_loading,
|
|||||||
if (title_id == 0) {
|
if (title_id == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto shader_dir{Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir)};
|
const auto shader_dir{Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir)};
|
||||||
auto base_dir{shader_dir / "new_opengl"};
|
const auto base_dir{shader_dir / fmt::format("{:016x}", title_id)};
|
||||||
auto transferable_dir{base_dir / "transferable"};
|
if (!Common::FS::CreateDir(shader_dir) || !Common::FS::CreateDir(base_dir)) {
|
||||||
auto precompiled_dir{base_dir / "precompiled"};
|
LOG_ERROR(Common_Filesystem, "Failed to create shader cache directories");
|
||||||
if (!Common::FS::CreateDir(shader_dir) || !Common::FS::CreateDir(base_dir) ||
|
|
||||||
!Common::FS::CreateDir(transferable_dir) || !Common::FS::CreateDir(precompiled_dir)) {
|
|
||||||
LOG_ERROR(Common_Filesystem, "Failed to create pipeline cache directories");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
shader_cache_filename = transferable_dir / fmt::format("{:016x}.bin", title_id);
|
shader_cache_filename = base_dir / "opengl.bin";
|
||||||
|
|
||||||
if (!workers) {
|
if (!workers) {
|
||||||
workers = CreateWorkers();
|
workers = CreateWorkers();
|
||||||
|
@ -337,22 +337,19 @@ void PipelineCache::LoadDiskResources(u64 title_id, std::stop_token stop_loading
|
|||||||
if (title_id == 0) {
|
if (title_id == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto shader_dir{Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir)};
|
const auto shader_dir{Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir)};
|
||||||
auto base_dir{shader_dir / "vulkan"};
|
const auto base_dir{shader_dir / fmt::format("{:016x}", title_id)};
|
||||||
auto transferable_dir{base_dir / "transferable"};
|
if (!Common::FS::CreateDir(shader_dir) || !Common::FS::CreateDir(base_dir)) {
|
||||||
auto precompiled_dir{base_dir / "precompiled"};
|
|
||||||
if (!Common::FS::CreateDir(shader_dir) || !Common::FS::CreateDir(base_dir) ||
|
|
||||||
!Common::FS::CreateDir(transferable_dir) || !Common::FS::CreateDir(precompiled_dir)) {
|
|
||||||
LOG_ERROR(Common_Filesystem, "Failed to create pipeline cache directories");
|
LOG_ERROR(Common_Filesystem, "Failed to create pipeline cache directories");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pipeline_cache_filename = transferable_dir / fmt::format("{:016x}.bin", title_id);
|
pipeline_cache_filename = base_dir / "vulkan.bin";
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
std::mutex mutex;
|
std::mutex mutex;
|
||||||
size_t total{0};
|
size_t total{};
|
||||||
size_t built{0};
|
size_t built{};
|
||||||
bool has_loaded{false};
|
bool has_loaded{};
|
||||||
} state;
|
} state;
|
||||||
|
|
||||||
const auto load_compute{[&](std::ifstream& file, FileEnvironment env) {
|
const auto load_compute{[&](std::ifstream& file, FileEnvironment env) {
|
||||||
|
Loading…
Reference in New Issue
Block a user