tombox-xshader tests: pin the s_sendmsghalt and ds_ordered_count refusals #233

Closed
azerioxfr wants to merge 1 commit from upstream-pr/233 into main
azerioxfr commented 2026-11-23 06:22:50 +00:00 (Migrated from github.com)

Imported from omonkeyz/xbox-emulator. Originally posted by azerioxfr on 2026-11-23T06:22:50Z.


Library / area: tombox-xshader tests, compute stage refusals (hlsl.rs SOPP 0x11, hlsl/gds.rs)

Exports changed (exports.txt rows): none

Source of the behaviour: the translator's own deliberate refusals. #187 lists both as "refused on purpose" for the compute stage. No translator change.

One topic, +17: one helper and one test in tests/synthetic.rs.

What was missing

s_sendmsghalt (halts the wave after the message, which HLSL has no equivalent for) and ds_ordered_count (dispatch-ordered GDS append) are refused with explicit errors. They are two of the few RDNA2 instructions left grey on the map, and no test pinned either refusal, so a change could start dropping them without anyone noticing.

The test

sendmsghalt_and_ordered_count_are_refused translates a compute shader with each instruction and checks the exact error:

program expected error result
s_sendmsghalt 0 (0xbf910000), s_endpgm s_sendmsghalt halts the wave after the message ok
ds_ordered_count with GDS=1 (0xd8fe0000 0x00000101), s_endpgm ds_ordered_count: dispatch-ordered GDS append is not lowered ok

cargo test --locked -p tombox-xshader --test synthetic sendmsghalt: 1 passed (x86_64-pc-windows-gnu, no floating point involved).

  • cargo test -p tombox-xshader --test synthetic passes for the new test
  • No game or console files and no binaries included
  • No fake success; anything not possible is left missing with a note
<!-- greyfinch-sync:omonkeyz/xbox-emulator:issue:6553606963 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/233). Originally posted by [azerioxfr](https://github.com/azerioxfr) on 2026-11-23T06:22:50Z. --- **Library / area:** tombox-xshader tests, compute stage refusals (`hlsl.rs` SOPP 0x11, `hlsl/gds.rs`) **Exports changed (exports.txt rows):** none **Source of the behaviour:** the translator's own deliberate refusals. #187 lists both as "refused on purpose" for the compute stage. No translator change. One topic, +17: one helper and one test in `tests/synthetic.rs`. ### What was missing `s_sendmsghalt` (halts the wave after the message, which HLSL has no equivalent for) and `ds_ordered_count` (dispatch-ordered GDS append) are refused with explicit errors. They are two of the few RDNA2 instructions left grey on the map, and no test pinned either refusal, so a change could start dropping them without anyone noticing. ### The test `sendmsghalt_and_ordered_count_are_refused` translates a compute shader with each instruction and checks the exact error: | program | expected error | result | |---|---|---| | `s_sendmsghalt 0` (`0xbf910000`), `s_endpgm` | `s_sendmsghalt halts the wave after the message` | ok | | `ds_ordered_count` with GDS=1 (`0xd8fe0000 0x00000101`), `s_endpgm` | `ds_ordered_count: dispatch-ordered GDS append is not lowered` | ok | `cargo test --locked -p tombox-xshader --test synthetic sendmsghalt`: 1 passed (`x86_64-pc-windows-gnu`, no floating point involved). - [x] `cargo test -p tombox-xshader --test synthetic` passes for the new test - [x] No game or console files and no binaries included - [x] No fake success; anything not possible is left `missing` with a note
omonkeyz commented 2026-11-23 14:08:24 +00:00 (Migrated from github.com)

Imported from omonkeyz/xbox-emulator. Originally posted by omonkeyz on 2026-11-23T14:08:24Z.


Applied locally on main with your authorship kept (cherry-picked, eb557e5); the tombox-xshader suite passes in a sandbox (exec 155/155 on WARP). It ships in the next release; this PR will be closed when that is pushed. Thanks.

<!-- greyfinch-sync:omonkeyz/xbox-emulator:comment:7103539112 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/233#issuecomment-7103539112). Originally posted by [omonkeyz](https://github.com/omonkeyz) on 2026-11-23T14:08:24Z. --- Applied locally on main with your authorship kept (cherry-picked, eb557e5); the tombox-xshader suite passes in a sandbox (exec 155/155 on WARP). It ships in the next release; this PR will be closed when that is pushed. Thanks.
kiwe147 commented 2026-11-23 18:57:15 +00:00 (Migrated from github.com)

Imported from omonkeyz/xbox-emulator. Originally posted by kiwe147 on 2026-11-23T18:57:15Z.


Tested head c762fc976e, applied with git apply (whitespace ignored, the line endings of my checkout differ) on main f89e410, together with #204, #234 (one tree; the PRs touch different files). It applied without conflicts and built.

Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, NVIDIA GeForce RTX 3080 (driver 621.24), MSVC, Rust 1.91.1.

run result
tombox-xshader lib + opcodes, synthetic, mesh, linkage, mixed_table, ps_linkage, centroid, gcn_dims, amp, xshader_cli, isa_sweep 211 passed, 0 failed
the tests the PRs of this tree add, in the exec suite on WARP 5 passed, 0 failed
the same tests with TOMBOX_EXEC_HW=1 (RTX 3080) 5 passed, 0 failed

No new failure against main f89e410 in any of these. This is one combined tree, not a run of this PR alone.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:omonkeyz/xbox-emulator:comment:7110887580 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/233#issuecomment-7110887580). Originally posted by [kiwe147](https://github.com/kiwe147) on 2026-11-23T18:57:15Z. --- Tested head `c762fc976e`, applied with `git apply` (whitespace ignored, the line endings of my checkout differ) on `main` `f89e410`, together with #204, #234 (one tree; the PRs touch different files). It applied without conflicts and built. Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, NVIDIA GeForce RTX 3080 (driver 621.24), MSVC, Rust 1.91.1. | run | result | |---|---| | `tombox-xshader` lib + `opcodes`, `synthetic`, `mesh`, `linkage`, `mixed_table`, `ps_linkage`, `centroid`, `gcn_dims`, `amp`, `xshader_cli`, `isa_sweep` | 211 passed, 0 failed | | the tests the PRs of this tree add, in the `exec` suite on WARP | 5 passed, 0 failed | | the same tests with `TOMBOX_EXEC_HW=1` (RTX 3080) | 5 passed, 0 failed | No new failure against `main` `f89e410` in any of these. This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code)
omonkeyz commented 2026-11-25 13:08:35 +00:00 (Migrated from github.com)

Imported from omonkeyz/xbox-emulator. Originally posted by omonkeyz on 2026-11-25T13:08:35Z.


Applied on main in eb557e5 (cherry-picked onto the current history with your authorship kept; comment lines stripped per CONTRIBUTING). Thank you.

<!-- greyfinch-sync:omonkeyz/xbox-emulator:comment:7163351065 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/233#issuecomment-7163351065). Originally posted by [omonkeyz](https://github.com/omonkeyz) on 2026-11-25T13:08:35Z. --- Applied on main in eb557e5 (cherry-picked onto the current history with your authorship kept; comment lines stripped per CONTRIBUTING). Thank you.

Pull request closed

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!233
No description provided.