Shaders: VOP1 no-source ops stay one dword #473
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from fxceless/victory-fork. Originally posted by davutsimsekk on 2026-11-25T01:20:37Z.
v_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: cleanImported from fxceless/victory-fork. Originally posted by avt0m4t48 on 2026-11-25T01:41:02Z.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.