GPU: VICTORY_WIDE_SCISSOR widens a scissor to its viewport (a diagnostic) #1265

Closed
github-bot wants to merge 1 commit from gh-pr/1265/head into gh-pr/1265/base
Owner

@⁠pablogonz12 on GitHub · 2026-11-24 16:56 UTC · original
pablogonz12:up/scissor → main · +273 −10 · 4 files · 1 commits · closed without merging

What

VICTORY_WIDE_SCISSOR=1 widens each scissor to the viewport it pairs with (vertical bounds kept) and warns about the rects it changes (first 8, then every 512th). Diagnostics builds log the first 8 scissor/viewport pairs of every frame at debug level. The widening is pure logic in scissor.rs, with tests that run on every platform.

Why

A replay shows all visible geometry confined to a 1252-column band of a 2560-wide buffer, its edges on the title's own scissor (742..1994) with viewport 2560x1440. The rects reach the host unchanged and no state is cached, so the band is the state the title set. Several reports in the community describe exactly this band; the switch says in one run whether widening the scissor brings the frame back, and the logging says whether the title sets narrow scissors at all, without a debugger.

It follows the existing diagnostic switches (VICTORY_CAPTURE, VICTORY_DUMP_TARGETS, VICTORY_SKIP_PIPELINES, VICTORY_COPY_MODE): environment only, off by default, no behaviour change without it.

How tested

  • cargo xwin clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings, with and without --all-features: clean.
  • Unit tests for the widening (viewport wider than the scissor, narrower, equal, reversed bounds) run on Linux and Windows.
  • One replay of the band: the log shows the 8 pairs and their rects.

Not tested

  • The widened frame in game — I do not have a save that reaches that view; the switch is the tool for whoever does.
  • Native Windows.

Written with an AI assistant.

**@⁠pablogonz12** on GitHub · 2026-11-24 16:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/1265) `pablogonz12:up/scissor` → `main` · +273 −10 · 4 files · 1 commits · closed without merging ## What `VICTORY_WIDE_SCISSOR=1` widens each scissor to the viewport it pairs with (vertical bounds kept) and warns about the rects it changes (first 8, then every 512th). Diagnostics builds log the first 8 scissor/viewport pairs of every frame at debug level. The widening is pure logic in `scissor.rs`, with tests that run on every platform. ## Why A replay shows all visible geometry confined to a 1252-column band of a 2560-wide buffer, its edges on the title's own scissor (742..1994) with viewport 2560x1440. The rects reach the host unchanged and no state is cached, so the band is the state the title set. Several reports in the community describe exactly this band; the switch says in one run whether widening the scissor brings the frame back, and the logging says whether the title sets narrow scissors at all, without a debugger. It follows the existing diagnostic switches (`VICTORY_CAPTURE`, `VICTORY_DUMP_TARGETS`, `VICTORY_SKIP_PIPELINES`, `VICTORY_COPY_MODE`): environment only, off by default, no behaviour change without it. ## How tested - `cargo xwin clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings`, with and without `--all-features`: clean. - Unit tests for the widening (viewport wider than the scissor, narrower, equal, reversed bounds) run on Linux and Windows. - One replay of the band: the log shows the 8 pairs and their rects. ## Not tested - The widened frame in game — I do not have a save that reaches that view; the switch is the tool for whoever does. - Native Windows. Written with an AI assistant.
A replay shows all visible geometry confined to a 1252-column band of a
2560-wide buffer, its edges on the title's own scissor (742..1994) with
viewport 2560x1440. The rects reach the host unchanged and no state is
cached, so the band is the state the title set; the switch says whether
widening it brings the frame back.

Scissors now widen to the viewport each pairs with (vertical bounds kept)
with VICTORY_WIDE_SCISSOR=1, warning about the rects they change (first
8, then every 512th); diagnostics builds log the first 8 scissor/viewport
pairs of every frame at debug level. The widening is pure logic in
scissor.rs, tested on every platform.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:25:36 +00:00
github-bot closed this pull request 2026-11-26 04:25:37 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:36 UTC · original

Automated triage for the maintainers. Closing because it does not change behaviour the project needs (formatting, guards for cases that cannot occur, or notes and translations that cannot be kept current).

A switch that widens every scissor to its viewport, never tried in the title. It is live in all builds rather than behind the diagnostics feature, allocates on every scissor call, and its module doc names another project ("Scarlight") and a notes file that is not in this repo, with design rationale in the code.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 00:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/1265#issuecomment-7148680449) Automated triage for the maintainers. Closing because it does not change behaviour the project needs (formatting, guards for cases that cannot occur, or notes and translations that cannot be kept current). A switch that widens every scissor to its viewport, never tried in the title. It is live in all builds rather than behind the diagnostics feature, allocates on every scissor call, and its module doc names another project ("Scarlight") and a notes file that is not in this repo, with design rationale in the code. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1265
No description provided.