victory-recomp: avoid u64::wrapping_shr(64) no-op in vertex stream binding #81
No reviewers
Labels
No labels
accessibility
amd
bug
crash
device-removed
documentation
duplicate
enhancement
feature-request
good first issue
help wanted
input
invalid
launcher
memory
needs-logs
nvidia
off-topic
performance
question
shaders
stutter
visuals
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/VGLALALA--ReVictory-RDNA3!81
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-81"
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?
@ending3729 on GitHub · 2026-12-05 23:31 UTC · original
ending3729:fix/vertex-stream-mask-shift-overflow→main· +53 −7 · 1 files · 1 commits · openSummary
bind_draw_vertex_streams_inner(crates/victory-recomp/src/render.rs) when bit 63 is the lowest remaining set bit indecl_mask(decl_mask.trailing_zeros() == 63,shift == 64).u64::wrapping_shr(64)masks the shift count modulo 64 (64 & 63 == 0), leaving bothpipe_maskanddecl_maskunchanged whenpipe_mask != 0, incrementingelem_idxunboundedly, and reading pastelem_arr.advance_vertex_stream_masks(pipe_mask, decl_mask)usingchecked_shr(shift).unwrap_or(0)and add unit testrender::tests::advance_vertex_stream_masks_handles_bit63_without_wrapping.cargo test -p victory-recomp --locked30 passed; 0 failed)cargo clippy --workspace --all-targets --locked -- -D warningscargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo xtask policyasset policy: 452 files ok)Verification notes
crates/victory-recomp/src/render.rs(advance_vertex_stream_masks_handles_bit63_without_wrapping) plus full workspace Clippy and asset-policy checks.advance_vertex_stream_masks(u64::MAX, 1u64 << 63)returned(u64::MAX, 1u64 << 63)underwrapping_shr(64)before switching tochecked_shr(shift).unwrap_or(0).AI-assisted: yes
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.