Skip to content

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

Open
KyleS98 wants to merge 3 commits into
fxceless:mainfrom
KyleS98:diag/present-shape
Open

KyleS98 wants to merge 3 commits into
fxceless:mainfrom
KyleS98:diag/present-shape

Conversation

@KyleS98

@KyleS98 KyleS98 commented Nov 25, 2026

Copy link
Copy Markdown

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

@MamaLeVrai

Copy link
Copy Markdown

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.

…anes, the first plane's resources, the shown resource's format and size)

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 <noreply@anthropic.com>

@DoubleD17 DoubleD17 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

KyleS98 and others added 2 commits November 26, 2026 01:46
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 fxceless#835.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@KyleS98

KyleS98 commented Nov 26, 2026

Copy link
Copy Markdown
Author

@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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants