Shaders: VOP1 no-source ops stay one dword #473
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/fxceless--victory-fork!473
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-473"
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?
@davutsimsekk on GitHub · 2026-11-25 01:20 UTC · original
davutsimsekk:fix/vop1-no-operands→main· +23 −1 · 1 files · 1 commits · openv_nop,v_pipeflushandv_clrexcptake no source, but the VOP1 decoder treated the 9-bit field as a source and added a literal/SDWA/DPP extension word whenever it matched0xFF,0xF9,0xFA,0xE9or0xEA. The field is a shader hash there (seefields.rs), so such a hash made the decoder consume the next instruction as an extension and misalign or fail.These three opcodes are now always one dword; every other VOP1 is unchanged.
Test
vop1_without_operands_has_no_extension_worddecodesv_nopandv_pipeflushwith hash-like low bits and checks the next instruction is stills_endpgmat offset 4. Onmaindecoding fails.cargo test -p victory-shader --lib vop1_without_operands_has_no_extension_word: 1 passedcargo clippy -p victory-shader --all-targets --locked -- -D warnings: cleanrustfmt --edition 2024 --check crates/victory-shader/src/gfx10/mod.rs: clean@avt0m4t48 on GitHub · 2026-11-25 01:41 UTC · original
I independently verified
e98e7f29352c12156a756eb1b4a59fb035b55ca3against its merge basea803c87c48078e57b296e06e08146d7ceca44530using synthetic instruction words and separate Cargo target directories.v_nop,v_pipeflush, andv_clrexcp, followed bys_endpgm. The base failed in exactly 15 cases (all three opcodes with each of the five extension markers). The PR head decoded all 1,536 cases as a one-dword VOP1 followed bys_endpgmat byte offset 4.v_mov_b32kept its extension and placeds_endpgmat byte offset 8 for all five markers on both commits. The register-source control placed it at offset 4 on both.cargo check --locked -p victory-shader --tests --target x86_64-pc-windows-msvcalso passed. Runtime verification used Linux.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.