gpu/pipeline: adapter-keyed PSO cache filenames and atomic rename (1/4 of #51, stable-amd) #180

Open
Vladimir-Human wants to merge 1 commit from upstream-pr/180 into stable-amd
Vladimir-Human commented 2026-11-28 18:09:00 +00:00 (Migrated from github.com)

Imported from PastiiJay/klbf-lab. Originally posted by Vladimir-Human on 2026-11-28T18:09:00Z.


Re-port of #56 onto stable-amd (v26.11.6, 75022ba).
Supersedes #56 (which targeted main and became conflicting/closed across disjoint branch histories).

Verification on stable-amd (commit e7797a9, Cargo.lock untouched)

  • cargo check --workspace --tests --locked: passed
  • cargo check -p victory-gpu --tests --locked --features diagnostics: passed
  • cargo test --locked -p victory-gpu --lib pipeline:
test result: ok. 35 passed; 0 failed; 0 ignored; 0 measured; 458 filtered out; finished in 0.52s
<!-- greyfinch-sync:PastiiJay/klbf-lab:issue:5543152046 --> Imported from [PastiiJay/klbf-lab](https://github.com/PastiiJay/klbf-lab/pull/180). Originally posted by [Vladimir-Human](https://github.com/Vladimir-Human) on 2026-11-28T18:09:00Z. --- Re-port of #56 onto `stable-amd` (`v26.11.6`, `75022ba`). Supersedes #56 (which targeted `main` and became conflicting/closed across disjoint branch histories). ### Verification on `stable-amd` (commit `e7797a9`, `Cargo.lock` untouched) - `cargo check --workspace --tests --locked`: passed - `cargo check -p victory-gpu --tests --locked --features diagnostics`: passed - `cargo test --locked -p victory-gpu --lib pipeline`: ``` test result: ok. 35 passed; 0 failed; 0 ignored; 0 measured; 458 filtered out; finished in 0.52s ```
HandshakeHackin commented 2026-11-28 18:42:12 +00:00 (Migrated from github.com)

Imported from PastiiJay/klbf-lab. Originally posted by HandshakeHackin on 2026-11-28T18:42:12Z.


I reproduced a shader cache rollback on e7797a9. An open Windows handle temporarily prevented replacement of the adapter’s .bin, so two saves went to .next. After closing the handle, a third save successfully wrote the newest .bin. Reopening the cache then promoted the older .next over that successful save.

The change publishes each completed save to .next first, so a later save supersedes an older pending copy. The regression test failed on the original at reopen, passed with the change, and all 11 pipeline-library tests passed on Windows Server 2022. Change and regression test · Before · After

<!-- greyfinch-sync:PastiiJay/klbf-lab:comment:7243991282 --> Imported from [PastiiJay/klbf-lab](https://github.com/PastiiJay/klbf-lab/pull/180#issuecomment-7243991282). Originally posted by [HandshakeHackin](https://github.com/HandshakeHackin) on 2026-11-28T18:42:12Z. --- I reproduced a shader cache rollback on `e7797a9`. An open Windows handle temporarily prevented replacement of the adapter’s `.bin`, so two saves went to `.next`. After closing the handle, a third save successfully wrote the newest `.bin`. Reopening the cache then promoted the older `.next` over that successful save. The change publishes each completed save to `.next` first, so a later save supersedes an older pending copy. The regression test failed on the original at reopen, passed with the change, and all 11 pipeline-library tests passed on Windows Server 2022. [Change and regression test](https://github.com/HandshakeHackin/klbf-lab/commit/a2b29b9e4ac96449551c29c69638d166c937a190) · [Before](https://github.com/HandshakeHackin/klbf-lab/actions/runs/46176736878/job/141077035642) · [After](https://github.com/HandshakeHackin/klbf-lab/actions/runs/46176736878/job/141077035983)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/180:upstream-pr/180'
git switch 'upstream-pr/180'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'stable-amd'
git merge --no-ff 'upstream-pr/180'
git switch 'upstream-pr/180'
git rebase 'stable-amd'
git switch 'stable-amd'
git merge --ff-only 'upstream-pr/180'
git switch 'upstream-pr/180'
git rebase 'stable-amd'
git switch 'stable-amd'
git merge --no-ff 'upstream-pr/180'
git switch 'stable-amd'
git merge --squash 'upstream-pr/180'
git switch 'stable-amd'
git merge --ff-only 'upstream-pr/180'
git switch 'stable-amd'
git merge 'upstream-pr/180'
git push origin 'stable-amd'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
PastiiJay/klbf-lab!180
No description provided.