mirror of
https://git.suyu.dev/suyu/suyu
synced 2025-09-01 00:46:32 -05:00
Rebrand Common FS Path functions
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <cstring>
|
||||
@@ -28,7 +28,7 @@ MICROPROFILE_DEFINE(MacroHLE, "GPU", "Execute macro HLE", MP_RGB(128, 192, 192))
|
||||
namespace Tegra {
|
||||
|
||||
static void Dump(u64 hash, std::span<const u32> code, bool decompiled = false) {
|
||||
const auto base_dir{Common::FS::GetYuzuPath(Common::FS::YuzuPath::DumpDir)};
|
||||
const auto base_dir{Common::FS::GetSuyuPath(Common::FS::SuyuPath::DumpDir)};
|
||||
const auto macro_dir{base_dir / "macros"};
|
||||
if (!Common::FS::CreateDir(base_dir) || !Common::FS::CreateDir(macro_dir)) {
|
||||
LOG_ERROR(Common_Filesystem, "Failed to create macro dump directories");
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project & 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <algorithm>
|
||||
@@ -108,14 +108,14 @@ bool IsASTCSupported() {
|
||||
|
||||
static bool HasSlowSoftwareAstc(std::string_view vendor_name, std::string_view renderer) {
|
||||
// ifdef for Unix reduces string comparisons for non-Windows drivers, and Intel
|
||||
#ifdef YUZU_UNIX
|
||||
#ifdef SUYU_UNIX
|
||||
// Sorted vaguely by how likely a vendor is to appear
|
||||
if (vendor_name == "AMD") {
|
||||
// RadeonSI
|
||||
return true;
|
||||
}
|
||||
if (vendor_name == "Intel") {
|
||||
// Must be inside YUZU_UNIX ifdef as the Windows driver uses the same vendor string
|
||||
// Must be inside SUYU_UNIX ifdef as the Windows driver uses the same vendor string
|
||||
// iris, crocus
|
||||
const bool is_intel_dg = (renderer.find("DG") != std::string_view::npos);
|
||||
return is_intel_dg;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <atomic>
|
||||
@@ -260,7 +260,7 @@ void ShaderCache::LoadDiskResources(u64 title_id, std::stop_token stop_loading,
|
||||
if (title_id == 0) {
|
||||
return;
|
||||
}
|
||||
const auto shader_dir{Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir)};
|
||||
const auto shader_dir{Common::FS::GetSuyuPath(Common::FS::SuyuPath::ShaderDir)};
|
||||
const auto base_dir{shader_dir / fmt::format("{:016x}", title_id)};
|
||||
if (!Common::FS::CreateDir(shader_dir) || !Common::FS::CreateDir(base_dir)) {
|
||||
LOG_ERROR(Common_Filesystem, "Failed to create shader cache directories");
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project & 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <algorithm>
|
||||
@@ -464,7 +464,7 @@ void PipelineCache::LoadDiskResources(u64 title_id, std::stop_token stop_loading
|
||||
if (title_id == 0) {
|
||||
return;
|
||||
}
|
||||
const auto shader_dir{Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir)};
|
||||
const auto shader_dir{Common::FS::GetSuyuPath(Common::FS::SuyuPath::ShaderDir)};
|
||||
const auto base_dir{shader_dir / fmt::format("{:016x}", title_id)};
|
||||
if (!Common::FS::CreateDir(shader_dir) || !Common::FS::CreateDir(base_dir)) {
|
||||
LOG_ERROR(Common_Filesystem, "Failed to create pipeline cache directories");
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <algorithm>
|
||||
@@ -91,7 +91,7 @@ static std::string_view StageToPrefix(Shader::Stage stage) {
|
||||
static void DumpImpl(u64 pipeline_hash, u64 shader_hash, std::span<const u64> code,
|
||||
[[maybe_unused]] u32 read_highest, [[maybe_unused]] u32 read_lowest,
|
||||
u32 initial_offset, Shader::Stage stage) {
|
||||
const auto shader_dir{Common::FS::GetYuzuPath(Common::FS::YuzuPath::DumpDir)};
|
||||
const auto shader_dir{Common::FS::GetSuyuPath(Common::FS::SuyuPath::DumpDir)};
|
||||
const auto base_dir{shader_dir / "shaders"};
|
||||
if (!Common::FS::CreateDir(shader_dir) || !Common::FS::CreateDir(base_dir)) {
|
||||
LOG_ERROR(Common_Filesystem, "Failed to create shader dump directories");
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#ifdef HAS_NSIGHT_AFTERMATH
|
||||
@@ -47,7 +47,7 @@ NsightAftermathTracker::NsightAftermathTracker() {
|
||||
LOG_ERROR(Render_Vulkan, "Failed to load Nsight Aftermath function pointers");
|
||||
return;
|
||||
}
|
||||
dump_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::LogDir) / "gpucrash";
|
||||
dump_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::LogDir) / "gpucrash";
|
||||
|
||||
Common::FS::RemoveDirRecursively(dump_dir);
|
||||
if (!Common::FS::CreateDir(dump_dir)) {
|
||||
|
Reference in New Issue
Block a user