shader: handle multi-descriptor wide loads and partial reloads in descriptor_data (#4) #461
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!461
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-457"
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?
@lucasferreira1610 on GitHub · 2026-11-27 20:53 UTC · original
lucasferreira1610:fix/descriptor-data-multi-load→main· +551 −104 · 3 files · 1 commits · openRefs #4
Summary
Fixes
"a descriptor's address or format read as data: a dword outside the descriptor"(3 compute shaders in the #4 refusal table) inLower::descriptor_data:s_load_dwordx8,s_load_dwordx16):Lower::load_usespreviously kept only the first(use_site, first)per scalar load, dropping any second descriptor loaded by the same instruction so its dwords fell past the first descriptor's range and were marked"a dword outside the descriptor".Lower::load_usesnow keeps every distinctfirstoffset per load, andLower::descriptor_datarebuilds each descriptor's queryable size/count dwords independently:getDimensionswhen at least one of their dwords is read outside resource descriptor operands, keeping DXIL output unchanged on shaders that do not read them as data.site's dword range (e.g.s_load_dwordat+8for a buffer's record count ors_load_dwordx4at+4for an image's size dwords within the same 32-byte slot),Lower::descriptor_datamatches it instead of falling through toview_addresses. Partial reloads that do not overlap any rebuilt size/count dword (such as a standalone+4dword-1 address-high-bits load) still pass through toview_addresses.docs/native-host.md.Verification
cargo test -p victory-shader(404 unit tests + 5 sweep tests passed, including new testswide_descriptor_load_rebuilds_each_descriptor_and_keeps_outside_refusedandpartial_reload_of_used_descriptor_size_dwords_translates)cargo test -p victory-hle --lib -p victory -p xtask(all passed)cargo clippy -p victory-shader --all-targets -- -D warnings(passed)cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings(passed)cargo xtask policy(asset policy: 398 files ok)github-bot referenced this pull request2026-11-27 22:22:58 +00:00
@Olima34 on GitHub · 2026-11-28 00:37 UTC · original · requested changes
Thanks for this PR! We're helping the maintainer clear the queue tonight, and main has moved a lot (the preview branch landed as
86cefd22, then a batch of PRs; main is nowa6a58361). This branch now conflicts with main incrates/victory-shader/src/emit/lower.rs.Could you merge current
maininto the branch (a merge commit is fine, no need to rebase) and resolve the conflict? This one is in translator code, so please re-run the shader tests after the merge. Once GitHub shows it as mergeable and CI is green on the new head, we'll read it through and merge it if it holds up.@Olima34 on GitHub · 2026-11-28 00:46 UTC · original
The maintainer is handling this one himself; please follow his lead rather than my review.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.