GPU: the present logs what the title presents whenever it changes #835

Open
github-bot wants to merge 3 commits from github-bot/gh-835 into main AGit
Owner

@⁠KyleS98 on GitHub · 2026-11-25 09:52 UTC · original
KyleS98:diag/present-shape → main · +48 −0 · 1 files · 3 commits · open

The present now logs what the title presents, whenever that changes: the number of planes, the first plane's resources, and the format and size of the resource we show (the first plane's first resource). It's an info line on victory_gpu::queue, a few lines a run, in release and diagnostics builds alike.

Asked for in #798, where one RTX 4070 SUPER shows a black screen on the Series S profile while a 3090 Ti and a 5070 Ti show the world. Comparing this line between machines tells whether the title hands us something different to present.

RUST_LOG=warn,victory_gpu::queue=info
what the title presents changed (we show the first plane's first resource) frame=1 planes=2 resources=1 format=28 width=1920 height=1080

format=-1 means the first plane has no resource, or we hold no host copy of it.

Tested

RTX 3090 Ti, Windows 11, diag build of this branch (9376fd6 plus this commit), --console series-s, 150 s run: the line above at frame 1, no other change in that run, no crash. The same commit on a tree with more changes logged the same single line across an 8-minute run (cutscene, cell, corridor). cargo clippy -p victory-gpu adds no warnings.

🤖 Generated with Claude Code

**@⁠KyleS98** on GitHub · 2026-11-25 09:52 UTC · [original](https://github.com/fxceless/victory-fork/pull/835) `KyleS98:diag/present-shape` → `main` · +48 −0 · 1 files · 3 commits · open The present now logs what the title presents, whenever that changes: the number of planes, the first plane's resources, and the format and size of the resource we show (the first plane's first resource). It's an `info` line on `victory_gpu::queue`, a few lines a run, in release and diagnostics builds alike. Asked for in #798, where one RTX 4070 SUPER shows a black screen on the Series S profile while a 3090 Ti and a 5070 Ti show the world. Comparing this line between machines tells whether the title hands us something different to present. ``` RUST_LOG=warn,victory_gpu::queue=info what the title presents changed (we show the first plane's first resource) frame=1 planes=2 resources=1 format=28 width=1920 height=1080 ``` `format=-1` means the first plane has no resource, or we hold no host copy of it. ### Tested RTX 3090 Ti, Windows 11, diag build of this branch (9376fd6 plus this commit), `--console series-s`, 150 s run: the line above at frame 1, no other change in that run, no crash. The same commit on a tree with more changes logged the same single line across an 8-minute run (cutscene, cell, corridor). `cargo clippy -p victory-gpu` adds no warnings. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
For telling a black screen on one machine from a visible one on
another: a few info lines a run, in every build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:52:10 +00:00
The hook ran on every present and found the first plane's host resource
(the resource table's lock, a use noted for the texture) and its
description before the INFO event was filtered. It now returns at once
unless the event is enabled. Asked for in the review of pull request #835.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-25 12:23 UTC · original

Test report: this PR's head (76de854) no longer merges into main f85101b (RX 6950 XT machine; a trial merge): conflict in crates/victory-gpu/src/queue.rs. I did not resolve it. No game data.

AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-25 12:23 UTC · [original](https://github.com/fxceless/victory-fork/pull/835#issuecomment-7162318721) Test report: this PR's head (`76de854`) no longer merges into `main` `f85101b` (RX 6950 XT machine; a trial merge): conflict in `crates/victory-gpu/src/queue.rs`. I did not resolve it. No game data. AI-assisted (Claude Code); no game data.
Author
Owner

@⁠KyleS98 on GitHub · 2026-11-26 07:11 UTC · original

@⁠DoubleD17 done in 3fd42b6: present_shape now returns before it looks anything up unless the INFO event is enabled (tracing::enabled!), so at the default log level the present path does nothing new: no resource lookup, no GetDesc, no lock. I left the hook finding the resource itself instead of taking it from the ordinary present path, so that it stays one piece that can be removed; with the gate that second lookup only happens in runs that asked for the line.

@⁠MamaLeVrai thanks for the merge check. The branch is merged up to main 46bf535 and no longer conflicts.

Checked on an RTX 3090 Ti, Series S profile, 270 s from boot into the prologue with victory_gpu::queue=info: the line is written once (frame=1 planes=2 resources=1 format=28 width=1920 height=1080), no crash, no device loss.

AI-assisted (Claude Code, Claude Fable 5.2).

**@⁠KyleS98** on GitHub · 2026-11-26 07:11 UTC · [original](https://github.com/fxceless/victory-fork/pull/835#issuecomment-7185183458) @⁠DoubleD17 done in `3fd42b6`: `present_shape` now returns before it looks anything up unless the INFO event is enabled (`tracing::enabled!`), so at the default log level the present path does nothing new: no resource lookup, no `GetDesc`, no lock. I left the hook finding the resource itself instead of taking it from the ordinary present path, so that it stays one piece that can be removed; with the gate that second lookup only happens in runs that asked for the line. @⁠MamaLeVrai thanks for the merge check. The branch is merged up to `main` `46bf535` and no longer conflicts. Checked on an RTX 3090 Ti, Series S profile, 270 s from boot into the prologue with `victory_gpu::queue=info`: the line is written once (`frame=1 planes=2 resources=1 format=28 width=1920 height=1080`), no crash, no device loss. AI-assisted (Claude Code, Claude Fable 5.2).
Author
Owner

@⁠DoubleD17 on GitHub · 2026-11-25 20:37 UTC · original · reviewed

Please skip present_shape before it does any work when this INFO event is disabled. In 873ce1b0d97d558c50c6d380428cf367f957934b the hook runs on every Windows present, including those queued by send_behind. The event is filtered only after the resource lookup, GetDesc, and the global LAST mutex. Present path

host_resource is a stateful lookup. It takes the resource lock and refreshes last-use bookkeeping for a resolved texture, and it may create the host copy. The ordinary present paths already look up the resource. Gate the entire hook with an INFO event-enabled check for the queue target, and consider reusing the resource selected by the ordinary present path when collecting its description. This is a static finding. Frame-time impact was not measured. Resource lookup ┬╖ Last-use update

AI-assisted.

**@⁠DoubleD17** on GitHub · 2026-11-25 20:37 UTC · [original](https://github.com/fxceless/victory-fork/pull/835#pullrequestreview-6064635190) · **reviewed** Please skip `present_shape` before it does any work when this INFO event is disabled. In `873ce1b0d97d558c50c6d380428cf367f957934b` the hook runs on every Windows present, including those queued by `send_behind`. The event is filtered only after the resource lookup, `GetDesc`, and the global `LAST` mutex. [Present path](https://github.com/fxceless/victory-fork/blob/873ce1b0d97d558c50c6d380428cf367f957934b/crates/victory-gpu/src/queue.rs#L1372-L1436) `host_resource` is a stateful lookup. It takes the resource lock and refreshes last-use bookkeeping for a resolved texture, and it may create the host copy. The ordinary present paths already look up the resource. Gate the entire hook with an INFO event-enabled check for the queue target, and consider reusing the resource selected by the ordinary present path when collecting its description. This is a static finding. Frame-time impact was not measured. [Resource lookup](https://github.com/fxceless/victory-fork/blob/873ce1b0d97d558c50c6d380428cf367f957934b/crates/victory-gpu/src/resource.rs#L2011-L2027) ┬╖ [Last-use update](https://github.com/fxceless/victory-fork/blob/873ce1b0d97d558c50c6d380428cf367f957934b/crates/victory-gpu/src/resource.rs#L1384-L1391) AI-assisted.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/835/head:github-bot/gh-835'
git switch 'github-bot/gh-835'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-835'
git switch 'github-bot/gh-835'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-835'
git switch 'github-bot/gh-835'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-835'
git switch 'main'
git merge --squash 'github-bot/gh-835'
git switch 'main'
git merge --ff-only 'github-bot/gh-835'
git switch 'main'
git merge 'github-bot/gh-835'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.