[android] Early release fences option #95
6 changed files with 37 additions and 6 deletions
|
@ -25,6 +25,7 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
|
||||||
RENDERER_ASYNCHRONOUS_SHADERS("use_asynchronous_shaders"),
|
RENDERER_ASYNCHRONOUS_SHADERS("use_asynchronous_shaders"),
|
||||||
RENDERER_FAST_GPU("use_fast_gpu_time"),
|
RENDERER_FAST_GPU("use_fast_gpu_time"),
|
||||||
RENDERER_REACTIVE_FLUSHING("use_reactive_flushing"),
|
RENDERER_REACTIVE_FLUSHING("use_reactive_flushing"),
|
||||||
|
RENDERER_EARLY_RELEASE_FENCES("early_release_fences"),
|
||||||
RENDERER_DEBUG("debug"),
|
RENDERER_DEBUG("debug"),
|
||||||
RENDERER_PROVOKING_VERTEX("provoking_vertex"),
|
RENDERER_PROVOKING_VERTEX("provoking_vertex"),
|
||||||
RENDERER_DESCRIPTOR_INDEXING("descriptor_indexing"),
|
RENDERER_DESCRIPTOR_INDEXING("descriptor_indexing"),
|
||||||
|
|
|
@ -666,6 +666,13 @@ abstract class SettingsItem(
|
||||||
descriptionId = R.string.renderer_reactive_flushing_description
|
descriptionId = R.string.renderer_reactive_flushing_description
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
put(
|
||||||
|
SwitchSetting(
|
||||||
|
BooleanSetting.RENDERER_EARLY_RELEASE_FENCES,
|
||||||
|
titleId = R.string.renderer_early_release_fences,
|
||||||
|
descriptionId = R.string.renderer_early_release_fences_description
|
||||||
|
)
|
||||||
|
)
|
||||||
put(
|
put(
|
||||||
SingleChoiceSetting(
|
SingleChoiceSetting(
|
||||||
IntSetting.MAX_ANISOTROPY,
|
IntSetting.MAX_ANISOTROPY,
|
||||||
|
|
|
@ -450,6 +450,7 @@ class SettingsFragmentPresenter(
|
||||||
add(BooleanSetting.ENABLE_RAII.key)
|
add(BooleanSetting.ENABLE_RAII.key)
|
||||||
add(BooleanSetting.FRAME_INTERPOLATION.key)
|
add(BooleanSetting.FRAME_INTERPOLATION.key)
|
||||||
add(BooleanSetting.RENDERER_FAST_GPU.key)
|
add(BooleanSetting.RENDERER_FAST_GPU.key)
|
||||||
|
add(BooleanSetting.RENDERER_EARLY_RELEASE_FENCES.key)
|
||||||
add(IntSetting.FAST_GPU_TIME.key)
|
add(IntSetting.FAST_GPU_TIME.key)
|
||||||
add(IntSetting.RENDERER_SHADER_BACKEND.key)
|
add(IntSetting.RENDERER_SHADER_BACKEND.key)
|
||||||
add(IntSetting.RENDERER_NVDEC_EMULATION.key)
|
add(IntSetting.RENDERER_NVDEC_EMULATION.key)
|
||||||
|
|
|
@ -88,12 +88,8 @@
|
||||||
<string name="enable_raii_description">A method of automatic resource management in Vulkan that ensures proper release of resources when they are no longer needed, but may cause crashes in bundled games.</string>
|
<string name="enable_raii_description">A method of automatic resource management in Vulkan that ensures proper release of resources when they are no longer needed, but may cause crashes in bundled games.</string>
|
||||||
<string name="frame_interpolation">Enhanced Frame Pacing</string>
|
<string name="frame_interpolation">Enhanced Frame Pacing</string>
|
||||||
<string name="frame_interpolation_description">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.</string>
|
<string name="frame_interpolation_description">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.</string>
|
||||||
<string name="use_auto_stub">Use Auto Stub</string>
|
<string name="renderer_early_release_fences">Release fences early</string>
|
||||||
<string name="use_auto_stub_description">Automatically stub missing services and functions. This may improve compatibility but can cause crashes and stability issues.</string>
|
<string name="renderer_early_release_fences_description">Some games may require this to get past 0FPS errors, such as DKCR:HD, Subnautica, and Ori 2.</string>
|
||||||
<string name="uninstall_firmware">Uninstall firmware</string>
|
|
||||||
<string name="uninstall_firmware_description">Uninstalling the firmware will remove it from the device and may affect game compatibility.</string>
|
|
||||||
<string name="firmware_uninstalling">Uninstalling firmware</string>
|
|
||||||
<string name="firmware_uninstalled_success">Firmware uninstalled successfully</string>
|
|
||||||
|
|
||||||
<string name="veil_misc">CPU and Memory</string>
|
<string name="veil_misc">CPU and Memory</string>
|
||||||
<string name="use_sync_core">Synchronize Core Speed</string>
|
<string name="use_sync_core">Synchronize Core Speed</string>
|
||||||
|
@ -385,6 +381,11 @@
|
||||||
<string name="keys_missing_description">Firmware and retail games cannot be decrypted</string>
|
<string name="keys_missing_description">Firmware and retail games cannot be decrypted</string>
|
||||||
<string name="keys_missing_help">https://yuzu-mirror.github.io/help/quickstart/#dumping-decryption-keys</string>
|
<string name="keys_missing_help">https://yuzu-mirror.github.io/help/quickstart/#dumping-decryption-keys</string>
|
||||||
|
|
||||||
|
<string name="uninstall_firmware">Uninstall firmware</string>
|
||||||
|
<string name="uninstall_firmware_description">Uninstalling the firmware will remove it from the device and may affect game compatibility.</string>
|
||||||
|
<string name="firmware_uninstalling">Uninstalling firmware</string>
|
||||||
|
<string name="firmware_uninstalled_success">Firmware uninstalled successfully</string>
|
||||||
|
|
||||||
<string name="firmware_invalid">Firmware Invalid</string>
|
<string name="firmware_invalid">Firmware Invalid</string>
|
||||||
<string name="error_firmware_missing">Firmware is required to run certain games and use system applications. Eden only works with firmware 19.0.1 and earlier.</string>
|
<string name="error_firmware_missing">Firmware is required to run certain games and use system applications. Eden only works with firmware 19.0.1 and earlier.</string>
|
||||||
<string name="error_firmware_corrupted">Firmware reported as present, but was unable to be read. Check for decryption keys and redump firmware if necessary.</string>
|
<string name="error_firmware_corrupted">Firmware reported as present, but was unable to be read. Check for decryption keys and redump firmware if necessary.</string>
|
||||||
|
@ -510,6 +511,8 @@
|
||||||
<string name="cpu">CPU</string>
|
<string name="cpu">CPU</string>
|
||||||
<string name="cpu_debug_mode">CPU Debugging</string>
|
<string name="cpu_debug_mode">CPU Debugging</string>
|
||||||
<string name="cpu_debug_mode_description">Puts the CPU in a slow debugging mode.</string>
|
<string name="cpu_debug_mode_description">Puts the CPU in a slow debugging mode.</string>
|
||||||
|
<string name="use_auto_stub">Use Auto Stub</string>
|
||||||
|
<string name="use_auto_stub_description">Automatically stub missing services and functions. This may improve compatibility but can cause crashes and stability issues.</string>
|
||||||
|
|
||||||
<string name="gpu">GPU</string>
|
<string name="gpu">GPU</string>
|
||||||
<string name="renderer_api">API</string>
|
<string name="renderer_api">API</string>
|
||||||
|
|
|
@ -457,6 +457,16 @@ struct Values {
|
||||||
Specialization::Default,
|
Specialization::Default,
|
||||||
true,
|
true,
|
||||||
true};
|
true};
|
||||||
|
#ifdef ANDROID
|
||||||
|
SwitchableSetting<bool> early_release_fences{linkage,
|
||||||
|
false,
|
||||||
|
"early_release_fences",
|
||||||
|
Category::RendererAdvanced,
|
||||||
|
Specialization::Default,
|
||||||
|
true,
|
||||||
|
true};
|
||||||
|
#endif
|
||||||
|
|
||||||
SwitchableSetting<bool> async_presentation{linkage,
|
SwitchableSetting<bool> async_presentation{linkage,
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
true,
|
true,
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
@ -73,9 +76,15 @@ public:
|
||||||
|
|
||||||
void SignalFence(std::function<void()>&& func) {
|
void SignalFence(std::function<void()>&& func) {
|
||||||
bool delay_fence = Settings::IsGPULevelHigh();
|
bool delay_fence = Settings::IsGPULevelHigh();
|
||||||
|
#ifdef __ANDROID__
|
||||||
|
if (!delay_fence && Settings::values.early_release_fences.GetValue()) {
|
||||||
|
TryReleasePendingFences<false>();
|
||||||
|
}
|
||||||
|
#else
|
||||||
if constexpr (!can_async_check) {
|
if constexpr (!can_async_check) {
|
||||||
TryReleasePendingFences<false>();
|
TryReleasePendingFences<false>();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
const bool should_flush = ShouldFlush();
|
const bool should_flush = ShouldFlush();
|
||||||
CommitAsyncFlushes();
|
CommitAsyncFlushes();
|
||||||
TFence new_fence = CreateFence(!should_flush);
|
TFence new_fence = CreateFence(!should_flush);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue