aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/fs/fs_paths.h5
-rw-r--r--src/common/fs/path_util.cpp1
-rw-r--r--src/common/fs/path_util.h3
-rw-r--r--src/common/settings.cpp22
-rw-r--r--src/common/settings.h84
5 files changed, 105 insertions, 10 deletions
diff --git a/src/common/fs/fs_paths.h b/src/common/fs/fs_paths.h
index 640a83c44b..a31e609bda 100644
--- a/src/common/fs/fs_paths.h
+++ b/src/common/fs/fs_paths.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
@@ -20,6 +20,7 @@
#define KEYS_DIR "keys"
#define LOAD_DIR "load"
#define LOG_DIR "log"
+#define LOSSLESS_DIR "lossless"
#define NAND_DIR "nand"
#define PLAY_TIME_DIR "play_time"
#define SCREENSHOTS_DIR "screenshots"
@@ -37,3 +38,5 @@
// yuzu-specific files
#define LOG_FILE "eden_log.txt"
+#define LOSSLESS_DLL_FILE "Lossless.dll"
+#define LOSSLESS_CACHE_FILE "lsfg_spirv.cache"
diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp
index 4105855866..9adf210ab7 100644
--- a/src/common/fs/path_util.cpp
+++ b/src/common/fs/path_util.cpp
@@ -157,6 +157,7 @@ public:
GenerateEdenPath(EdenPath::KeysDir, eden_path / KEYS_DIR);
GenerateEdenPath(EdenPath::LoadDir, eden_path / LOAD_DIR);
GenerateEdenPath(EdenPath::LogDir, eden_path / LOG_DIR);
+ GenerateEdenPath(EdenPath::LosslessDir, eden_path / LOSSLESS_DIR);
GenerateEdenPath(EdenPath::NANDDir, eden_path / NAND_DIR);
GenerateEdenPath(EdenPath::PlayTimeDir, eden_path / PLAY_TIME_DIR);
GenerateEdenPath(EdenPath::SaveDir, eden_path / NAND_DIR);
diff --git a/src/common/fs/path_util.h b/src/common/fs/path_util.h
index 9f597232a5..febed9c388 100644
--- a/src/common/fs/path_util.h
+++ b/src/common/fs/path_util.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
@@ -23,6 +23,7 @@ enum class EdenPath {
KeysDir, // Where key files are stored.
LoadDir, // Where cheat/mod files are stored.
LogDir, // Where log files are stored.
+ LosslessDir, // Where the user-supplied Lossless Scaling library is stored.
NANDDir, // Where the emulated NAND is stored.
PlayTimeDir, // Where play time data is stored.
SaveDir, // Where save data is stored.
diff --git a/src/common/settings.cpp b/src/common/settings.cpp
index db318613dd..6cc976fe51 100644
--- a/src/common/settings.cpp
+++ b/src/common/settings.cpp
@@ -380,6 +380,28 @@ void UpdateRescalingInfo() {
TranslateResolutionInfo(setup, info);
}
+u32 FrameGenMultiplier() {
+ return std::clamp(values.frame_gen_multiplier.GetValue(), MIN_FRAME_GEN_MULTIPLIER,
+ MAX_FRAME_GEN_MULTIPLIER);
+}
+
+size_t FrameGenGenerations() {
+ if (!values.frame_gen.GetValue()) {
+ return 0;
+ }
+ return FrameGenMultiplier() - 1;
+}
+
+size_t FrameGenMaxGenerations() {
+ if (!values.frame_gen.GetValue()) {
+ return 0;
+ }
+ if (values.frame_gen_target_rate.GetValue() != 0) {
+ return MAX_FRAME_GEN_MULTIPLIER - 1;
+ }
+ return FrameGenMultiplier() - 1;
+}
+
void RestoreGlobalState(bool is_powered_on) {
// If a game is running, DO NOT restore the global settings state
if (is_powered_on) {
diff --git a/src/common/settings.h b/src/common/settings.h
index 0f35045622..7ac4b11173 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -352,7 +352,7 @@ struct Values {
true};
SwitchableSetting<ScalingFilter> scaling_filter{linkage,
- ScalingFilter::Bilinear,
+ ScalingFilter::NearestNeighbor,
"scaling_filter",
Category::Renderer,
Specialization::Default,
@@ -388,6 +388,69 @@ struct Values {
true,
true};
+ SwitchableSetting<bool> frame_gen{linkage, false, "frame_gen", Category::Renderer,
+ Specialization::Default, true, false};
+
+ SwitchableSetting<u32, true> frame_gen_multiplier{linkage,
+ 2,
+ 2,
+ 4,
+ "frame_gen_multiplier",
+ Category::Renderer,
+ Specialization::Countable,
+ true,
+ false,
+ &frame_gen};
+
+ SwitchableSetting<u32, true> frame_gen_target_rate{linkage,
+ 0,
+ 0,
+ 240,
+ "frame_gen_target_rate",
+ Category::Renderer,
+ Specialization::Countable,
+ true,
+ true,
+ &frame_gen};
+
+ SwitchableSetting<bool> frame_gen_flow_scale_auto{linkage,
+ true,
+ "frame_gen_flow_scale_auto",
+ Category::Renderer,
+ Specialization::Default,
+ true,
+ false,
+ &frame_gen};
+
+ SwitchableSetting<u32, true> frame_gen_flow_scale{linkage,
+ 75,
+ 25,
+ 100,
+ "frame_gen_flow_scale",
+ Category::Renderer,
+ Specialization::Countable |
+ Specialization::Percentage,
+ true,
+ true,
+ &frame_gen};
+
+ SwitchableSetting<u32, true> frame_gen_queue_target{linkage,
+ 1,
+ 0,
+ 2,
+ "frame_gen_queue_target",
+ Category::Renderer,
+ Specialization::Countable,
+ true,
+ false,
+ &frame_gen};
+
+ SwitchableSetting<bool> frame_gen_fp16{linkage, true, "frame_gen_fp16", Category::Renderer,
+ Specialization::Default, true, false, &frame_gen};
+
+ SwitchableSetting<bool> frame_gen_dump_flow{linkage, false, "frame_gen_dump_flow",
+ Category::Renderer};
+
SwitchableSetting<bool> use_asynchronous_gpu_emulation{linkage,
#ifdef __ANDROID__
false,
@@ -569,13 +632,8 @@ struct Values {
SwitchableSetting<bool> emulate_bgr565{linkage, false, "emulate_bgr565",
Category::RendererHacks};
- SwitchableSetting<bool> rescale_hack{linkage,
-#ifdef __ANDROID__
- true,
-#else
- false,
-#endif
- "rescale_hack", Category::RendererHacks};
+ SwitchableSetting<bool> rescale_hack{linkage, false, "rescale_hack",
+ Category::RendererHacks};
SwitchableSetting<bool> enable_gpu_buffer_readback{linkage,
false,
"enable_gpu_buffer_readback",
@@ -875,10 +933,20 @@ struct Values {
// Per-game overrides
bool use_squashed_iterated_blend;
+
};
extern Values values;
+constexpr u32 MIN_FRAME_GEN_MULTIPLIER = 2;
+constexpr u32 MAX_FRAME_GEN_MULTIPLIER = 4;
+
+[[nodiscard]] u32 FrameGenMultiplier();
+
+[[nodiscard]] size_t FrameGenGenerations();
+
+[[nodiscard]] size_t FrameGenMaxGenerations();
+
bool getDebugKnobAt(u8 i);
void UpdateGPUAccuracy();