Repository navigation
GPU: use one warm-up key for reordered graphics shader stages - #2986
andrewpozdnakov7-jpg wants to merge 1 commit into
Conversation
kotekompotek
left a comment
There was a problem hiding this comment.
Verified: canonicalizing [pixel, vertex|mesh] to producer-first order at read_stream makes the runtime key equal the prebuild key regardless of subobject order in the stream — the swap is a no-op for forward order and other stage mixes. The test is the right shape: same pipeline through runtime create in both orders plus a control pixel proving keys still differ when content does.
kotekompotek
left a comment
There was a problem hiding this comment.
Verified: the swap normalizes [pixel, vertex|mesh] streams inside read_stream, so runtime creation and the pre-build produce the same key regardless of subobject order. The test covers both orderings for vertex and mesh, asserts reversed==canonical, and keeps distinct stages/distinct pixel code keyed apart.
|
Verified across process restarts with a real D3D12 pipeline library on an RTX 5080 and Microsoft WARP, with #2952 (
The 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 |
fuzeofficlal
left a comment
There was a problem hiding this comment.
Code review on 7ce9941a (static source inspection):
crates/victory-gpu/src/pipeline.rs:564-572canonicalizes reversed vertex–pixel and mesh–pixel stage pairs in the parser shared by runtime pipeline creation and prebuild (:512,:641).- The key continues to include every stage, shader hash, and graphics state (
pipeline/make.rs:111-118), and host pipeline construction selects shaders by stage (pipeline/host.rs:401-428), preserving behavior without introducing shared-state mutation. - Non-blocking note: pre-existing early-list entries stored under a reversed key will miss once after upgrade and then be recorded under the canonical key (
pipeline/library.rs:473-480).
|
Automated triage for the maintainers. Needs work. The change in 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 CI: passing. Generated by Claude Code |
The 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.