[hw_composer]: Add "Respect present interval 0 for unlocked FPS" #224
7 changed files with 29 additions and 0 deletions
|
@ -50,6 +50,7 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
|
|||
SOC_OVERLAY_BACKGROUND("soc_overlay_background"),
|
||||
|
||||
ENABLE_RAII("enable_raii"),
|
||||
RESPECT_PRESENT_INTERVAL_ZERO("respect_present_interval_zero"),
|
||||
FRAME_INTERPOLATION("frame_interpolation"),
|
||||
// FRAME_SKIPPING("frame_skipping"),
|
||||
|
||||
|
|
|
@ -227,6 +227,13 @@ abstract class SettingsItem(
|
|||
descriptionId = R.string.enable_raii_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.RESPECT_PRESENT_INTERVAL_ZERO,
|
||||
titleId = R.string.respect_present_interval_zero,
|
||||
descriptionId = R.string.respect_present_interval_zero_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.FRAME_INTERPOLATION,
|
||||
|
|
|
@ -446,6 +446,7 @@ class SettingsFragmentPresenter(
|
|||
|
||||
add(HeaderSetting(R.string.veil_renderer))
|
||||
add(BooleanSetting.ENABLE_RAII.key)
|
||||
add(BooleanSetting.RESPECT_PRESENT_INTERVAL_ZERO.key)
|
||||
add(BooleanSetting.RENDERER_EARLY_RELEASE_FENCES.key)
|
||||
add(BooleanSetting.BUFFER_REORDER_DISABLE.key)
|
||||
add(BooleanSetting.FRAME_INTERPOLATION.key)
|
||||
|
|
|
@ -86,6 +86,8 @@
|
|||
<string name="veil_renderer">Renderer</string>
|
||||
<string name="enable_raii">RAII</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="respect_present_interval_zero">Respect present interval 0 for unlocked FPS</string>
|
||||
<string name="respect_present_interval_zero_description">When enabled, present interval 0 will be used for games requesting unlocked FPS. This matches console behavior more closely, but may cause higher battery usage and frame pacing issues. When disabled (default), present interval 0 is capped at 120FPS to conserve battery.</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="renderer_early_release_fences">Release Fences Early</string>
|
||||
|
|
|
@ -338,6 +338,9 @@ struct Values {
|
|||
Category::Renderer};
|
||||
SwitchableSetting<bool> use_asynchronous_gpu_emulation{
|
||||
linkage, true, "use_asynchronous_gpu_emulation", Category::Renderer};
|
||||
SwitchableSetting<bool> respect_present_interval_zero{
|
||||
linkage, false, "respect_present_interval_zero", Category::Renderer};
|
||||
|
||||
SwitchableSetting<AstcDecodeMode, true> accelerate_astc{linkage,
|
||||
#ifdef ANDROID
|
||||
AstcDecodeMode::Cpu,
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
#include <boost/container/small_vector.hpp>
|
||||
|
||||
#include "common/settings.h"
|
||||
|
||||
#include "core/hle/service/nvdrv/devices/nvdisp_disp0.h"
|
||||
#include "core/hle/service/nvnflinger/buffer_item.h"
|
||||
#include "core/hle/service/nvnflinger/buffer_item_consumer.h"
|
||||
|
@ -19,6 +21,14 @@ namespace {
|
|||
|
||||
s32 NormalizeSwapInterval(f32* out_speed_scale, s32 swap_interval) {
|
||||
if (swap_interval <= 0) {
|
||||
// If swap_interval is 0 and setting enabled, respect it as unlocked FPS
|
||||
if (swap_interval == 0 && Settings::values.respect_present_interval_zero.GetValue()) {
|
||||
if (out_speed_scale) {
|
||||
*out_speed_scale = 1.0f;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// As an extension, treat nonpositive swap interval as speed multiplier.
|
||||
if (out_speed_scale) {
|
||||
*out_speed_scale = 2.f * static_cast<f32>(1 - swap_interval);
|
||||
|
|
|
@ -219,6 +219,11 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QWidget* parent)
|
|||
use_asynchronous_gpu_emulation,
|
||||
tr("Use asynchronous GPU emulation"),
|
||||
tr("Uses an extra CPU thread for rendering.\nThis option should always remain enabled."));
|
||||
INSERT(
|
||||
Settings, respect_present_interval_zero, tr("Respect present interval 0 for unlocked FPS"),
|
||||
tr("When enabled, present interval 0 will be used for games requesting unlocked FPS.\n"
|
||||
"This matches console behavior more closely, but may cause higher battery usage and frame pacing issues.\n"
|
||||
"When disabled (default), present interval 0 is capped at 120FPS to conserve battery."));
|
||||
INSERT(Settings,
|
||||
nvdec_emulation,
|
||||
tr("NVDEC emulation:"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue