Experiments with gpu stalls per fence wait

This commit is contained in:
CamilleLaVey
2026-10-01 22:52:42 -04:00
parent 5c7520f572
commit 165a1d1da1
22 changed files with 128 additions and 66 deletions
@@ -34,6 +34,7 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
ENABLE_GPU_BUFFER_READBACK("enable_gpu_buffer_readback"),
USE_UNIFIED_MEMORY("use_unified_memory"),
SYNC_MEMORY_OPERATIONS("sync_memory_operations"),
STALL_ON_GPU_FENCE_WAIT("stall_on_gpu_fence_wait"),
BUFFER_REORDER_DISABLE("disable_buffer_reorder"),
RENDERER_DEBUG("debug"),
RENDERER_PATCH_OLD_QCOM_DRIVERS("patch_old_qcom_drivers"),
@@ -902,6 +902,13 @@ abstract class SettingsItem(
descriptionId = R.string.sync_memory_operations_description
)
)
put(
SwitchSetting(
BooleanSetting.STALL_ON_GPU_FENCE_WAIT,
titleId = R.string.stall_on_gpu_fence_wait,
descriptionId = R.string.stall_on_gpu_fence_wait_description
)
)
put(
SwitchSetting(
BooleanSetting.BUFFER_REORDER_DISABLE,
@@ -545,6 +545,7 @@ class SettingsFragmentPresenter(
add(IntSetting.RENDERER_NVDEC_EMULATION.key)
add(BooleanSetting.SYNC_MEMORY_OPERATIONS.key)
add(BooleanSetting.STALL_ON_GPU_FENCE_WAIT.key)
add(BooleanSetting.RENDERER_USE_DISK_SHADER_CACHE.key)
add(BooleanSetting.RENDERER_FORCE_MAX_CLOCK.key)
add(BooleanSetting.RENDERER_REACTIVE_FLUSHING.key)
@@ -575,6 +575,8 @@
<string name="accelerate_astc_description">Pick how ASTC-compressed textures are decoded for rendering: CPU (slow, safe), GPU (fast, recommended), or CPU Async (no stutters, may cause issues)</string>
<string name="sync_memory_operations">Sync Memory Operations</string>
<string name="stall_on_gpu_fence_wait">Pause CPU on GPU fence timeouts</string>
<string name="stall_on_gpu_fence_wait_description">When a game keeps timing out while waiting for the GPU, pauses every CPU thread until the GPU catches up. Disabling it keeps the other threads running, which can reduce stutter but may break games that rely on it.</string>
<string name="sync_memory_operations_description">Ensures data consistency between compute and memory operations. This option should fix issues in some games, but may also reduce performance in some cases. Unreal Engine 4 games often see the most significant changes thereof.</string>
<string name="use_disk_shader_cache">Disk shader cache</string>
<string name="use_disk_shader_cache_description">Reduces stuttering by locally storing and loading generated shaders.</string>