GPU: use one warm-up key for reordered graphics shader stages #2986
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2986
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2986"
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?
@andrewpozdnakov7-jpg on GitHub · 2026-11-26 02:19 UTC · original
andrewpozdnakov7-jpg:codex1/graphics-stream-stage-order-key→main· +50 −0 · 1 files · 1 commits · openThe graphics pre-build writes the vertex or mesh shader before the pixel shader. A guest stream can describe the same pipeline with those two subobjects reversed. The host already uses the same stage order to build the pipeline, but the warm-up key came from the stream order. This can miss the prebuilt entry and split usage across two early keys.
Normalize the two supported graphics stages when reading the stream. Pre-build and guest creation then name that pipeline the same way.
On main
63bcca43c6a00a758510398fa43096ce7e4f7df0, the syntheticPrebuild::graphicsand guestCreatePipelineStatetest found a different key for each reversed vertex/pixel and mesh/pixel pair. Both orders agree after this change. A different pixel shader still changes the key. Six paired runs. Full Windows/WARP GPU diagnostics passed (247 passed, 1 ignored), along with strict GPU Clippy in both feature configurations and asset policy.AI-assisted.
@steven-seagull27 on GitHub · 2026-11-26 02:45 UTC · original
Verified across process restarts with a real D3D12 pipeline library on an RTX 5080 and Microsoft WARP, with #2952 (
2cdb5e3) present in both builds. I prebuilt canonical VS+PS and MS+PS streams, exercised them once through guest creation / first use, saved the cache, then reopened it in a fresh process. The table shows the four guest creations per adapter (both stream orders for each stage pair).7ce9941The old reversed streams could already load the canonical host PSO on first use. The change lets those streams also find the guest prebuild and prior-use records at creation. Both adapters showed the same counts.
The color-only PSOs stayed distinct from two D32_FLOAT variants: omitted depth state (enabled by the DSV) and explicitly disabled depth at the same DSV format. For both VS+PS and MS+PS, each new variant compiled once, then its opposite stage order loaded it. That gave four distinct PSO creations and four loads per adapter.
I also carried an old cache whose early list had only reversed-order uses into the updated build. On the first updated run, both streams found their prebuilt entries and loaded their PSOs at first use. On the next process start, both started early too. This was a synthetic stream/cache test using SDK-compiled shaders seeded at the translation boundary, guest
CreatePipelineState, and the production prebuild, worker and library paths.@Marvisak on GitHub · 2026-11-26 05:37 UTC · original
Automated triage for the maintainers.
Needs work. The change in
read_stream(victory-gpu/src/pipeline.rs) swaps a two-shader stream that lists the pixel shader before the vertex or mesh shader, so the guest pipeline's warm-up key matches the pre-build's. The code is small and the test shows the keys now agree. A commenter confirms the effect on a synthetic cache.What is missing is evidence that the title ever produces such a stream. All the tests here are synthetic; if the title always writes the producer stage first, this changes nothing at run time. Please add a log line or count from a real run showing pixel-first streams (stage order and count only, no game data). If they do occur, consider normalizing by stage rank instead of special-casing a two-element
[pixel, vertex|mesh]slice, so amplification + mesh + pixel streams are covered too.CI: passing.
Generated by Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.