tombox-xshader tests: pin the refusal of GS emit and cut on streams 1-3 #232

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

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


Library / area: tombox-xshader tests, geometry shader s_sendmsg (emit_sendmsg)

Exports changed (exports.txt rows): none

Source of the behaviour: your answer on #104: streams 1-3 only feed stream-out, and the D3D12 layer has no stream-out path, so the translator keeps the explicit error rather than dropping those emits. No translator change.

One topic, +25: one helper and one test in tests/synthetic.rs, next to geometry_adjacency_primitives_translate.

What was missing

That decision had no test. A later change could drop or remap stream 1-3 emits (the remap #104 first proposed, SV_RenderTargetArrayIndex, would be wrong), and no test would notice.

The test

geometry_emit_and_cut_on_streams_1_to_3_are_refused builds a geometry shader whose body is one s_sendmsg (message 2 = GS) and s_endpgm:

simm16 expected result
GS cut / emit / emit-cut (op 1, 2, 3) on stream 1, 2, 3 (9 cases) Err("GS output stream != 0 unsupported") 9 / 9
message 3 (GS_DONE) translates ok
guard in emit_sendmsg disabled (if false && stream != 0) test fails fails at the first case

cargo test --locked -p tombox-xshader --test synthetic geometry: 2 passed. I ran on x86_64-pc-windows-gnu, because this machine has no MSVC linker. The test does no floating-point maths.

  • 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:6553594848 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/232). Originally posted by [azerioxfr](https://github.com/azerioxfr) on 2026-11-23T06:21:55Z. --- **Library / area:** tombox-xshader tests, geometry shader `s_sendmsg` (`emit_sendmsg`) **Exports changed (exports.txt rows):** none **Source of the behaviour:** your answer on #104: streams 1-3 only feed stream-out, and the D3D12 layer has no stream-out path, so the translator keeps the explicit error rather than dropping those emits. No translator change. One topic, +25: one helper and one test in `tests/synthetic.rs`, next to `geometry_adjacency_primitives_translate`. ### What was missing That decision had no test. A later change could drop or remap stream 1-3 emits (the remap #104 first proposed, `SV_RenderTargetArrayIndex`, would be wrong), and no test would notice. ### The test `geometry_emit_and_cut_on_streams_1_to_3_are_refused` builds a geometry shader whose body is one `s_sendmsg` (message 2 = GS) and `s_endpgm`: | simm16 | expected | result | |---|---|---| | GS cut / emit / emit-cut (op 1, 2, 3) on stream 1, 2, 3 (9 cases) | `Err("GS output stream != 0 unsupported")` | 9 / 9 | | message 3 (GS_DONE) | translates | ok | | guard in `emit_sendmsg` disabled (`if false && stream != 0`) | test fails | fails at the first case | `cargo test --locked -p tombox-xshader --test synthetic geometry`: 2 passed. I ran on `x86_64-pc-windows-gnu`, because this machine has no MSVC linker. The test does no floating-point maths. - [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:22 +00:00 (Migrated from github.com)

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


Applied locally on main with your authorship kept (cherry-picked, 6d86929); 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:7103538367 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/232#issuecomment-7103538367). Originally posted by [omonkeyz](https://github.com/omonkeyz) on 2026-11-23T14:08:22Z. --- Applied locally on main with your authorship kept (cherry-picked, 6d86929); 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:11 +00:00 (Migrated from github.com)

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


Tested head bdcae1f53b, applied with git apply (whitespace ignored, the line endings of my checkout differ) on main f89e410, together with #199, #229 (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 206 passed, 0 failed
the tests the PRs of this tree add, in the exec suite on WARP 2 passed, 0 failed
the same tests with TOMBOX_EXEC_HW=1 (RTX 3080) 2 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:7110886042 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/232#issuecomment-7110886042). Originally posted by [kiwe147](https://github.com/kiwe147) on 2026-11-23T18:57:11Z. --- Tested head `bdcae1f53b`, applied with `git apply` (whitespace ignored, the line endings of my checkout differ) on `main` `f89e410`, together with #199, #229 (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` | 206 passed, 0 failed | | the tests the PRs of this tree add, in the `exec` suite on WARP | 2 passed, 0 failed | | the same tests with `TOMBOX_EXEC_HW=1` (RTX 3080) | 2 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:32 +00:00 (Migrated from github.com)

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


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

<!-- greyfinch-sync:omonkeyz/xbox-emulator:comment:7163350122 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/232#issuecomment-7163350122). Originally posted by [omonkeyz](https://github.com/omonkeyz) on 2026-11-25T13:08:32Z. --- Applied on main in 6d86929 (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!232
No description provided.