Copy an unaligned root constant buffer once per list #24
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!24
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/24/head"
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?
@romainhedouin on GitHub · 2026-11-25 12:28 UTC · original
romainhedouin:perf/unaligned-cbv-reuse→main· +22 −3 · 2 files · 1 commits · merged 2026-11-25 17:09 UTCWhen a root constant buffer is not 256-byte aligned on the host, the draw copies up to 64 KiB of title memory into upload memory at submission. Two draws of the same list that bound the same buffer made two identical copies. Now the second draw reuses the first copy. Anything in the list that writes title memory (a title copy or a run step) starts a new copy, so the GPU reads exactly the same bytes as before.
Counts from the code; how often bindings repeat in the game is not measured yet. Type-checked for Windows (
cargo clippy -p victory-gpu --target x86_64-pc-windows-msvc, with and without--all-features, no new warnings); not run.🤖 Generated with Claude Code
@Ekabusto on GitHub · 2026-11-25 12:47 UTC · original
Checked locally: builds, and
cargo test -p victory-gpu --libpasses (109 passed, 4 ignored). Clippy shows nothing new, and there are no conflicts.The cache is invalidated in the right places:
CopyandRunare the only steps that write title memory before the fills run at submission, and both clearfilledalongsiderefreshed.resetreplaces the wholeDeferred, so a stale scratch address cannot survive into the next recording. Looks good to me.Reviewed on Windows 11 (build 26300), Rust 1.98.1, each PR in its own worktree; no game data, not run in the game. AI-assisted (Claude Code).