Qt: Clamp max upscale multiplier to 32x

Turns out Mali of all GPUs can do 64k x 64k textures.

Of course this is completely impractical as such a texture would use
16GB of memory.
This commit is contained in:
Stenzek
2025-12-20 16:20:40 +10:00
parent 63d352bb03
commit 52bd6e7495

View File

@@ -916,7 +916,7 @@ void GraphicsSettingsWidget::populateGPUAdaptersAndResolutions(RenderAPI render_
m_ui.resolutionScale->clear(); m_ui.resolutionScale->clear();
const int max_scale = const int max_scale =
static_cast<int>(current_adapter ? std::max<u32>(current_adapter->max_texture_size / 1024, 1) : 16); static_cast<int>(current_adapter ? std::clamp<u32>(current_adapter->max_texture_size / 1024u, 1u, 32u) : 16);
populateUpscalingModes(m_ui.resolutionScale, max_scale); populateUpscalingModes(m_ui.resolutionScale, max_scale);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.resolutionScale, "GPU", "ResolutionScale", 1); SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.resolutionScale, "GPU", "ResolutionScale", 1);