Drop the extra full-screen copy at render scale < 1

The SDL_GPU pipeline renders into its own view-sized colour target and
already composites it over the whole render target, so routing it through
gpu_scene_texture cost one extra same-size copy per frame. The scaled
intermediate is now used only by the SDL geometry fallback; the hardware
composite upscales with linear filtering.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-12 17:19:51 +09:00
co-authored by Claude Opus 5.5
parent b57f2fba99
commit df87bc64eb
4 changed files with 21 additions and 2 deletions
+1
View File
@@ -127,6 +127,7 @@ bool HardwareScene::Initialize(SDL_Renderer* renderer,int width,int height) {
// The target accumulates premultiplied colors. Transparent pixels keep
// the Python selection background and other existing 2D layers intact.
SDL_SetTextureBlendMode(output_,SDL_BLENDMODE_BLEND_PREMULTIPLIED);
SDL_SetTextureScaleMode(output_,SDL_SCALEMODE_LINEAR); // render-scale < 1 upscales in the composite
width_=width;height_=height;
}
return true;