GPU: hash small PSO descriptions in one frame, borrow shader bytecode #1202
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1202
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1202"
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?
@Jineggegg on GitHub · 2026-11-28 15:28 UTC · original
Jineggegg:hot-pso-prebuild→main· +80 −29 · 2 files · 17 commits · openWhat this changes
Hot prebuild of the 16 hot pipelines hashed every short shader chunk with its own
updatecall, and each pipeline name was built from a fresh copy of every stage's DXIL bytes.pipeline::namenow puts small descriptions (framing + bytes up to 8 BLAKE3 chunks) into one contiguous frame and hashes it in a singleupdate, so BLAKE3 can hash the short chunks together. Large descriptions keep the original streaming path.pipeline/host.rsnow borrow the translated DXIL slices instead of copying them throughcode_bytes, which is removed.9402d2bc...), and a new test checks the framing at the 8 KiB frame boundary (8191/8192/8193 bytes).Adapted from Jineggegg/VIctory round 1 item 5 (commit
2b98109), rebased onto currentmain. The graphics path has moved on since then: it now names"graphics rectangles"and"graphics"separately with a retry without the geometry stage, so all four name call sites (compute, mesh, graphics with/without the rectangle stage) take the borrowed slices.Testing
cargo check -p victory-gpuis clean, andcargo test -p victory-gpu --lib pipeline::librarypasses all 7 tests, including the pinned-name and frame-boundary tests.Notes on nearby open PRs
Stageargument forpipeline()): still open. It does not touchname(), and this PR does not touchpipeline()calls.code_bytes): still open. It does not usecode_bytes, so removing that helper stays fine if it lands first.e1251c31) into hot-pso-prebuild 382c5f548e@Jineggegg on GitHub · 2026-12-01 09:33 UTC · original
Merged current
main(e1251c31) into this branch; GitHub showed it as conflicting. The conflicts were inpipeline::library::name()andpipeline/host.rs:name(): main now appends the static samplers' places (PLACES) to the hash. They are appended after both the framed path (small descriptions) and the streaming path, through the same hasher, so names with and without places are unchanged from main.host.rs: main'sprimed_placesand root-signature cache are kept;code_bytesis dropped (no callers left). Where main links the mesh and pixel stages, the name borrows the linked DXIL, which is whatcode_bytes(&ms)hashed before, so mesh pipeline names are unchanged too.Added
library_names_keep_the_static_sampler_places_on_both_paths: for descriptions on both sides of the 8 KiB framed limit, a name with places equals a streaming reference with the places as one more length-framed part, and differs from the name without them.Checked on Windows (Rust 1.98.1, RTX 5090), on this branch's tree (the GPU tests ran on a rebased copy with the identical tree): both CI Clippy configurations add no diagnostic to main's (main does not pass
-D warningsright now: 4 warnings without--all-features, 5 with).cargo test --workspace --locked: 2521 passed, 6 failed, 96 ignored (main: 2520 passed, 5 failed, 96 ignored). The failuresmainhas itself (list::thin::tests::bindings_record_no_work,shader_cache::tests::every_switch_of_the_translator_is_in_the_key,modules::xmem::tests::a_read_by_range_waits_only_for_a_remapping_that_meets_it,emit::bitcode::opt::tests::hw_tests::split_lds_wave32_read_after_read_barrier_coalescing_and_parity,policy::tests::repository_passes_policy), andhost::uav_pool::tests::host_list_uav_pool_lifecycle_retire_trim_and_info_queue. That one is intermittent onmaintoo: running thevictory-gpulib tests ofmain, this branch and two other branches in turn in one GPU window, it failed in 4 of 22 runs onmainand 3 of 22 on this branch. The test counts reuses of the process-wide UAV buffer pool, which other tests running at the same time also use. This change does not touch that path. So no new failure.AI assistance: the merge, the new test and this comment were prepared with an AI coding assistant (Claude Code) and checked as described above.
🤖 Generated with Claude Code
5fabb46e) into hot-pso-prebuild 6437777e6dView command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.