perf(shader): experiment with block-local descriptor reuse #606
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/lobomfz--VIctory-xmem!606
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-606"
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?
@tommiehansen on GitHub · 2026-12-05 17:04 UTC · original
tommiehansen:perf/phase12-descriptor-local-reuse-20261205→main· +307 −6 · 3 files · 7 commits · draftWhy
Cross-block common-subexpression reuse of immutable descriptor and constant-buffer loads can extend scalar value lifetimes. On descriptor-heavy shaders, excessive SGPR pressure may lead to spilling, but recomputing loads also has a cost.
What changes
Experiment with limiting cross-block CSE for these loads while keeping ordinary CSE and default behavior unchanged. Opt-in
VICTORY_SHADER_OPT=575(default 63 + bit 512). Adapted to the current reusable expression-table optimizer and scratch storage. Independent of #601 and #542's wave-control-flow change.Benchmark results
No measured register allocation or runtime improvement established. Current scope is exactness and switch coverage.
27544feWhy this should be merged
Selective rematerialization could reduce long-lived scalar values in affected shaders, but NIR may reintroduce CSE and extra loads may outweigh the benefit. Keep draft until actual matched ACO results demonstrate a useful tradeoff.
Validation and compatibility
Initial audit at baseline 8bf4878/candidate
f42945d, six exact cases per arm; initial switch filter selected zero tests. Corrected switch audit selects the parser test. Current synchronized head all three jobs pass. Request representative descriptor-heavy DXIL exports, final GFX11/GFX12 ISA, SGPR/VGPR allocations, spills/scratch, translation cost and physical execution. No hardware/FPS claim.2026-12-06 — multi-region descriptor pressure control
Exact WARP CI, head
2d2f3eda: eight regions, repeated descriptor/constant-buffer loads and 6 independent offset cases per mode (12 exact cases, including out-of-range controls). Offline compiler audit found identical exported DXIL in both arms; descriptor SPIR-V did not satisfy the single-binding compile harness ABI. Neither actual activation nor AMD SGPR/load/occupancy benefit is established. Do not treat this as a qualifying performance comparison. Keep draft; the next workload must exhibit actual cross-block reuse and carry its correct descriptor ABI.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.