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

Closed
github-bot wants to merge 1 commit from gh-pr/233/head into gh-pr/233/base
Owner

@⁠azerioxfr on GitHub · 2026-11-23 06:22 UTC · original
azerioxfr:xshader-pin-halt-ordered-count-refusals → main · +17 −0 · 1 files · 1 commits · closed without merging

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
**@⁠azerioxfr** on GitHub · 2026-11-23 06:22 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/233) `azerioxfr:xshader-pin-halt-ordered-count-refusals` → `main` · +17 −0 · 1 files · 1 commits · closed without merging **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
Both are refused on purpose (s_sendmsghalt halts the wave, which HLSL
cannot express; ds_ordered_count is the dispatch-ordered GDS append),
and the progress map counts them as the instructions left open, but no
test covered either refusal. sendmsghalt_and_ordered_count_are_refused
translates a compute shader with each one and checks the exact error.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:15:02 +00:00
github-bot closed this pull request 2026-11-26 06:15:02 +00:00
Author
Owner

@⁠omonkeyz on GitHub · 2026-11-23 14:08 UTC · original

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.

**@⁠omonkeyz** on GitHub · 2026-11-23 14:08 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/233#issuecomment-7103539112) 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.
Author
Owner

@⁠kiwe147 on GitHub · 2026-11-23 18:57 UTC · original

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)

**@⁠kiwe147** on GitHub · 2026-11-23 18:57 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/233#issuecomment-7110887580) 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)
Author
Owner

@⁠omonkeyz on GitHub · 2026-11-25 13:08 UTC · original

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

**@⁠omonkeyz** on GitHub · 2026-11-25 13:08 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/233#issuecomment-7163351065) 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

This discussion has been locked. Commenting is limited to contributors.
No description provided.