FSR 3 frame generation: a generation rectangle for letterbox bars (VICTORY_FG_RECT, VICTORY_FG_BARS_CLEAR; off by default) #1615
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1615
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1615"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Jesper-Andersson on GitHub · 2026-11-28 22:23 UTC · original
Jesper-Andersson:pr/fg-rect→main· +703 −2 · 3 files · 2 commits · merged 2026-11-29 08:16 UTCRelates to #387
What it changes
FSR 3 frame generation always works on the whole back buffer. FidelityFX's
generationRectis "the area of the backbuffer that should be used for frame generation in case only a part of the screen is active (e.g. due to movie bars)" (ffx_framegeneration.h), and VIctory always passes the full size. In letterboxed cutscenes the bars hold zero motion and one depth value per row, so the interpolation runs over rows that carry nothing. #387 reports a torn line at about 94 % of the picture's height, where the letterbox ends. This PR gives that rectangle a switch and adds the diagnostics needed to look into #387. It does not claim to fix the torn line, hence "Relates to".New module
crates/victory-gpu/src/streamline/fg_rect.rs(with unit tests), hooked intostreamline/fsr.rs. All of it is off by default: unset, the rectangle stays the whole back buffer, as before.VICTORY_FG_RECT=<top>,<bottom>sets a fixed full-width rectangle, in pixels or in percent of the display height (140,940,12%,88%).VICTORY_FG_RECT=autolooks for bands at the top and bottom where the motion vectors are all zero and the depth is one value per row. It checks a copy of both textures read back two presents later. The rectangle follows only after 8 presents agree (within 2 rows), and it goes back to the whole back buffer at a camera reset. Only the outer 30 % of rows at each edge is scanned.VICTORY_FG_BARS_CLEAR=1(only with a rectangle, manual or auto) clears motion vectors to zero and depth to far in the rows outside the rectangle before the prepare dispatch. The read-back copy is taken before the clear.The rectangle is part of each present's configuration, so a change does not recreate any context. Nothing is written to disk: the read-backs stay in memory.
How it was tested
auto, bad input), finding bands in synthetic rows, the 8-present agreement and the reset. A release build (cargo build --locked --release -p victory) passes. Not yet confirmed in game: auto mode in cutscenes (whether it finds the letterbox and how the torn line from #387 looks with and withoutVICTORY_FG_BARS_CLEAR). This PR stays a draft until that check is done.cargo testpassed for the crates it touches: yes (victory-gpu: 559 passed, 43 ignored)cargo clippy --no-deps -p victory-gpu: no new warnings. With-D warnings, clippy stops only on lints that are already on main (victory-gpuhost.rs,host/send.rs,pool.rs,resource.rs,streamline.rs,streamline/fsr.rs; victory-shaderemit/lower.rs). The warning set is the same as on main (the open #1527 fixes them).cargo xtask policy: fails on upstream main's owncrates/victory-shader/src/emit/lower.rs(667,523 bytes, over the 640 KiB limit; #1429; the open #1493 and #1527 fix it). Nothing this PR adds trips it, and the pre-commit asset check passed for every file it changes.Checked for overlap
streamline/fsr.rsaround the present. No logic overlap: this PR only changesgeneration_rect, oneLivefield and the prepare log fields. It may need a trivial rebase.streamline/fsr.rsfor lints. Small textual overlap at most.fsr.rsin swap chain creation, not the code this PR touches.fsr.rs. Different functions.This was written with AI assistance (Claude Code).