From be552c37a19a6857babb7166a88529805a42b63b Mon Sep 17 00:00:00 2001 From: swurl Date: Sat, 10 May 2025 11:38:06 -0400 Subject: [PATCH] ui/overlay: Fix enhanced frame pacing naming and disable frameskip for now. (#99) Signed-off-by: swurl --- .ci/android/build.sh | 1 - .github/workflows/build.yml | 2 +- .github/workflows/trigger_release.yml | 2 +- README.md | 14 ++- .../features/settings/model/BooleanSetting.kt | 1 + .../settings/model/view/SettingsItem.kt | 86 +++++---------- .../settings/ui/SettingsFragmentPresenter.kt | 102 ++++-------------- .../yuzu_emu/fragments/EmulationFragment.kt | 3 +- .../app/src/main/res/values/strings.xml | 63 ++++++----- src/common/settings.h | 2 +- 10 files changed, 91 insertions(+), 185 deletions(-) diff --git a/.ci/android/build.sh b/.ci/android/build.sh index eaeff11472..edd65d9ae4 100755 --- a/.ci/android/build.sh +++ b/.ci/android/build.sh @@ -9,7 +9,6 @@ export NDK_CCACHE=$(which ccache) export ANDROID_KEYSTORE_FILE=~/android.keystore export ANDROID_KEYSTORE_PASS=`cat ~/android.pass` export ANDROID_KEY_ALIAS=`cat ~/android.alias` -export ANDROID_HOME=/opt/android-sdk/ cd src/android chmod +x ./gradlew diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 520e9562e7..d8d636c117 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -132,7 +132,7 @@ jobs: echo $GIT_TAG_NAME - name: Build - run: JAVA_HOME=$JAVA_HOME_21_X64 ./.ci/android/build.sh + run: ANDROID_HOME=/opt/android-sdk ./.ci/android/build.sh - name: Package Android artifacts run: ./.ci/android/package.sh diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml index f388fcf6c6..91bd4d2d15 100644 --- a/.github/workflows/trigger_release.yml +++ b/.github/workflows/trigger_release.yml @@ -129,7 +129,7 @@ jobs: echo $GIT_TAG_NAME - name: Build - run: JAVA_HOME=$JAVA_HOME_21_X64 ./.ci/android/build.sh + run: ANDROID_HOME=/opt/android-sdk ./.ci/android/build.sh - name: Package Android artifacts run: ./.ci/android/package.sh diff --git a/README.md b/README.md index 4ef169594c..0453211172 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Check out our [website](https://eden-emu.dev) for the latest news on exciting fe ## Development -Most of the development happens on our Git server. It is also where [our central repository](https://git.eden-emu.dev/eden-emu/eden) is hosted. For development discussions, please wait to join us on [Discord](W.I.P) once it is public. +Most of the development happens on our Git server. It is also where [our central repository](https://git.eden-emu.dev/eden-emu/eden) is hosted. For development discussions, please join us on [Discord](https://discord.gg/ynGGJAN4Rx). If you would like to contribute, we are open to new developers and pull requests. Please ensure that your work is of a high standard and properly documented. You can also contact any of the developers on Discord to learn more about the current state of the emulator. @@ -55,23 +55,21 @@ You can also contact any of the developers on Discord to learn more about the cu ## Download -You will be able to download the latest releases from [here](https://git.eden-emu.dev/eden-emu/eden/releases) once public. +You will be able to download the latest releases from [here](https://git.eden-emu.dev/eden-emu/eden/releases), or with MEGA links provided on Discord. ## Support -If you enjoy the project and would like to support us financially, please check out Camille's donations page! -
-
-Donations are not available yet. +If you enjoy the project and would like to support us financially, please check out our developers' donation pages! +- [crueter/Camille](https://liberapay.com/crueter) Any donations received will go towards things such as: * Switch consoles to explore and reverse-engineer the hardware * Switch games for testing, reverse-engineering, and implementing new features * Web hosting and infrastructure setup -* Software licences (e.g. Visual Studio, IDA Pro, etc.) * Additional hardware (e.g. GPUs as needed to improve rendering support, other peripherals to add support for, etc.) +* CI Infrastructure -If you would prefer to support us in a different way, please join our [Discord](W.I.P), once public, and talk to Camille. +If you would prefer to support us in a different way, please join our [Discord](https://discord.gg/ynGGJAN4Rx), once public, and talk to Camille. ## License diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt index 8b2d658f4b..2601387b76 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt @@ -17,6 +17,7 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting { RENDERER_USE_DISK_SHADER_CACHE("use_disk_shader_cache"), RENDERER_FORCE_MAX_CLOCK("force_max_clock"), RENDERER_ASYNCHRONOUS_SHADERS("use_asynchronous_shaders"), + RENDERER_FAST_GPU("use_fast_gpu_time"), RENDERER_REACTIVE_FLUSHING("use_reactive_flushing"), RENDERER_DEBUG("debug"), RENDERER_DYNA_STATE3("dyna_state3"), diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt index 0ac5f4576b..a373bd816c 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt @@ -52,6 +52,10 @@ abstract class SettingsItem( val isEditable: Boolean get() { + if (setting.key == BooleanSetting.FRAME_SKIPPING.key) { + // disabled for now + return false + } // Can't change docked mode toggle when using handheld mode if (setting.key == BooleanSetting.USE_DOCKED_MODE.key) { return NativeInput.getStyleIndex(0) != NpadStyleIndex.Handheld @@ -210,58 +214,6 @@ abstract class SettingsItem( override fun reset() = BooleanSetting.USE_DOCKED_MODE.reset() } - val enableInterpolationSetting = object : AbstractBooleanSetting { - override val key = BooleanSetting.FRAME_INTERPOLATION.key - - override fun getBoolean(needsGlobal: Boolean): Boolean = - BooleanSetting.FRAME_INTERPOLATION.getBoolean(needsGlobal) - - override fun setBoolean(value: Boolean) = - BooleanSetting.FRAME_INTERPOLATION.setBoolean(value) - - override val defaultValue = BooleanSetting.FRAME_INTERPOLATION.defaultValue - - override fun getValueAsString(needsGlobal: Boolean): String = - BooleanSetting.FRAME_INTERPOLATION.getValueAsString(needsGlobal) - - override fun reset() = BooleanSetting.FRAME_INTERPOLATION.reset() - } - - val enableFrameSkippingSetting = object : AbstractBooleanSetting { - override val key = BooleanSetting.FRAME_SKIPPING.key - - override fun getBoolean(needsGlobal: Boolean): Boolean = - BooleanSetting.FRAME_SKIPPING.getBoolean(needsGlobal) - - override fun setBoolean(value: Boolean) = - BooleanSetting.FRAME_SKIPPING.setBoolean(value) - - override val defaultValue = BooleanSetting.FRAME_SKIPPING.defaultValue - - override fun getValueAsString(needsGlobal: Boolean): String = - BooleanSetting.FRAME_SKIPPING.getValueAsString(needsGlobal) - - override fun reset() = BooleanSetting.FRAME_SKIPPING.reset() - } - - val syncCoreSpeedSetting = object : AbstractBooleanSetting { - override val key = BooleanSetting.CORE_SYNC_CORE_SPEED.key - - override fun getBoolean(needsGlobal: Boolean): Boolean { - return BooleanSetting.CORE_SYNC_CORE_SPEED.getBoolean(needsGlobal) - } - - override fun setBoolean(value: Boolean) { - BooleanSetting.CORE_SYNC_CORE_SPEED.setBoolean(value) - } - - override val defaultValue = BooleanSetting.CORE_SYNC_CORE_SPEED.defaultValue - - override fun getValueAsString(needsGlobal: Boolean): String = - BooleanSetting.CORE_SYNC_CORE_SPEED.getValueAsString(needsGlobal) - - override fun reset() = BooleanSetting.CORE_SYNC_CORE_SPEED.reset() - } put( SwitchSetting( @@ -288,7 +240,7 @@ abstract class SettingsItem( ) put( SwitchSetting( - syncCoreSpeedSetting, + BooleanSetting.CORE_SYNC_CORE_SPEED, titleId = R.string.use_sync_core, descriptionId = R.string.use_sync_core_description ) @@ -339,24 +291,27 @@ abstract class SettingsItem( SingleChoiceSetting( IntSetting.RENDERER_NVDEC_EMULATION, titleId = R.string.nvdec_emulation, + descriptionId = R.string.nvdec_emulation_description, choicesId = R.array.rendererNvdecNames, valuesId = R.array.rendererNvdecValues ) ) put( SingleChoiceSetting( - IntSetting.RENDERER_ASTC_DECODE_METHOD, - titleId = R.string.accelerate_astc, - choicesId = R.array.astcDecodingMethodNames, - valuesId = R.array.astcDecodingMethodValues + IntSetting.RENDERER_ASTC_DECODE_METHOD, + titleId = R.string.accelerate_astc, + descriptionId = R.string.accelerate_astc_description, + choicesId = R.array.astcDecodingMethodNames, + valuesId = R.array.astcDecodingMethodValues ) ) put( SingleChoiceSetting( - IntSetting.RENDERER_ASTC_RECOMPRESSION, - titleId = R.string.astc_recompression, - choicesId = R.array.astcRecompressionMethodNames, - valuesId = R.array.astcRecompressionMethodValues + IntSetting.RENDERER_ASTC_RECOMPRESSION, + titleId = R.string.astc_recompression, + descriptionId = R.string.astc_recompression_description, + choicesId = R.array.astcRecompressionMethodNames, + valuesId = R.array.astcRecompressionMethodValues ) ) put( @@ -517,7 +472,7 @@ abstract class SettingsItem( SingleChoiceSetting( IntSetting.RENDERER_OPTIMIZE_SPIRV_OUTPUT, titleId = R.string.renderer_optimize_spirv_output, - descriptionId = 0, + descriptionId = R.string.renderer_optimize_spirv_output_description, choicesId = R.array.optimizeSpirvOutputEntries, valuesId = R.array.optimizeSpirvOutputValues ) @@ -529,6 +484,13 @@ abstract class SettingsItem( descriptionId = R.string.renderer_asynchronous_shaders_description ) ) + put( + SwitchSetting( + BooleanSetting.RENDERER_FAST_GPU, + titleId = R.string.use_fast_gpu_time, + descriptionId = R.string.use_fast_gpu_time_description + ) + ) put( SwitchSetting( BooleanSetting.RENDERER_REACTIVE_FLUSHING, diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt index 3c1671a691..aa7cae083b 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt @@ -456,92 +456,30 @@ class SettingsFragmentPresenter( override val isSaveable = true } } + private fun addEdenVeilSettings(sl: ArrayList) { - sl.apply { - add( - SwitchSetting( - InterpolationSetting, // The interpolation setting object you've created - titleId = R.string.frame_interpolation, // Use appropriate string resources for the title - descriptionId = R.string.frame_interpolation_description // Description resource for the interpolation setting - ) - ) - add( - SwitchSetting( - frameSkippingSetting, - titleId = R.string.frame_skipping, - descriptionId = R.string.frame_skipping_description - ) - ) - add( - SwitchSetting( - BooleanSetting.USE_LRU_CACHE, - titleId = R.string.use_lru_cache, - descriptionId = R.string.use_lru_cache_description - ) - ) + sl.apply { + add(BooleanSetting.FRAME_INTERPOLATION.key) + add(BooleanSetting.FRAME_SKIPPING.key) + add(BooleanSetting.USE_LRU_CACHE.key) + add(BooleanSetting.RENDERER_FAST_GPU.key) - add(ByteSetting.RENDERER_DYNA_STATE.key) - add(BooleanSetting.RENDERER_DYNA_STATE3.key) - add(BooleanSetting.RENDERER_PROVOKING_VERTEX.key) - add(BooleanSetting.RENDERER_DESCRIPTOR_INDEXING.key) + add(ByteSetting.RENDERER_DYNA_STATE.key) - add( - SwitchSetting( - syncCoreSpeedSetting, - titleId = R.string.use_sync_core, - descriptionId = R.string.use_sync_core_description - ) - ) - add( - SingleChoiceSetting( - IntSetting.RENDERER_SHADER_BACKEND, - titleId = R.string.shader_backend, - choicesId = R.array.rendererShaderNames, - valuesId = R.array.rendererShaderValues - ) - ) - add( - SingleChoiceSetting( - IntSetting.RENDERER_NVDEC_EMULATION, - titleId = R.string.nvdec_emulation, - choicesId = R.array.rendererNvdecNames, - valuesId = R.array.rendererNvdecValues - ) - ) - add( - SingleChoiceSetting( - IntSetting.RENDERER_ASTC_DECODE_METHOD, - titleId = R.string.accelerate_astc, - choicesId = R.array.astcDecodingMethodNames, - valuesId = R.array.astcDecodingMethodValues - ) - ) - add( - SingleChoiceSetting( - IntSetting.RENDERER_ASTC_RECOMPRESSION, - titleId = R.string.astc_recompression, - choicesId = R.array.astcRecompressionMethodNames, - valuesId = R.array.astcRecompressionMethodValues - ) - ) - add( - SingleChoiceSetting( - IntSetting.RENDERER_VRAM_USAGE_MODE, - titleId = R.string.vram_usage_mode, - choicesId = R.array.vramUsageMethodNames, - valuesId = R.array.vramUsageMethodValues - ) - ) - add( - SingleChoiceSetting( - IntSetting.RENDERER_OPTIMIZE_SPIRV_OUTPUT, - titleId = R.string.renderer_optimize_spirv_output, - choicesId = R.array.optimizeSpirvOutputEntries, - valuesId = R.array.optimizeSpirvOutputValues - ) - ) + add(BooleanSetting.RENDERER_DYNA_STATE3.key) + add(BooleanSetting.RENDERER_PROVOKING_VERTEX.key) + add(BooleanSetting.RENDERER_DESCRIPTOR_INDEXING.key) + + add(BooleanSetting.CORE_SYNC_CORE_SPEED.key) + + add(IntSetting.RENDERER_SHADER_BACKEND.key) + add(IntSetting.RENDERER_NVDEC_EMULATION.key) + add(IntSetting.RENDERER_ASTC_DECODE_METHOD.key) + add(IntSetting.RENDERER_ASTC_RECOMPRESSION.key) + add(IntSetting.RENDERER_VRAM_USAGE_MODE.key) + add(IntSetting.RENDERER_OPTIMIZE_SPIRV_OUTPUT.key) + } } -} private fun addInputPlayer(sl: ArrayList, playerIndex: Int) { sl.apply { val connectedSetting = object : AbstractBooleanSetting { diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt index 219aae8c5c..fcc0ae8b99 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt @@ -565,8 +565,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { var fpsText = String.format("FPS: %.1f", actualFps) if (enableFrameInterpolation) { - val interpolatedFps = actualFps * 2 - fpsText += String.format(" (Interp: %.1f)", interpolatedFps) + fpsText += ("(Enhanced)") } if (enableFrameSkipping) { diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index a48239a146..427b2890ad 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -42,14 +42,10 @@ Eden’s Veil Beyond default - WIP: Frameskip - Toggle frame skipping to improve performance by reducing the number of rendered frames. Enhanced Frame Pacing - Ensures smooth and consistent frame delivery by synchronizing the timing between frames, reducing stuttering and uneven animation. Ideal for games that experience frame timing instability or micro-stutter during gameplay - Enable LRU Cache - Enable or disable the Least Recently Used (LRU) cache for improved performance, some games have issue with it, e.g TOTK 1.2.1 + Ensures smooth and consistent frame delivery by synchronizing the timing between frames, reducing stuttering and uneven animation. Ideal for games that experience frame timing instability or micro-stutters during gameplay. Extended Dynamic State - Enables Vulkan features to improve performance, rendering, and save resources on pipeline creation while maintaining lower CPU/GPU usage. These extensions may increase device temperature, and GPUs belonging to the older A6XX line may not react properly. Set to 0 to use Yuzu emulated formats. + Enables Vulkan features to improve performance, rendering, and save resources on pipeline creation while maintaining lower CPU/GPU usage. These extensions may increase device temperature, and GPUs belonging to the older A6XX line may not react properly. Set to 0 to use Legacy emulated formats. EDS3 + VertexInputDynamicState Improves performance on newer devices. Only supported on Vulkan 1.3+ GPUs. Synchronize Core Speed @@ -65,26 +61,6 @@ Descriptor Indexing Improves texture and buffer handling, as well as the Maxwell translation layer. Supported by some Vulkan 1.1 GPUs and all Vulkan 1.2+ GPUs. - - ASTC Decoding Method - Pick how ASTC-compressed textures are decoded for rendering. - CPU - GPU - CPU Asynchronously - - - ASTC Recompression Method - Choose how ASTC textures are recompressed to improve compatibility and performance. - Uncompressed - BC1 (Low Quality) - BC3 (Medium Quality) - - - VRAM Usage Mode - Control how aggressively the emulator allocates and frees GPU memory. - Conservative - Aggressive - Shader Backend Choose how shaders are compiled and translated for your GPU. @@ -99,7 +75,6 @@ None - Optimize SPIRV output Never On Load Always @@ -397,6 +372,8 @@ Set custom RTC + WIP: Frameskip + Toggle frame skipping to improve performance by reducing the number of rendered frames. This feature is still being worked on and will be enabled in future releases. Accuracy level Resolution (Handheld/Docked) VSync mode @@ -408,8 +385,12 @@ Anti-aliasing method Force maximum clocks (Adreno only) Forces the GPU to run at the maximum possible clocks (thermal constraints will still be applied). + Optimize SPIRV output + Optimizes compiled shader to improve GPU efficiency. Use asynchronous shaders Compiles shaders asynchronously, reducing stutter but may introduce glitches. + Use Fast GPU Time + Forces most games to run at their highest native resolution. This option is hacky and may cause issues. Use reactive flushing Improves rendering accuracy in some games at the cost of performance. Disk shader cache @@ -734,6 +715,30 @@ High Extreme (Slow) + + ASTC Decoding Method + Pick how ASTC-compressed textures are decoded for rendering: CPU (slow, safe), GPU (fast, recommended), or CPU Async (no stutters, may cause issues) + + + CPU + GPU + CPU Asynchronously + + + ASTC Recompression Method + Choose how ASTC textures are recompressed to improve compatibility and performance. Enabling this option saves VRAM but may lower texture quality. + + + Uncompressed + BC1 (Low Quality) + BC3 (Medium Quality) + + + VRAM Usage Mode + Control how aggressively the emulator allocates and frees GPU memory. + Conservative + Aggressive + 0.5X (360p/540p) 0.75X (540p/810p) @@ -742,6 +747,10 @@ 3X (2160p/3240p) (Slow) 4X (2880p/4320p) (Slow) + + Enable LRU Cache + Enable or disable the Least Recently Used (LRU) cache, increasing performance by saving CPU process usage. Some games have issue with it, notably TotK 1.2.1, so disable if the game doesn\'t boot or crashes randomly. + Immediate (Off) Mailbox diff --git a/src/common/settings.h b/src/common/settings.h index 67ca2936e4..92e02d9887 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -284,7 +284,7 @@ struct Values { #ifdef __ANDROID__ SwitchableSetting frame_interpolation{linkage, true, "frame_interpolation", Category::Renderer, Specialization::RuntimeList}; - SwitchableSetting frame_skipping{linkage, true, "frame_skipping", Category::Renderer, + SwitchableSetting frame_skipping{linkage, false, "frame_skipping", Category::Renderer, Specialization::RuntimeList}; #endif SwitchableSetting use_disk_shader_cache{linkage, true, "use_disk_shader_cache",