Stop allocating per draw for root constants and table slots #33
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!33
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/33/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:32 UTC · original
romainhedouin:perf/draw-stack-buffers→main· +58 −24 · 1 files · 1 commits · merged 2026-11-25 17:09 UTCEach draw allocated small vectors on the heap: one per shader stage for its root constants, one for the tables to rebuild, and one for the tables it made. Now root constants go in a 64-word array on the stack (a root signature cannot hold more), the table slots in a small bit set on the stack, and the made tables in a buffer the state reuses between draws.
"Model benchmark" = the same logic copied into a standalone program and timed in release mode on a Mac, not in the game. Type-checked for Windows (
cargo clippy --target x86_64-pc-windows-msvc, with and without--all-features, no new warnings); not run. TouchesState::tableslike #34; whichever merges second needs a small rebase.🤖 Generated with Claude Code