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

Closed
pablogonz12 wants to merge 1 commit from upstream-pr/1265 into main
pablogonz12 commented 2026-11-24 16:56:09 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pablogonz12 on 2026-11-24T16:56:09Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6587025073 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1265). Originally posted by [pablogonz12](https://github.com/pablogonz12) on 2026-11-24T16:56:09Z. --- ## 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.
upstream-sync closed this pull request 2026-11-25 01:06:04 +00:00
Marvisak commented 2026-11-25 01:08:06 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:36:00Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148680449 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1265#issuecomment-7148680449). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:36:00Z. --- 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

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1265
No description provided.