Outputs: Rebuild the post-shader chain when the game moves to another output

Post-shader framebuffers (for shaders at output resolution, and those
that keep the previous frame) are sized for the output they were built
for. Moving the game to a TV or back, or the TV changing size, left them
sized for the other one. SetOutputOverride now asks for a rebuild when
the output changes.

Also corrects the design doc: "auto" render resolution follows the
device's screen, not the TV.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-22 23:00:13 +02:00
1 parent 3e53d4bde1
commit 5799bdee59
2 files changed
+8 -2

No files matched your search

+6
View File
@@ -118,10 +118,16 @@ public:
}
// Presents to another output than the primary, until called with nullptr.
void SetOutputOverride(const OutputParams *output) {
const bool changed = hasOutputOverride_ != (output != nullptr) || (output &&
(output->pixelWidth != outputOverride_.pixelWidth || output->pixelHeight != outputOverride_.pixelHeight || output->orientation != outputOverride_.orientation));
hasOutputOverride_ = output != nullptr;
if (output) {
outputOverride_ = *output;
}
// The post-shader framebuffers are sized for the output, so another one needs them rebuilt (in BeginFrame).
if (changed && usePostShader_) {
restorePostShader_ = true;
}
}
OutputParams GetOutput() const {
return hasOutputOverride_ ? outputOverride_ : PrimaryOutputParams(pixelWidth_, pixelHeight_);
+2 -2
View File
@@ -230,8 +230,8 @@ viewport to its own swapchain, so it shares the swapchain layer with the screen
`PresentationCommon` should get its output size and layout explicitly instead of from `g_display`.
Mostly it already does, through `PSP_CoreParameter().pixelWidth/Height` and
`UpdateDisplaySize`, and "auto" render resolution follows the same values, so it scales for the TV
on its own. What still reads the global:
`UpdateDisplaySize`. "Auto" render resolution follows the primary's size, not the TV's (not done). What
still reads the global:
- `GetScreenFrame` (insets, DPI)
- the stretch logic in `CalculateDisplayOutputRect` (device orientation)