Reuse shader user-data loads by constant-buffer row #231
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!231
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-231"
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-02 19:54 UTC · original
tommiehansen:perf/cache-user-data-rows→main· +76 −30 · 3 files · 3 commits · merged 2026-12-03 17:15 UTCChange
Read each immutable 16-byte row of shader user data once in the entry block. Create only the components that the shader requests and reuse those values. The translation still records the original dword indices and buffer size, and the entry block dominates the uses. This applies to the host's root constants, including those used by native BVH tests.
The translator creates fewer redundant instructions. Some of those loads may already disappear in later compiler passes, so the change has a direct IR and translation benefit and needs hardware evidence for any frame-time effect.
Quantified translator fixture
The result describes emitted loads in the fixture, not final GPU ISA. Related shader optimizations #302 and #305 target guest-memory descriptor selection rather than user-data row reuse.
Validation
Please test shader cache and pipeline warm-up, image parity, and frame times with ray tracing at native 1080p on both the RX 9060 XT 16 GB and RX 9070 XT under Linux.