Shaders: a vertex input whose channels run past v255 is refused, not wrapped onto v0 #278
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/278"
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?
Imported from avatarmanz/VIctory-7900XTX. Originally posted by sharan104 on 2026-11-26T14:14:30Z.
io::raisemapped each enabled channel of a vertex input toReg::V(i.vgpr + channel), adding inu8. Herevgpris a raw byte of the stage data (native.rsvs_io). For an input at v253 or above with a higher channel enabled:Fix:
checked_add, refusing the stage data withShaderError::Malformed("vertex input past the last VGPR"), as the module already does for other bad stage data.Test:
io::tests::vertex_inputs_past_the_last_vgpr_are_refused. v252 with all four channels is accepted. v253 with four channels, and v255 with channel 1, are refused. v255 with only channel 0 is still accepted, since only enabled channels count. Before the fix the test panicked with the overflow; after it, it passed 10 runs out of 10.Results:
cargo test -p victory-shader --locked: 303 passed, 0 failed, 4 ignored.-D warningsis clean, with and without--all-features.This doesn't overlap #229, which fixes other malformed-input paths (signatures, thread groups, user SGPRs).
🤖 Generated with Claude Code
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.