Fix source-less VOP1 lengths and VOP3 CMPX destinations #6

Open
Yoshi-233 wants to merge 1 commit from upstream-pr/6 into main
Yoshi-233 commented 2026-11-26 07:53:21 +00:00 (Migrated from git.gtahub.st)

Imported from codec-d/cool_fox. Originally posted by Yoshi-233 on 2026-11-26T07:53:21Z.


@⁠Yoshi-233 on GitHub · 2026-11-26 07:50 UTC · original
Yoshi-233:fix/gfx10-operand-decode → main · +32 −2 · 2 files · 1 commits · open

Two GFX10 decoder cases from davutsimsekk's fix also reproduce on this fork at f4b48ad.

  • v_nop, v_pipeflush, and v_clrexcp have no source operand. Each treated five ignored SRC0 encodings as an extension and swallowed the next instruction. The regression puts s_endpgm after all three, and also checks that a real v_mov_b32 literal still consumes its second word.
  • VOP3 v_cmpx* exposes EXEC as its destination. Using the encoded VDST here made decoded operands disagree with the IR. The regression checks the one- and two-dword EXEC operands for wave32 and wave64.

I ran identical synthetic CPU probes on the base and this branch with Rust 1.98.1. All 1,536 source-less encodings now preserve the trailing instruction (15 failures on base). All 760 tested VOP3 CMPX operand combinations now report the expected destination (760 failures on base). MOV, ordinary CMP, and VOPC controls retained their expected results. The shader library ran 205 tests successfully, 2 ignored. I didn't run the game or measure frame rate.

<!-- greyfinch-sync:codec-d/cool_fox:issue:8087 --> Imported from [codec-d/cool_fox](https://git.gtahub.st/github/codec-d--cool_fox/pulls/6). Originally posted by [Yoshi-233](https://github.com/Yoshi-233) on 2026-11-26T07:53:21Z. --- **@⁠Yoshi-233** on GitHub · 2026-11-26 07:50 UTC · [original](https://github.com/codec-d/cool_fox/pull/6) `Yoshi-233:fix/gfx10-operand-decode` → `main` · +32 −2 · 2 files · 1 commits · open Two GFX10 decoder cases from [davutsimsekk's fix](https://github.com/Belobug/VIctory-Belobug-AMD/pull/180) also reproduce on this fork at `f4b48ad`. * `v_nop`, `v_pipeflush`, and `v_clrexcp` have no source operand. Each treated five ignored SRC0 encodings as an extension and swallowed the next instruction. The regression puts `s_endpgm` after all three, and also checks that a real `v_mov_b32` literal still consumes its second word. * VOP3 `v_cmpx*` exposes EXEC as its destination. Using the encoded VDST here made decoded operands disagree with the IR. The regression checks the one- and two-dword EXEC operands for wave32 and wave64. I ran identical synthetic CPU probes on the base and this branch with Rust 1.98.1. All 1,536 source-less encodings now preserve the trailing instruction (15 failures on base). All 760 tested VOP3 CMPX operand combinations now report the expected destination (760 failures on base). MOV, ordinary CMP, and VOPC controls retained their expected results. The shader library ran 205 tests successfully, 2 ignored. I didn't run the game or measure frame rate.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/6:upstream-pr/6'
git switch 'upstream-pr/6'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/6'
git switch 'upstream-pr/6'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/6'
git switch 'upstream-pr/6'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/6'
git switch 'main'
git merge --squash 'upstream-pr/6'
git switch 'main'
git merge --ff-only 'upstream-pr/6'
git switch 'main'
git merge 'upstream-pr/6'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
codec-d/cool_fox!6
No description provided.