shader: lower |vN| abs operand modifier in gfx2hlsl (Part of #1723) #2029

Closed
github-bot wants to merge 4 commits from gh-pr/2029/head into gh-pr/2029/base
Owner

@⁠tedin7 on GitHub · 2026-11-24 23:27 UTC · original
tedin7:x2w-r20-abs-modifier → main · +198 −10 · 4 files · 4 commits · closed without merging

Part of #1723

What this unblocks: Run 20 census #4 (95 pairs).

v_cndmask_b32_e64 with an absolute-value source (|vN|) was refused with operand '|vN|'. The select now clears the sign bit (& 0x7fffffffu) before any negation, so -|vN| is always negative. Abs on an immediate and abs on other integer ops stay refused. The three old tests that pinned the register-abs refusal were removed from startup_gfx2hlsl_cndmask_neg_check.py; the new test covers the behavior.

Verification:

  • python3 -B tests/startup_gfx2hlsl_abs_mod_check.py -> PASS (on origin/main the same test fails with Unsupported: operand '|v30|')
  • python3 -B tests/startup_gfx2hlsl_cndmask_neg_check.py -> PASS
  • python3 -B tests/startup_gfx2hlsl_op_refusals_check.py -> exit 0
  • python3 -B tests/startup_gfx2hlsl_refusals_check.py -> exit 0
  • Not run: a Win2025 build; the change is Python only and registered as startup_gfx2hlsl_abs_mod in CMakeLists.txt.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-24 23:27 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2029) `tedin7:x2w-r20-abs-modifier` → `main` · +198 −10 · 4 files · 4 commits · closed without merging Part of #1723 What this unblocks: Run 20 census #4 (95 pairs). `v_cndmask_b32_e64` with an absolute-value source (`|vN|`) was refused with `operand '|vN|'`. The select now clears the sign bit (`& 0x7fffffffu`) before any negation, so `-|vN|` is always negative. Abs on an immediate and abs on other integer ops stay refused. The three old tests that pinned the register-abs refusal were removed from `startup_gfx2hlsl_cndmask_neg_check.py`; the new test covers the behavior. Verification: - `python3 -B tests/startup_gfx2hlsl_abs_mod_check.py` -> PASS (on origin/main the same test fails with `Unsupported: operand '|v30|'`) - `python3 -B tests/startup_gfx2hlsl_cndmask_neg_check.py` -> PASS - `python3 -B tests/startup_gfx2hlsl_op_refusals_check.py` -> exit 0 - `python3 -B tests/startup_gfx2hlsl_refusals_check.py` -> exit 0 - Not run: a Win2025 build; the change is Python only and registered as `startup_gfx2hlsl_abs_mod` in CMakeLists.txt. AI-assisted; commands listed were executed locally.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 23:50:51 +00:00
github-bot closed this pull request 2026-11-26 23:50:51 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 23:27 UTC · original · edited 2026-11-24 23:31 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T23:31:06.406901Z da72305 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 23:27 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2029#issuecomment-7147420225) · edited 2026-11-24 23:31 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"da72305ac243785cafd50ece0926228b1816b1b9","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-24T23:31:06.406901Z">2026-11-24T23:31:06.406901Z</relative-time> | `da72305` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Author
Owner

@⁠Makto94 on GitHub · 2026-11-25 10:43 UTC · original

First hardware run reported in this thread: startup_gfx2hlsl_abs_mod_hardware passes on head 97450a1a with both FXC and DXC.

.\tools\dev.ps1; ctest --preset dev --no-tests=error -j1 -R '^startup_gfx2hlsl_abs_mod_hardware$' -V

Environment: NVIDIA GeForce RTX 3070 Ti (10de:2482), driver 32.0.16.2101, Windows 11 build 26300.9974, Debug build, fxc 10.0.26100.9457, dxc 1.9.2602.17, D3D12 debug layer enabled, hardware run serial on an idle machine, 0 capability skips (77). The log has 3 fxc lines and 3 dxc lines (2 draw rows and 1 "mutation: fails as expected" row per compiler), and debug_errors=0 debug_warnings=0 on all 6 runs.
Same head, WARP and CPU checks: 100% tests passed, 0 tests failed out of 2 (startup_gfx2hlsl_abs_mod, startup_gfx2hlsl_abs_mod_warp); the WARP test has 3 fxc lines, 3 dxc lines and debug_errors=0 debug_warnings=0 on all 6 runs.

**@⁠Makto94** on GitHub · 2026-11-25 10:43 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2029#issuecomment-7160085893) First hardware run reported in this thread: `startup_gfx2hlsl_abs_mod_hardware` passes on head 97450a1a with both FXC and DXC. ```powershell .\tools\dev.ps1; ctest --preset dev --no-tests=error -j1 -R '^startup_gfx2hlsl_abs_mod_hardware$' -V ``` Environment: NVIDIA GeForce RTX 3070 Ti (`10de:2482`), driver 32.0.16.2101, Windows 11 build 26300.9974, Debug build, fxc 10.0.26100.9457, dxc 1.9.2602.17, D3D12 debug layer enabled, hardware run serial on an idle machine, 0 capability skips (77). The log has 3 `fxc ` lines and 3 `dxc ` lines (2 draw rows and 1 "mutation: fails as expected" row per compiler), and `debug_errors=0 debug_warnings=0` on all 6 runs. Same head, WARP and CPU checks: `100% tests passed, 0 tests failed out of 2` (`startup_gfx2hlsl_abs_mod`, `startup_gfx2hlsl_abs_mod_warp`); the WARP test has 3 `fxc ` lines, 3 `dxc ` lines and `debug_errors=0 debug_warnings=0` on all 6 runs.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 11:54 UTC · original

Thank you @⁠Makto94 for the RTX 3070 Ti run at 97450a1a: startup_gfx2hlsl_abs_mod_hardware passed with FXC and DXC, plus CPU and WARP 2/2. Recorded as extra evidence for this PR.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 11:54 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2029#issuecomment-7161667601) Thank you @⁠Makto94 for the RTX 3070 Ti run at `97450a1a`: `startup_gfx2hlsl_abs_mod_hardware` passed with FXC and DXC, plus CPU and WARP 2/2. Recorded as extra evidence for this PR. AI-assisted; commands listed were executed locally.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 13:51 UTC · original

Closing this PR for now to keep the Windows test queue short. Nothing is wrong with it and the branch stays as it is.

We will reopen it once the queue is clear, re-run the Win2025 WARP checks at its head, and post the result here.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 13:51 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2029#issuecomment-7164397696) Closing this PR for now to keep the Windows test queue short. Nothing is wrong with it and the branch stays as it is. We will reopen it once the queue is clear, re-run the Win2025 WARP checks at its head, and post the result here. AI-assisted; commands listed were executed locally.

Pull request closed

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