tombox-xshader tests: pin the gather4 bias and dmask refusals #248

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

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


Library / area: tombox-xshader tests, MIMG gather4 (hlsl.rs emit_mimg)

Exports changed (exports.txt rows): none

Source of the behaviour: the translator's own refusals. HLSL Gather* has no LOD bias or clamp operand and returns one channel, so emit_mimg refuses gather4 with a bias / clamp modifier and with a multi-channel dmask. No translator change.

One topic, +33: one test in tests/exec_mem/mimg.rs.

What was missing

Neither refusal (gather4 with LOD bias or clamp unsupported, gather4 with dmask {m:#x} unsupported) was mentioned by any test.

The test

image_gather4_bias_and_dmask_refusals:

program expected result
image_gather4_b (0x45), dmask 0xf Err("gather4 with LOD bias or clamp unsupported") ok
image_gather4_b_cl (0x46), dmask 0xf same error ok
image_gather4_lz (0x47), dmask 0x3 Err("gather4 with dmask 0x3 unsupported") ok
image_gather4_lz, dmask 0x8 translates to .GatherAlpha( ok
mutation: modifier guard relaxed / dmask 3 accepted fails at the matching assertion fails

cargo test --locked --release -p tombox-xshader --test exec -- --exact exec_mem::mimg::image_gather4_bias_and_dmask_refusals: 1 passed (x86_64-pc-windows-gnu).

  • the test passes
  • 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:6554366266 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/248). Originally posted by [azerioxfr](https://github.com/azerioxfr) on 2026-11-23T07:22:16Z. --- **Library / area:** tombox-xshader tests, MIMG gather4 (`hlsl.rs` `emit_mimg`) **Exports changed (exports.txt rows):** none **Source of the behaviour:** the translator's own refusals. HLSL `Gather*` has no LOD bias or clamp operand and returns one channel, so `emit_mimg` refuses gather4 with a bias / clamp modifier and with a multi-channel dmask. No translator change. One topic, +33: one test in `tests/exec_mem/mimg.rs`. ### What was missing Neither refusal (`gather4 with LOD bias or clamp unsupported`, `gather4 with dmask {m:#x} unsupported`) was mentioned by any test. ### The test `image_gather4_bias_and_dmask_refusals`: | program | expected | result | |---|---|---| | `image_gather4_b` (0x45), dmask 0xf | `Err("gather4 with LOD bias or clamp unsupported")` | ok | | `image_gather4_b_cl` (0x46), dmask 0xf | same error | ok | | `image_gather4_lz` (0x47), dmask 0x3 | `Err("gather4 with dmask 0x3 unsupported")` | ok | | `image_gather4_lz`, dmask 0x8 | translates to `.GatherAlpha(` | ok | | mutation: modifier guard relaxed / dmask 3 accepted | fails at the matching assertion | fails | `cargo test --locked --release -p tombox-xshader --test exec -- --exact exec_mem::mimg::image_gather4_bias_and_dmask_refusals`: 1 passed (`x86_64-pc-windows-gnu`). - [x] the test passes - [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:14 +00:00 (Migrated from github.com)

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


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

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


Tested head b87f15b7c8, applied with git apply (whitespace ignored, the line endings of my checkout differ) on main f89e410, together with #242, #244 (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 205 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:7111320141 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/248#issuecomment-7111320141). Originally posted by [kiwe147](https://github.com/kiwe147) on 2026-11-23T19:15:09Z. --- Tested head `b87f15b7c8`, applied with `git apply` (whitespace ignored, the line endings of my checkout differ) on `main` `f89e410`, together with #242, #244 (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` | 205 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:16 +00:00 (Migrated from github.com)

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


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

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