docs: record the gfx2hlsl bit-operation draws on WARP and an RX 6600 #1746

Merged
Asimmimx merged 1 commit from upstream-pr/1753 into main 2026-11-24 19:50:13 +00:00
Asimmimx commented 2026-11-24 18:08:32 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Asimmimx on 2026-11-24T18:08:32Z.


Refs #1149.

Change

docs/experiments.md, section "Startup translator: per-lane bit operations", said: "The draw mode has not been run on WARP or hardware yet." I ran it on both and replaced the sentence with the result. This is a docs-only change; no code or test changes.

Run

Commit 48d9571d (origin/main when run). Windows 11 26300.9974, DXC 1.8.2502.11, FXC from Windows SDK 10.0.26100, D3D12 debug layer on.

python -B tests/startup_gfx2hlsl_bit_alu_check.py draw <dxc> out/build/dev/offscreen_check.exe warp <fxc>
python -B tests/startup_gfx2hlsl_bit_alu_check.py draw <dxc> out/build/dev/offscreen_check.exe hardware <fxc>
Adapter Driver Draws matched Mutated draws Debug layer
WARP 10.0.26100.9818 34/34 (17 FXC ps_5_1 + 17 DXC ps_6_0) 12/12 read their mutated words 0 errors, 0 warnings
AMD Radeon RX 6600 (RDNA 2) 32.0.21045.29003 34/34 12/12 0 errors, 0 warnings

Both runs exited 0, with no skips. For example, on the RX 6600:

fxc v_bcnt_u32_b32 [('0', '0'), ('ff', '5'), ('ffffffff', 'ffffffff'), ('80000001', '1')]: 00000000,0000000d,0000001f,00000003
fxc v_bcnt_u32_b32 mutation: fails as expected, reads 00000000,00000003,00000021,00000001

Correction to #1703's PR body: there I wrote that this draw gave "46 draws matched and 12 mutated draws failed". The 46 counted the 12 mutation lines as well; the correct figure is 34 draws plus 12 mutated draws, as recorded here.

docs_links_check.py passes.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6588315789 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1753). Originally posted by [Asimmimx](https://github.com/Asimmimx) on 2026-11-24T18:08:32Z. --- Refs #1149. ## Change `docs/experiments.md`, section "Startup translator: per-lane bit operations", said: "The draw mode has not been run on WARP or hardware yet." I ran it on both and replaced the sentence with the result. This is a docs-only change; no code or test changes. ## Run Commit `48d9571d` (`origin/main` when run). Windows 11 26300.9974, DXC 1.8.2502.11, FXC from Windows SDK 10.0.26100, D3D12 debug layer on. ``` python -B tests/startup_gfx2hlsl_bit_alu_check.py draw <dxc> out/build/dev/offscreen_check.exe warp <fxc> python -B tests/startup_gfx2hlsl_bit_alu_check.py draw <dxc> out/build/dev/offscreen_check.exe hardware <fxc> ``` | Adapter | Driver | Draws matched | Mutated draws | Debug layer | |---|---|---|---|---| | WARP | 10.0.26100.9818 | 34/34 (17 FXC `ps_5_1` + 17 DXC `ps_6_0`) | 12/12 read their mutated words | 0 errors, 0 warnings | | AMD Radeon RX 6600 (RDNA 2) | 32.0.21045.29003 | 34/34 | 12/12 | 0 errors, 0 warnings | Both runs exited 0, with no skips. For example, on the RX 6600: ``` fxc v_bcnt_u32_b32 [('0', '0'), ('ff', '5'), ('ffffffff', 'ffffffff'), ('80000001', '1')]: 00000000,0000000d,0000001f,00000003 fxc v_bcnt_u32_b32 mutation: fails as expected, reads 00000000,00000003,00000021,00000001 ``` Correction to #1703's PR body: there I wrote that this draw gave "46 draws matched and 12 mutated draws failed". The 46 counted the 12 mutation lines as well; the correct figure is 34 draws plus 12 mutated draws, as recorded here. `docs_links_check.py` passes. AI-assisted (Claude Code).
tedin7 commented 2026-11-24 19:01:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T18:13:57Z.

Review: APPROVED


Verified docs/experiments.md at 1f9aeec7c05a7671afa60df0b2eb7df61f15431d.

  • Source and counts verified: 48d9571d is an ancestor of origin/main with no changes to tests/startup_gfx2hlsl_bit_alu_check.py or tools/startup/gfx2hlsl.py since. tests/startup_gfx2hlsl_bit_alu_check.py runs 17 draws per compiler (3 + 2 + 3 + 3 + 3 + 3 chunks of 4 across the 6 operations), giving 34 draws total across FXC ps_5_1 and DXC ps_6_0, plus 12 mutated draws (6 operations x 2 compilers) that assert exact mutated readback words. Environment, driver, and adapter details match the PR report and #1703.
  • Local checks executed:
    • git diff --check origin/main...HEAD — clean
    • python3 tests/docs_links_check.py — passed (17 Markdown files, 366 links)
    • python3 tests/bidi_controls_check.py — passed (1302 tracked files)
  • CI (1f9aeec7c05a7671afa60df0b2eb7df61f15431d): Build and test on Windows, Assemble and translate gfx1013 fixtures, and Run platform-independent Python checks on Linux all passed.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6044843897 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1753#pullrequestreview-6044843897). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T18:13:57Z. **Review:** APPROVED --- Verified `docs/experiments.md` at `1f9aeec7c05a7671afa60df0b2eb7df61f15431d`. - **Source and counts verified:** `48d9571d` is an ancestor of `origin/main` with no changes to `tests/startup_gfx2hlsl_bit_alu_check.py` or `tools/startup/gfx2hlsl.py` since. `tests/startup_gfx2hlsl_bit_alu_check.py` runs 17 draws per compiler (`3 + 2 + 3 + 3 + 3 + 3` chunks of 4 across the 6 operations), giving 34 draws total across FXC `ps_5_1` and DXC `ps_6_0`, plus 12 mutated draws (6 operations x 2 compilers) that assert exact mutated readback words. Environment, driver, and adapter details match the PR report and #1703. - **Local checks executed:** - `git diff --check origin/main...HEAD` — clean - `python3 tests/docs_links_check.py` — passed (17 Markdown files, 366 links) - `python3 tests/bidi_controls_check.py` — passed (1302 tracked files) - **CI (`1f9aeec7c05a7671afa60df0b2eb7df61f15431d`):** `Build and test on Windows`, `Assemble and translate gfx1013 fixtures`, and `Run platform-independent Python checks on Linux` all passed. AI-assisted; commands listed were executed locally.
ChazY11 commented 2026-11-24 19:01:41 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T18:37:04Z.


The new sentence is supported; the sentence next to it is now stale

Checked at origin/main = b4c961cd and on the PR branch. The three tests the paragraph names exist, and the controls mode
prints the numbers the paragraph claims:

startup_gfx2hlsl_bit_alu_controls     #364
startup_gfx2hlsl_bit_alu_warp         #365
startup_gfx2hlsl_bit_alu_hardware     #366

$ ctest --preset dev -R '^startup_gfx2hlsl_bit_alu_controls$' -V
v_bfe_i32: 17459 inputs match the reference (e32 and e64 lanes): ok
v_bfe_i32: mutation reads a wrong word (1, (1, 0, 1), 1): ok
v_bcnt_u32_b32: 324 inputs match the reference (e32 and e64 lanes): ok
...

17,459 / 324 and the per-operation mutations are exactly what the paragraph says, so the added claim about the draw mode is
in the same shape as the rest of it.

The stale sentence

The same paragraph contains, unchanged by this PR:

On origin/main the check fails with Unsupported: v_bfe_i32.

That is no longer true — the lowering is on main now:

out/pe-env/Scripts/python.exe -B tests/startup_gfx2hlsl_bit_alu_check.py
modifiers refused: ok
wrong operand count refused: ok
exit 0

So on today's origin/main the check passes. The sentence was accurate while the check sat ahead of the lowering; now it
describes a past state as if it were the current one, and a reader who tries it will think they have a different tree.

Suggested wording, since this PR is already touching the paragraph:

Before this change the check failed with Unsupported: v_bfe_i32.

or, if the intent is a permanent control, "the check loads the translator with the lowering removed and requires that
failure" — which is a stronger claim and is what startup_gfx2hlsl_operand_count does for its own guard.

Verdict

Reviewed the diff. The link between the draw-mode result and the adapters it names is plausible and matches the fixture's
own printout, and nothing in the change weakens the controls. The stale sentence is the only thing I would change, and it
is one line in the text this PR already edits.

Notes

  • AI-assisted review.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7140896466 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1753#issuecomment-7140896466). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T18:37:04Z. --- ## The new sentence is supported; the sentence next to it is now stale Checked at `origin/main` = `b4c961cd` and on the PR branch. The three tests the paragraph names exist, and the controls mode prints the numbers the paragraph claims: ```text startup_gfx2hlsl_bit_alu_controls #364 startup_gfx2hlsl_bit_alu_warp #365 startup_gfx2hlsl_bit_alu_hardware #366 $ ctest --preset dev -R '^startup_gfx2hlsl_bit_alu_controls$' -V v_bfe_i32: 17459 inputs match the reference (e32 and e64 lanes): ok v_bfe_i32: mutation reads a wrong word (1, (1, 0, 1), 1): ok v_bcnt_u32_b32: 324 inputs match the reference (e32 and e64 lanes): ok ... ``` 17,459 / 324 and the per-operation mutations are exactly what the paragraph says, so the added claim about the draw mode is in the same shape as the rest of it. ## The stale sentence The same paragraph contains, unchanged by this PR: > On `origin/main` the check fails with `Unsupported: v_bfe_i32`. That is no longer true — the lowering is on `main` now: ```powershell out/pe-env/Scripts/python.exe -B tests/startup_gfx2hlsl_bit_alu_check.py modifiers refused: ok wrong operand count refused: ok exit 0 ``` So on today's `origin/main` the check **passes**. The sentence was accurate while the check sat ahead of the lowering; now it describes a past state as if it were the current one, and a reader who tries it will think they have a different tree. Suggested wording, since this PR is already touching the paragraph: > Before this change the check failed with `Unsupported: v_bfe_i32`. or, if the intent is a permanent control, "the check loads the translator with the lowering removed and requires that failure" — which is a stronger claim and is what `startup_gfx2hlsl_operand_count` does for its own guard. ## Verdict Reviewed the diff. The link between the draw-mode result and the adapters it names is plausible and matches the fixture's own printout, and nothing in the change weakens the controls. The stale sentence is the only thing I would change, and it is one line in the text this PR already edits. ## Notes - AI-assisted review.
upstream-sync closed this pull request 2026-11-24 20:00:30 +00:00
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
R0Y00/Xbox2Windows!1746
No description provided.