[TEST] Debugger GPU unswizzle shaders

This commit is contained in:
CamilleLaVey 2026-07-06 02:10:21 -04:00
parent 7307518e44
commit 4bf8828df1
12 changed files with 522 additions and 24 deletions

View file

@ -39,6 +39,9 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
RENDERER_VERTEX_INPUT_DYNAMIC_STATE("vertex_input_dynamic_state"),
RENDERER_SAMPLE_SHADING("sample_shading"),
GPU_UNSWIZZLE_ENABLED("gpu_unswizzle_enabled"),
GPU_COMPUTE_UNSWIZZLE_2D("gpu_compute_unswizzle_2d"),
GPU_COMPUTE_UNSWIZZLE_3D("gpu_compute_unswizzle_3d"),
GPU_COMPUTE_UNSWIZZLE_PITCH("gpu_compute_unswizzle_pitch"),
PICTURE_IN_PICTURE("picture_in_picture"),
USE_CUSTOM_RTC("custom_rtc_enabled"),
BLACK_BACKGROUNDS("black_backgrounds"),

View file

@ -724,6 +724,27 @@ abstract class SettingsItem(
chunkSizeValuesId = R.array.gpuSwizzleChunkValues
)
)
put(
SwitchSetting(
BooleanSetting.GPU_COMPUTE_UNSWIZZLE_2D,
titleId = R.string.gpu_compute_unswizzle_2d,
descriptionId = R.string.gpu_compute_unswizzle_2d_description
)
)
put(
SwitchSetting(
BooleanSetting.GPU_COMPUTE_UNSWIZZLE_3D,
titleId = R.string.gpu_compute_unswizzle_3d,
descriptionId = R.string.gpu_compute_unswizzle_3d_description
)
)
put(
SwitchSetting(
BooleanSetting.GPU_COMPUTE_UNSWIZZLE_PITCH,
titleId = R.string.gpu_compute_unswizzle_pitch,
descriptionId = R.string.gpu_compute_unswizzle_pitch_description
)
)
put(
SingleChoiceSetting(
IntSetting.FAST_CPU_TIME,

View file

@ -308,6 +308,9 @@ class SettingsFragmentPresenter(
add(BooleanSetting.RENDERER_ASYNCHRONOUS_GPU_EMULATION.key)
add(BooleanSetting.RENDERER_ASYNC_PRESENTATION.key)
add(SettingsItem.GPU_UNSWIZZLE_COMBINED)
add(BooleanSetting.GPU_COMPUTE_UNSWIZZLE_2D.key)
add(BooleanSetting.GPU_COMPUTE_UNSWIZZLE_3D.key)
add(BooleanSetting.GPU_COMPUTE_UNSWIZZLE_PITCH.key)
add(HeaderSetting(R.string.extensions))

View file

@ -527,6 +527,12 @@
<string name="gpu_unswizzle_settings">GPU Unswizzle Settings</string>
<string name="gpu_unswizzle_settings_description">Configure GPU-based texture unswizzling parameters or disable it entirely. Adjust these settings to balance performance and texture loading quality.</string>
<string name="gpu_unswizzle_enable">Enable GPU Unswizzle</string>
<string name="gpu_compute_unswizzle_2d">GPU Compute Unswizzle (2D)</string>
<string name="gpu_compute_unswizzle_2d_description">Unswizzles block-linear 2D textures with a compute shader instead of the CPU. Disable to upload 2D textures through the CPU path.</string>
<string name="gpu_compute_unswizzle_3d">GPU Compute Unswizzle (3D)</string>
<string name="gpu_compute_unswizzle_3d_description">Unswizzles block-linear 3D textures with a compute shader instead of the CPU. Disable to upload 3D textures through the CPU path.</string>
<string name="gpu_compute_unswizzle_pitch">GPU Compute Unswizzle (Pitch)</string>
<string name="gpu_compute_unswizzle_pitch_description">Unswizzles pitch-linear textures with a compute shader instead of the CPU. Disable to upload linear textures through the CPU path.</string>
<string name="gpu_unswizzle_disabled">Disabled</string>
<string name="gpu_unswizzle_texture_size">GPU Unswizzle Max Texture Size</string>
<string name="gpu_unswizzle_texture_size_description">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.</string>