Sop 2 fixs #394

Open
timmmyyyyyyy wants to merge 4 commits from upstream-pr/394 into main
timmmyyyyyyy commented 2026-11-26 00:07:45 +00:00 (Migrated from github.com)

Imported from omonkeyz/xbox-emulator. Originally posted by timmmyyyyyyy on 2026-11-26T00:07:45Z.


Library / area: tombox-xshader — RDNA2 SOP2 scalar instructions.

Exports changed (exports.txt rows): None. No public exports changed.

Source of the behaviour: RDNA2 ISA instruction definitions and GFX7 lowering behavior. This PR adds regression coverage for S_CSELECT_B32 and S_CSELECT_B64, plus an explicit refusal for unsupported GFX7 S_CBRANCH_G_FORK lowering.

Changes

  • Added regression cases for S_CSELECT_B32 and S_CSELECT_B64 in crates/tombox-xshader/tests/opcodes.rs.
  • Verified that the instructions use RDNA2 SOP2 opcodes 0x0A and 0x0B, matching the project’s local GFX1013 ISA table.
  • Updated GFX7 lowering in crates/tombox-xshader/src/gcn.rs so SOP2 opcode 0x2B (S_CBRANCH_G_FORK) returns an explicit unsupported-instruction error instead of passing through to RDNA2.
  • This PR does not implement new RDNA2 instruction support: the local progress data already lists both CSELECT instructions as supported. It improves regression coverage and makes unsupported GFX7 lowering behavior explicit.

Verification

  • cargo test -p tombox-xshader --test opcodes — 29 passed.
  • cargo test -p tombox-xshader --test isa_table — passed.
  • cargo test -p tombox-xshader --lib — passed.
  • All 9 PR checks pass.
  • No game or console files and no binaries included.
  • No public exports changed.
  • No fake success; unsupported behavior remains explicit.

Remaining work

  • Broader project work remains for unrelated components. This PR only changes SOP2 regression coverage and GFX7 lowering of opcode 0x2B.
<!-- greyfinch-sync:omonkeyz/xbox-emulator:issue:5501416111 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/394). Originally posted by [timmmyyyyyyy](https://github.com/timmmyyyyyyy) on 2026-11-26T00:07:45Z. --- **Library / area:** `tombox-xshader` — RDNA2 SOP2 scalar instructions. **Exports changed (exports.txt rows):** None. No public exports changed. **Source of the behaviour:** RDNA2 ISA instruction definitions and GFX7 lowering behavior. This PR adds regression coverage for `S_CSELECT_B32` and `S_CSELECT_B64`, plus an explicit refusal for unsupported GFX7 `S_CBRANCH_G_FORK` lowering. ## Changes - Added regression cases for `S_CSELECT_B32` and `S_CSELECT_B64` in `crates/tombox-xshader/tests/opcodes.rs`. - Verified that the instructions use RDNA2 SOP2 opcodes `0x0A` and `0x0B`, matching the project’s local GFX1013 ISA table. - Updated GFX7 lowering in `crates/tombox-xshader/src/gcn.rs` so SOP2 opcode `0x2B` (`S_CBRANCH_G_FORK`) returns an explicit unsupported-instruction error instead of passing through to RDNA2. - This PR does not implement new RDNA2 instruction support: the local progress data already lists both CSELECT instructions as supported. It improves regression coverage and makes unsupported GFX7 lowering behavior explicit. ## Verification - [x] `cargo test -p tombox-xshader --test opcodes` — 29 passed. - [x] `cargo test -p tombox-xshader --test isa_table` — passed. - [x] `cargo test -p tombox-xshader --lib` — passed. - [x] All 9 PR checks pass. - [x] No game or console files and no binaries included. - [x] No public exports changed. - [x] No fake success; unsupported behavior remains explicit. ## Remaining work - Broader project work remains for unrelated components. This PR only changes SOP2 regression coverage and GFX7 lowering of opcode `0x2B`.
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/394:upstream-pr/394'
git switch 'upstream-pr/394'

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/394'
git switch 'upstream-pr/394'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/394'
git switch 'upstream-pr/394'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/394'
git switch 'main'
git merge --squash 'upstream-pr/394'
git switch 'main'
git merge --ff-only 'upstream-pr/394'
git switch 'main'
git merge 'upstream-pr/394'
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
omonkeyz/xbox-emulator!394
No description provided.