Make static samplers in one order so NVIDIA can reuse stored pipelines #395
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-logs
old-names
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!395
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-395"
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?
@Garu667 on GitHub · 2026-11-28 03:47 UTC · original
Garu667:perf/static-sampler-order→main· +60280 −5429 · 207 files · 662 commits · closed without mergingOn NVIDIA, pipelines with static samplers never come from the library.
allows_static_samplerskeeps them out, because the driver numbers static samplers in the order a process first makes them, and that order changes from run to run. On an RTX 3080 that means about 120 pipelines compiled again at every launch, and draws dropped while they compile.This ports trustno1-coder's fix (trustno1-coder/VIctory-NVIDIA@64d4931,
pipeline/samplers.rs, GPL-3.0):static-samplers.txtbeside the library, one line each, in the order first met.VICTORY_SAMPLER_ORDER=0restores the previous behaviour.RTX 3080 10 GB, i5-13600K, Series S, automatic NVIDIA profile
One build, same cache, same boat save each run (prologue recap, then the fishing cutscene), about 4 min of play. Runs in order:
=0)=0)The first run with an empty list compiles as before and fills the list; the second stores the pipelines.
The risk is the one the guard was there for: a sampler with the wrong filter or address mode. I compared captures across 13 runs. I found no difference that the setting causes. One floral shirt in the boat scene varies between runs with the setting on and off alike. These runs had no BCPack tables (#385), so I could not judge texture detail on faces and clothes. A check on a PC with the tables would help.
Checks:
cargo clippy --workspace --all-targets(with and without--all-features) is clean, andcargo test -p victory-gpu --libgives 528 passed.🤖 Generated with Claude Code
@akimfomin on GitHub · 2026-11-28 11:37 UTC · original · edited 2026-11-28 12:07 UTC
PortBridge found one fallback case to separate from the successful RTX 3080 A/B. At
ca46856f,syncwarns on a refused sampler root, then adds the same key toSEEN.primesnapshots that set as settled. If replay of an earlier listed root fails, the source still allows pipelines using those keys into the library. I have not observed a driver refusal in a hardware run.A small injected-failure test could prime two ordered keys, refuse the first, and require an ordinary compile for a pipeline using the second too. That checks the original ordering assumption and leaves your successful warm-path test intact. I found this while comparing AnyXboxX #577, where we can reuse the same negative control. PortBridge.
Minimal fallback patch for
ca46856f. I verified it applies and reverses, andcargo check --locked -p victory-gpu --lib --features diagnosticsfinished successfully on the patched head under Windows. The injected driver-refusal test remains open.@Garu667 on GitHub · 2026-11-28 16:08 UTC · original
@akimfomin Thank you, it's fixed
@Indy2l on GitHub · 2026-11-28 18:13 UTC · original
Tested on an RTX 3060 12 GB (driver 621.40) / i5-12400F / 16 GB, with BCPack tables, Series S,
-Machine 3060, this branch (based onfe7c6e5), the prologue route from the cell to the crowded room.static-samplers.txtpipelinesfolder cleared,-WarmPipelinesmain, for comparison)After run 51,
host-pipelines.bingrew from 17 MB to 125 MB, so the static-sampler pipelines were stored. Run 52 is the first run of the day whose opening cutscene drew in full from its first frames.Textures, the check you asked for. Runs 52 (this branch) and 42 (
main) were both recorded. I compared them at one frame every 10 s, and at full resolution at matching spots in the cell, the corridors and the crowded room. Faces (Lucia, the waitress, the inmates), clothing, cinder-block walls, the chipped table paint and the floors are equally sharp and tiled the same. I saw no change in filtering, blur, pixelation or address mode. The camera is player-controlled, so the frames are matched by place, not pixel for pixel.Two side notes:
-WarmPipelinesstill did not help the title (run 51: 1,814 made in play after the warm built 1,982). So whatever keeps warm results from the title on this PC is not the sampler order (details in #423).🤖 Generated with Claude Code
@TaynanGT on GitHub · 2026-11-29 11:37 UTC · original
Thanks for the matched-place texture comparison and the second-launch data. The 2,023 library hits and 28 new pipelines make a strong case for consistent sampler ordering on this setup. Please keep the unresolved warm-to-title handoff in #423 separate, and retain the static-sampler provenance and cache compatibility checks.
@TaynanGT on GitHub · 2026-11-30 17:09 UTC · original
mainhas moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the currentmainand open a new PR; I'll review it there.Pull request closed