graphics: address performance regression with Image Resize (#504)

## Link to GitHub Issue, if one exists
Regressed by #401 

## Description of change
Two things from testing SDVX Live2D -

1. ColorFill is almost always too expensive and will lead to drops
1. Scale factor of 0.5 causes GPU to sync and causes drops

(ARGB/XRGB doesn't matter, linear filtering doesn't matter)

1 is fixed by removing ColorFill calls on every frame - instead only do
this once when the user changes the duplicate option (on the next frame)

2 is fixed by updating the UI (limit the slider) though people can
ctrl+click to override these slider limits.

The warning label will be kept with slightly reworded text.

## Testing
tested in sdvx eg final (sudden death) - on my RTX 4070, my FPS is rock
solid 120 fps even with image resize on now.
This commit is contained in:
bicarus
2026-01-07 16:35:08 -08:00
committed by GitHub
parent b1ee37a066
commit 0078b72b03
4 changed files with 33 additions and 28 deletions
+1 -12
View File
@@ -81,18 +81,7 @@ namespace cfg {
load_bool_value(doc, root + "enable_screen_resize", this->enable_screen_resize);
if (this->enable_screen_resize) {
if (avs::game::is_model("KFC")) {
log_warning(
"ScreenResize",
"Image Resize feature enabled for SDVX; enabling this is known to significantly "
"lower framerate for songs with Live2D!");
deferredlogs::defer_error_messages({
"Image Resize + SDVX Live2D performance warning",
" Enabling Image Resize feature is known to have significant impact",
" on Live2D performance; you should disable it"});
} else {
log_misc("ScreenResize", "enabled by config file");
}
log_misc("ScreenResize", "enabled by config file");
}
load_bool_value(doc, root + "enable_linear_filter", this->enable_linear_filter);
+4
View File
@@ -1,5 +1,6 @@
#pragma once
#include <atomic>
#include <memory>
#include <string>
#include <optional>
@@ -51,6 +52,9 @@ namespace cfg {
bool enable_linear_filter = true;
fullscreen_setting scene_settings[4];
// state
std::atomic<bool> need_surface_clean = false;
// windowed mode sizing
// Windows terminology:
// window = rectangle including the frame