From a3fa666510384e597e7cab55d0a74da4a206da0d Mon Sep 17 00:00:00 2001 From: lizzie Date: Wed, 21 Jan 2026 01:17:10 +0100 Subject: [PATCH] [android] fix discrepancy of MAXTEXTURE v. TEXTURE in setting string set (#3360) Signed-off-by: lizzie Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3360 Reviewed-by: crueter Reviewed-by: MaranBr Reviewed-by: DraVee Co-authored-by: lizzie Co-committed-by: lizzie --- .../features/settings/model/IntSetting.kt | 8 ++++---- .../settings/model/view/SettingsItem.kt | 20 +++++++++---------- .../settings/ui/SettingsFragmentPresenter.kt | 8 ++++---- .../app/src/main/res/values/strings.xml | 12 +++++------ src/common/settings.h | 14 ++++++------- src/qt_common/config/shared_translation.cpp | 8 ++++---- src/video_core/texture_cache/texture_cache.h | 6 +++--- 7 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt index e9a489d2e8..96db3cf7c0 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt @@ -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: 2023 yuzu Emulator Project @@ -46,9 +46,9 @@ enum class IntSetting(override val key: String) : AbstractIntSetting { FAST_CPU_TIME("fast_cpu_time"), CPU_TICKS("cpu_ticks"), FAST_GPU_TIME("fast_gpu_time"), - GPU_UNZWIZZLE_MAXTEXTURE_SIZE("gpu_unzwizzle_maxtexture_size"), - GPU_UNZWIZZLE_STREAM_SIZE("gpu_unzwizzle_stream_size"), - GPU_UNZWIZZLE_CHUNK_SIZE("gpu_unzwizzle_chunk_size"), + GPU_UNSWIZZLE_TEXTURE_SIZE("gpu_unswizzle_texture_size"), + GPU_UNSWIZZLE_STREAM_SIZE("gpu_unswizzle_stream_size"), + GPU_UNSWIZZLE_CHUNK_SIZE("gpu_unswizzle_chunk_size"), BAT_TEMPERATURE_UNIT("bat_temperature_unit"), CABINET_APPLET("cabinet_applet_mode"), CONTROLLER_APPLET("controller_applet_mode"), 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 0b72cd52ad..0c3f7c39f0 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 @@ -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: 2023 yuzu Emulator Project @@ -648,27 +648,27 @@ abstract class SettingsItem( ) put( SingleChoiceSetting( - IntSetting.GPU_UNZWIZZLE_MAXTEXTURE_SIZE, - titleId = R.string.gpu_unzwizzle_maxtexture_size, - descriptionId = R.string.gpu_unzwizzle_maxtexture_size_description, + IntSetting.GPU_UNSWIZZLE_TEXTURE_SIZE, + titleId = R.string.gpu_unswizzle_texture_size, + descriptionId = R.string.gpu_unswizzle_texture_size_description, choicesId = R.array.gpuTextureSizeSwizzleEntries, valuesId = R.array.gpuTextureSizeSwizzleValues ) ) put( SingleChoiceSetting( - IntSetting.GPU_UNZWIZZLE_STREAM_SIZE, - titleId = R.string.gpu_unzwizzle_stream_size, - descriptionId = R.string.gpu_unzwizzle_stream_size_description, + IntSetting.GPU_UNSWIZZLE_STREAM_SIZE, + titleId = R.string.gpu_unswizzle_stream_size, + descriptionId = R.string.gpu_unswizzle_stream_size_description, choicesId = R.array.gpuSwizzleEntries, valuesId = R.array.gpuSwizzleValues ) ) put( SingleChoiceSetting( - IntSetting.GPU_UNZWIZZLE_CHUNK_SIZE, - titleId = R.string.gpu_unzwizzle_chunk_size, - descriptionId = R.string.gpu_unzwizzle_chunk_size_description, + IntSetting.GPU_UNSWIZZLE_CHUNK_SIZE, + titleId = R.string.gpu_unswizzle_chunk_size, + descriptionId = R.string.gpu_unswizzle_chunk_size_description, choicesId = R.array.gpuSwizzleChunkEntries, valuesId = R.array.gpuSwizzleChunkValues ) 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 c03bd2a950..919d27aadd 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 @@ -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 package org.yuzu.yuzu_emu.features.settings.ui @@ -279,9 +279,9 @@ class SettingsFragmentPresenter( add(IntSetting.FAST_GPU_TIME.key) add(BooleanSetting.SKIP_CPU_INNER_INVALIDATION.key) add(BooleanSetting.RENDERER_ASYNCHRONOUS_SHADERS.key) - add(IntSetting.GPU_UNZWIZZLE_MAXTEXTURE_SIZE.key) - add(IntSetting.GPU_UNZWIZZLE_STREAM_SIZE.key) - add(IntSetting.GPU_UNZWIZZLE_CHUNK_SIZE.key) + add(IntSetting.GPU_UNSWIZZLE_TEXTURE_SIZE.key) + add(IntSetting.GPU_UNSWIZZLE_STREAM_SIZE.key) + add(IntSetting.GPU_UNSWIZZLE_CHUNK_SIZE.key) add(HeaderSetting(R.string.extensions)) diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index bd0655d77c..1f0da34213 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -497,12 +497,12 @@ Skips certain CPU-side cache invalidations during memory updates, reducing CPU usage and improving it\'s performance. This may cause glitches or crashes on some games. Use asynchronous shaders Compiles shaders asynchronously. This may reduce stutters but may also introduce glitches. - GPU Unswizzle Max Texture Size - Sets the maximum size (MB) for GPU-based texture unswizzling. While the GPU is faster for medium and large textures, the CPU may be more efficient for very small ones. Adjust this to find the balance between GPU acceleration and CPU overhead. - GPU Unswizzle Stream Size - Sets the data limit per frame for unswizzling large textures. Higher values speed up texture loading at the cost of higher frame latency; lower values reduce GPU overhead but may cause visible texture pop-in. - GPU Unswizzle Chunk Size - Defines the number of depth slices processed per batch for 3D textures. Increasing this improves throughput efficiency on powerful GPUs but may cause stuttering or driver timeouts on weaker hardware. + GPU Unswizzle Max Texture Size + Sets the maximum size (MB) for GPU-based texture unswizzling. While the GPU is faster for medium and large textures, the CPU may be more efficient for very small ones. Adjust this to find the balance between GPU acceleration and CPU overhead. + GPU Unswizzle Stream Size + Sets the data limit per frame for unswizzling large textures. Higher values speed up texture loading at the cost of higher frame latency; lower values reduce GPU overhead but may cause visible texture pop-in. + GPU Unswizzle Chunk Size + Defines the number of depth slices processed per batch for 3D textures. Increasing this improves throughput efficiency on powerful GPUs but may cause stuttering or driver timeouts on weaker hardware. Extensions diff --git a/src/common/settings.h b/src/common/settings.h index a942c90418..291779b1ac 100644 --- a/src/common/settings.h +++ b/src/common/settings.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 @@ -506,21 +506,21 @@ struct Values { SwitchableSetting use_asynchronous_shaders{linkage, false, "use_asynchronous_shaders", Category::RendererHacks}; - SwitchableSetting gpu_unzwizzle_texture_size{linkage, + SwitchableSetting gpu_unswizzle_texture_size{linkage, GpuUnswizzleSize::Large, - "gpu_unzwizzle_texture_size", + "gpu_unswizzle_texture_size", Category::RendererHacks, Specialization::Default}; - SwitchableSetting gpu_unzwizzle_stream_size{linkage, + SwitchableSetting gpu_unswizzle_stream_size{linkage, GpuUnswizzle::Medium, - "gpu_unzwizzle_stream_size", + "gpu_unswizzle_stream_size", Category::RendererHacks, Specialization::Default}; - SwitchableSetting gpu_unzwizzle_chunk_size{linkage, + SwitchableSetting gpu_unswizzle_chunk_size{linkage, GpuUnswizzleChunk::Medium, - "gpu_unzwizzle_chunk_size", + "gpu_unswizzle_chunk_size", Category::RendererHacks, Specialization::Default}; diff --git a/src/qt_common/config/shared_translation.cpp b/src/qt_common/config/shared_translation.cpp index 152bb7b43f..0432ded7b0 100644 --- a/src/qt_common/config/shared_translation.cpp +++ b/src/qt_common/config/shared_translation.cpp @@ -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 2024 Torzu Emulator Project @@ -285,18 +285,18 @@ std::unique_ptr InitializeTranslations(QObject* parent) tr("Overclocks the emulated GPU to increase dynamic resolution and render " "distance.\nUse 256 for maximal performance and 512 for maximal graphics fidelity.")); INSERT(Settings, - gpu_unzwizzle_texture_size, + gpu_unswizzle_texture_size, tr("GPU Unswizzle Max Texture Size"), tr("Sets the maximum size (MiB) for GPU-based texture unswizzling.\n" "While the GPU is faster for medium and large textures, the CPU may be more efficient for very small ones.\n" "Adjust this to find the balance between GPU acceleration and CPU overhead.")); INSERT(Settings, - gpu_unzwizzle_stream_size, + gpu_unswizzle_stream_size, tr("GPU Unswizzle Stream Size"), tr("Sets the maximum amount of texture data (in MiB) processed per frame.\n" "Higher values can reduce stutter during texture loading but may impact frame consistency.")); INSERT(Settings, - gpu_unzwizzle_chunk_size, + gpu_unswizzle_chunk_size, tr("GPU Unswizzle Chunk Size"), tr("Determines the number of depth slices processed in a single dispatch.\n" "Increasing this can improve throughput on high-end GPUs but may cause TDR or driver timeouts on weaker hardware.")); diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 3d306383c0..2564a67780 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -80,7 +80,7 @@ TextureCache

::TextureCache(Runtime& runtime_, Tegra::MaxwellDeviceMemoryManag lowmemorydevice = true; } - switch (Settings::values.gpu_unzwizzle_texture_size.GetValue()) { + switch (Settings::values.gpu_unswizzle_texture_size.GetValue()) { case Settings::GpuUnswizzleSize::VerySmall: gpu_unswizzle_maxsize = 16_MiB; break; case Settings::GpuUnswizzleSize::Small: gpu_unswizzle_maxsize = 32_MiB; break; case Settings::GpuUnswizzleSize::Normal: gpu_unswizzle_maxsize = 128_MiB; break; @@ -89,7 +89,7 @@ TextureCache

::TextureCache(Runtime& runtime_, Tegra::MaxwellDeviceMemoryManag default: gpu_unswizzle_maxsize = 128_MiB; break; } - switch (Settings::values.gpu_unzwizzle_stream_size.GetValue()) { + switch (Settings::values.gpu_unswizzle_stream_size.GetValue()) { case Settings::GpuUnswizzle::VeryLow: swizzle_chunk_size = 4_MiB; break; case Settings::GpuUnswizzle::Low: swizzle_chunk_size = 8_MiB; break; case Settings::GpuUnswizzle::Normal: swizzle_chunk_size = 16_MiB; break; @@ -98,7 +98,7 @@ TextureCache

::TextureCache(Runtime& runtime_, Tegra::MaxwellDeviceMemoryManag default: swizzle_chunk_size = 16_MiB; } - switch (Settings::values.gpu_unzwizzle_chunk_size.GetValue()) { + switch (Settings::values.gpu_unswizzle_chunk_size.GetValue()) { case Settings::GpuUnswizzleChunk::VeryLow: swizzle_slices_per_batch = 32; break; case Settings::GpuUnswizzleChunk::Low: swizzle_slices_per_batch = 64; break; case Settings::GpuUnswizzleChunk::Normal: swizzle_slices_per_batch = 128; break;