shader: lower 64-bit scalar bit-count and scan ops in gfx2hlsl (Part of #1723) #2065

Merged
tedin7 merged 7 commits from upstream-pr/2072 into main 2026-11-26 00:44:49 +00:00
tedin7 commented 2026-11-25 00:01:14 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T00:01:14Z.


Part of #1723

What this unblocks: shaders that count or scan bits in scalar registers (s_bcnt0/1, s_ff0/ff1 and s_flbit on 64-bit pairs) now translate in gfx2hlsl instead of stopping at Unsupported.

Adds s_bcnt0_i32_b32/b64, s_bcnt1_i32_b32/b64, s_ff0_i32_b64, s_ff1_i32_b64, s_flbit_i32_b64 and s_flbit_i32_i64 to tools/startup/gfx2hlsl.py. The 32-bit s_ff0/s_ff1/s_flbit forms are left to the open PRs that already carry them. The counts set SCC to result != 0; the scans return -1 for no match and leave SCC alone. A 64-bit source must be a register pair up to s105; inline constants, exec/vcc/m0, lane-mask data and modifiers are refused.

Verification:

  • python3 -B tests/startup_gfx2hlsl_s_bit_scan_check.py on this branch: PASS (every opcode against an integer reference over edge values and every single-bit and single-hole 64-bit pattern).
  • Same command with tools/startup/gfx2hlsl.py from origin/main: fails with Unsupported: s_bcnt0_i32_b32.
  • python3 -B tests/startup_gfx2hlsl_bit_alu_check.py, tests/startup_gfx2hlsl_b64_shift_check.py, tests/startup_gfx2hlsl_capture_check.py: pass.
  • Test registered as startup_gfx2hlsl_s_bit_scan in CMakeLists.txt. Not run on Win2025 (Python-only change).

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6593954286 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2072). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T00:01:14Z. --- Part of #1723 What this unblocks: shaders that count or scan bits in scalar registers (s_bcnt0/1, s_ff0/ff1 and s_flbit on 64-bit pairs) now translate in gfx2hlsl instead of stopping at `Unsupported`. Adds s_bcnt0_i32_b32/b64, s_bcnt1_i32_b32/b64, s_ff0_i32_b64, s_ff1_i32_b64, s_flbit_i32_b64 and s_flbit_i32_i64 to `tools/startup/gfx2hlsl.py`. The 32-bit s_ff0/s_ff1/s_flbit forms are left to the open PRs that already carry them. The counts set SCC to result != 0; the scans return -1 for no match and leave SCC alone. A 64-bit source must be a register pair up to s105; inline constants, exec/vcc/m0, lane-mask data and modifiers are refused. Verification: - `python3 -B tests/startup_gfx2hlsl_s_bit_scan_check.py` on this branch: PASS (every opcode against an integer reference over edge values and every single-bit and single-hole 64-bit pattern). - Same command with `tools/startup/gfx2hlsl.py` from `origin/main`: fails with `Unsupported: s_bcnt0_i32_b32`. - `python3 -B tests/startup_gfx2hlsl_bit_alu_check.py`, `tests/startup_gfx2hlsl_b64_shift_check.py`, `tests/startup_gfx2hlsl_capture_check.py`: pass. - Test registered as `startup_gfx2hlsl_s_bit_scan` in CMakeLists.txt. Not run on Win2025 (Python-only change). AI-assisted; commands listed were executed locally.
chatgpt-codex-connector[bot commented 2026-11-25 01:01:29 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T00:06:02Z.

Review: COMMENTED


💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a3184b26ad

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6049479044 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2072#pullrequestreview-6049479044). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T00:06:02Z. **Review:** COMMENTED --- <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `a3184b26ad` <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". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". </details>
tedin7 commented 2026-11-25 01:01:29 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T00:59:44Z.

Review: COMMENTED


No description provided.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6049930905 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2072#pullrequestreview-6049930905). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T00:59:44Z. **Review:** COMMENTED --- _No description provided._
chatgpt-codex-connector[bot commented 2026-11-25 01:02:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T00:01:24Z.


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-25T00:06:04.478000Z a3184b2 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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7148051241 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2072#issuecomment-7148051241). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T00:01:24Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"a3184b26ada0db51013344dadd9c59bdae3bf56c","has_any_findings":true,"has_unresolved_findings":true,"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-25T00:06:04.478000Z">2026-11-25T00:06:04.478000Z</relative-time> | `a3184b2` | 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>
chatgpt-codex-connector[bot commented 2026-11-25 01:02:14 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T00:06:02Z.

Code review location: CMakeLists.txt; line 2328

@@ -2323,6 +2323,9 @@ if(EXISTS "${INTAKE_PYTHON}")
             "$<TARGET_FILE:offscreen_check>" ${adapter} $<$<BOOL:${STARTUP_FXC}>:${STARTUP_FXC}>)
         set_tests_properties(startup_flat_param_${adapter} PROPERTIES TIMEOUT 120 SKIP_RETURN_CODE 77)
     endforeach()
+    # s_bcnt0/1_i32_b32/b64, s_ff0/ff1_i32_b64 and s_flbit_i32_b64/i64 against an integer reference (#1723).
+    add_test(NAME startup_gfx2hlsl_s_bit_scan COMMAND "${INTAKE_PYTHON}" -B
+        "${CMAKE_SOURCE_DIR}/tests/startup_gfx2hlsl_s_bit_scan_check.py")

P1 Badge Document the new startup scalar-bit capability

The startup translator now accepts eight scalar count/scan forms, but this commit updates neither README.md nor docs/experiments.md. The existing scalar-bit experiment notes cover other translators, so they do not describe these handlers' register-only/no-lane-mask restrictions or the new reproduction test. Root AGENTS.md explicitly requires a documentation update when a public capability changes; add an experiment entry with the supported scope, python3 -B tests/startup_gfx2hlsl_s_bit_scan_check.py, and the CPU-only validation boundary.

AGENTS.md reference: AGENTS.md:L211-L212

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4688346401 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2072#discussion_r4688346401). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T00:06:02Z. **Code review location:** `CMakeLists.txt`; line 2328 ~~~~diff @@ -2323,6 +2323,9 @@ if(EXISTS "${INTAKE_PYTHON}") "$<TARGET_FILE:offscreen_check>" ${adapter} $<$<BOOL:${STARTUP_FXC}>:${STARTUP_FXC}>) set_tests_properties(startup_flat_param_${adapter} PROPERTIES TIMEOUT 120 SKIP_RETURN_CODE 77) endforeach() + # s_bcnt0/1_i32_b32/b64, s_ff0/ff1_i32_b64 and s_flbit_i32_b64/i64 against an integer reference (#1723). + add_test(NAME startup_gfx2hlsl_s_bit_scan COMMAND "${INTAKE_PYTHON}" -B + "${CMAKE_SOURCE_DIR}/tests/startup_gfx2hlsl_s_bit_scan_check.py") ~~~~ --- **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Document the new startup scalar-bit capability** The startup translator now accepts eight scalar count/scan forms, but this commit updates neither `README.md` nor `docs/experiments.md`. The existing scalar-bit experiment notes cover other translators, so they do not describe these handlers' register-only/no-lane-mask restrictions or the new reproduction test. Root `AGENTS.md` explicitly requires a documentation update when a public capability changes; add an experiment entry with the supported scope, `python3 -B tests/startup_gfx2hlsl_s_bit_scan_check.py`, and the CPU-only validation boundary. AGENTS.md reference: [AGENTS.md:L211-L212](https://github.com/R0Y00/Xbox2Windows/blob/a3184b26ada0db51013344dadd9c59bdae3bf56c/AGENTS.md#L211-L212) Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
tedin7 commented 2026-11-25 01:02:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T00:59:44Z.

Code review location: CMakeLists.txt; line 2328

@@ -2323,6 +2323,9 @@ if(EXISTS "${INTAKE_PYTHON}")
             "$<TARGET_FILE:offscreen_check>" ${adapter} $<$<BOOL:${STARTUP_FXC}>:${STARTUP_FXC}>)
         set_tests_properties(startup_flat_param_${adapter} PROPERTIES TIMEOUT 120 SKIP_RETURN_CODE 77)
     endforeach()
+    # s_bcnt0/1_i32_b32/b64, s_ff0/ff1_i32_b64 and s_flbit_i32_b64/i64 against an integer reference (#1723).
+    add_test(NAME startup_gfx2hlsl_s_bit_scan COMMAND "${INTAKE_PYTHON}" -B
+        "${CMAKE_SOURCE_DIR}/tests/startup_gfx2hlsl_s_bit_scan_check.py")

Added an experiment entry in docs/experiments.md ("Startup scalar bit counts and scans") in 720cd5e1: supported scope, register-only/no-lane-mask limits, the reproduction command python3 -B tests/startup_gfx2hlsl_s_bit_scan_check.py, and the CPU-only validation boundary (no WARP readback yet). Branch rebased on origin/main; push pending.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4688747222 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2072#discussion_r4688747222). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T00:59:44Z. **Code review location:** `CMakeLists.txt`; line 2328 ~~~~diff @@ -2323,6 +2323,9 @@ if(EXISTS "${INTAKE_PYTHON}") "$<TARGET_FILE:offscreen_check>" ${adapter} $<$<BOOL:${STARTUP_FXC}>:${STARTUP_FXC}>) set_tests_properties(startup_flat_param_${adapter} PROPERTIES TIMEOUT 120 SKIP_RETURN_CODE 77) endforeach() + # s_bcnt0/1_i32_b32/b64, s_ff0/ff1_i32_b64 and s_flbit_i32_b64/i64 against an integer reference (#1723). + add_test(NAME startup_gfx2hlsl_s_bit_scan COMMAND "${INTAKE_PYTHON}" -B + "${CMAKE_SOURCE_DIR}/tests/startup_gfx2hlsl_s_bit_scan_check.py") ~~~~ --- Added an experiment entry in `docs/experiments.md` ("Startup scalar bit counts and scans") in 720cd5e1: supported scope, register-only/no-lane-mask limits, the reproduction command `python3 -B tests/startup_gfx2hlsl_s_bit_scan_check.py`, and the CPU-only validation boundary (no WARP readback yet). Branch rebased on origin/main; push pending. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-25 11:02:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T11:01:47Z.

Code review location: CMakeLists.txt; line 2328

@@ -2323,6 +2323,9 @@ if(EXISTS "${INTAKE_PYTHON}")
             "$<TARGET_FILE:offscreen_check>" ${adapter} $<$<BOOL:${STARTUP_FXC}>:${STARTUP_FXC}>)
         set_tests_properties(startup_flat_param_${adapter} PROPERTIES TIMEOUT 120 SKIP_RETURN_CODE 77)
     endforeach()
+    # s_bcnt0/1_i32_b32/b64, s_ff0/ff1_i32_b64 and s_flbit_i32_b64/i64 against an integer reference (#1723).
+    add_test(NAME startup_gfx2hlsl_s_bit_scan COMMAND "${INTAKE_PYTHON}" -B
+        "${CMAKE_SOURCE_DIR}/tests/startup_gfx2hlsl_s_bit_scan_check.py")

Re-checked on current head 37865d85: the scalar bit-count and scan capability is documented in docs/experiments.md. Resolving. AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review-comment:4693921478 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2072#discussion_r4693921478). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T11:01:47Z. **Code review location:** `CMakeLists.txt`; line 2328 ~~~~diff @@ -2323,6 +2323,9 @@ if(EXISTS "${INTAKE_PYTHON}") "$<TARGET_FILE:offscreen_check>" ${adapter} $<$<BOOL:${STARTUP_FXC}>:${STARTUP_FXC}>) set_tests_properties(startup_flat_param_${adapter} PROPERTIES TIMEOUT 120 SKIP_RETURN_CODE 77) endforeach() + # s_bcnt0/1_i32_b32/b64, s_ff0/ff1_i32_b64 and s_flbit_i32_b64/i64 against an integer reference (#1723). + add_test(NAME startup_gfx2hlsl_s_bit_scan COMMAND "${INTAKE_PYTHON}" -B + "${CMAKE_SOURCE_DIR}/tests/startup_gfx2hlsl_s_bit_scan_check.py") ~~~~ --- Re-checked on current head 37865d85: the scalar bit-count and scan capability is documented in docs/experiments.md. Resolving. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-25 12:01:30 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T11:01:47Z.

Review: COMMENTED


No description provided.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6056371111 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2072#pullrequestreview-6056371111). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T11:01:47Z. **Review:** COMMENTED --- _No description provided._
upstream-sync closed this pull request 2026-11-25 14:04:35 +00:00
tedin7 commented 2026-11-25 14:05:14 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T13:52:00Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7164404444 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2072#issuecomment-7164404444). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T13:52:00Z. --- 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.
upstream-sync reopened this pull request 2026-11-26 00:00:40 +00:00
R0Y00 commented 2026-11-26 00:00:41 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T23:51:52Z.

Review: CHANGES_REQUESTED


Windows Release at 8bb32249, ctest --preset release --no-tests=error -j 1 -R '^startup_gfx2hlsl_s_bit_scan($|_)' -V, passed the host test but failed both the WARP and RTX 4060 Laptop draws before reaching DXC. On the first FXC s_bcnt0_i32_b32 case the expected words are 00000020,00000000,0000001f,00000013; both adapters read four zeros with the debug layer enabled and no warnings. The fixture currently exports these small integers as subnormal float bit patterns. Please encode the scalar result using a transport that preserves all its bits through the existing float MRT, or use an integer readback, then rerun both compilers on both backends. Include a wrong-count control that trips the readback.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6066637384 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2072#pullrequestreview-6066637384). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T23:51:52Z. **Review:** CHANGES_REQUESTED --- Windows Release at `8bb32249`, `ctest --preset release --no-tests=error -j 1 -R '^startup_gfx2hlsl_s_bit_scan($|_)' -V`, passed the host test but failed both the WARP and RTX 4060 Laptop draws before reaching DXC. On the first FXC `s_bcnt0_i32_b32` case the expected words are `00000020,00000000,0000001f,00000013`; both adapters read four zeros with the debug layer enabled and no warnings. The fixture currently exports these small integers as subnormal float bit patterns. Please encode the scalar result using a transport that preserves all its bits through the existing float MRT, or use an integer readback, then rerun both compilers on both backends. Include a wrong-count control that trips the readback.
upstream-sync closed this pull request 2026-11-26 01:01:47 +00:00
R0Y00 commented 2026-11-26 01:01:47 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T00:40:07Z.

Review: APPROVED


The previous head still produced zeros on both adapters. At 73f69a60, the source-built draw XORs each bit result with 0x3f000000 before the float render target. The transformation keeps every expected word finite and preserves a distinct bit pattern for each result. Windows Release passed 3/3 with no skips (ctest --preset release --no-tests=error -j 1 -R '^startup_gfx2hlsl_s_bit_scan($|_)' -V). Both FXC and DXC matched on WARP and RTX 4060 Laptop, debug layer enabled. The wrong-count oracle failed by the named readback mismatch on both compilers and both adapters. The integer host tests still cover the SCC behavior.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6066991499 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2072#pullrequestreview-6066991499). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T00:40:07Z. **Review:** APPROVED --- The previous head still produced zeros on both adapters. At `73f69a60`, the source-built draw XORs each bit result with `0x3f000000` before the float render target. The transformation keeps every expected word finite and preserves a distinct bit pattern for each result. Windows Release passed 3/3 with no skips (`ctest --preset release --no-tests=error -j 1 -R '^startup_gfx2hlsl_s_bit_scan($|_)' -V`). Both FXC and DXC matched on WARP and RTX 4060 Laptop, debug layer enabled. The wrong-count oracle failed by the named readback mismatch on both compilers and both adapters. The integer host tests still cover the SCC behavior.
tedin7 commented 2026-11-26 02:05:09 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T01:04:06Z.


@MasterDomino: #2072 is ready for review/merge at head 73f69a60 (73f69a6042b70b975047f4c80c83c063be22da7c).

What changed since the last head:

  • Merged current main twice (merge commits, no force-push; the only conflict was a keep-both line in the Linux check list).
  • Added a real D3D12 WARP readback: startup_gfx2hlsl_s_bit_scan_warp / _hardware run all eight forms (s_bcnt0/1 b32/b64, s_ff0/ff1 b64, s_flbit b64/i64) as a pixel stage and compare the read-back words with the integer reference (FXC 5_1 and DXC 6_0), with a wrong-expectation control that must fail.
  • The check is listed in the Linux CI Python list; the docs describe the draw mode and that odd SGPR pairs are refused.
  • Head 73f69a60 also carries the float-render-target carry fix pushed by R0Y00; the receipt below is on that exact head.

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit 73f69a6042b70b975047f4c80c83c063be22da7c:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_buffer_format_word3_check -- -j 2): 1.16s (configure 2.04s)
    • Test (ctest --preset dev -R '^startup_gfx2hlsl_s_bit_scan(_warp)?$' --parallel 6 --no-tests=error --output-on-failure): 2/2 passed (7.32s: startup_gfx2hlsl_s_bit_scan 0.30s, startup_gfx2hlsl_s_bit_scan_warp 7.10s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_buffer_format_word3_check -- -j 2): 7.33s (configure 2.25s)
    • Test (ctest --preset release -R '^startup_gfx2hlsl_s_bit_scan(_warp)?$' --parallel 6 --no-tests=error --output-on-failure): 2/2 passed (5.81s: startup_gfx2hlsl_s_bit_scan 0.14s, startup_gfx2hlsl_s_bit_scan_warp 5.69s)
  • Windows Python checks: tests/mesh_heap_sampler_check.py ok (0.6s), tests/startup_buffer_address_check.py ok (0.4s), tests/startup_buffer_format_word3_table_check.py ok (0.1s), tests/startup_compute_request_offline_check.py ok (0.4s), tests/startup_compute_store_format_xyzw_check.py ok (0.2s), tests/startup_compute_translate_check.py ok (0.2s), tests/startup_flat_param_check.py ok (0.1s), tests/startup_gfx2hlsl_add_sub_co_check.py ok (0.1s), tests/startup_gfx2hlsl_add_sub_co_ci_check.py ok (0.1s), tests/startup_gfx2hlsl_bit_alu_check.py ok (0.6s), tests/startup_gfx2hlsl_capture_check.py ok (0.9s), tests/startup_gfx2hlsl_cmp16_check.py ok (0.2s), tests/startup_gfx2hlsl_compare_dst_check.py ok (0.1s), tests/startup_gfx2hlsl_compute_check.py ok (0.3s), tests/startup_gfx2hlsl_cselect_mask_check.py ok (0.1s), tests/startup_gfx2hlsl_cvt_alu_check.py ok (0.2s), tests/startup_gfx2hlsl_cvt_off_f32_i4_check.py ok (0.2s), tests/startup_gfx2hlsl_cvt_pk_int16_check.py ok (0.2s), tests/startup_gfx2hlsl_f32_lg_check.py ok (1.0s), tests/startup_gfx2hlsl_f32_nan_check.py ok (4.0s), tests/startup_gfx2hlsl_fma_mix_check.py ok (0.1s), tests/startup_gfx2hlsl_getpc_refusal_check.py ok (0.1s), tests/startup_gfx2hlsl_handler_arity_check.py ok (0.1s), tests/startup_gfx2hlsl_image_arity_check.py ok (0.1s), tests/startup_gfx2hlsl_image_get_lod_check.py ok (0.1s), tests/startup_gfx2hlsl_int_med3_check.py ok (0.1s), tests/startup_gfx2hlsl_interp_p2_hi_check.py ok (0.2s), tests/startup_gfx2hlsl_join_symbols_check.py ok (0.2s), tests/startup_gfx2hlsl_loop_constants_check.py ok (0.1s), tests/startup_gfx2hlsl_mask_data_check.py ok (0.1s), tests/startup_gfx2hlsl_mask_overwrite_check.py ok (0.1s), tests/startup_gfx2hlsl_operand_count_check.py ok (0.2s), tests/startup_gfx2hlsl_pack_absdiff_check.py ok (2.0s), tests/startup_gfx2hlsl_pack_b32_f16_check.py ok (0.1s), tests/startup_gfx2hlsl_readfirstlane_recompute_check.py ok (0.1s), tests/startup_gfx2hlsl_readfirstlane_uniform_check.py ok (0.1s), tests/startup_gfx2hlsl_refusals_check.py ok (0.5s), tests/startup_gfx2hlsl_root_check.py ok (0.6s), tests/startup_gfx2hlsl_s_bitset_check.py ok (0.1s), tests/startup_gfx2hlsl_sad_check.py ok (0.3s), tests/startup_gfx2hlsl_saveexec_same_reg_check.py ok (0.1s), tests/startup_gfx2hlsl_scalar_arity_check.py ok (0.2s), tests/startup_gfx2hlsl_scalar_brev_fold_check.py ok (0.1s), tests/startup_gfx2hlsl_scalar_m0_check.py ok (0.1s), tests/startup_gfx2hlsl_scalar_table_arity_check.py ok (0.2s), tests/startup_gfx2hlsl_sdwa_cvt_check.py ok (0.2s), tests/startup_gfx2hlsl_sgpr_spill_check.py ok (0.1s), tests/startup_gfx2hlsl_shift64_check.py ok (0.2s), tests/startup_gfx2hlsl_sload_const_offset_check.py ok (0.1s), tests/startup_gfx2hlsl_smem_offset_check.py ok (0.1s), tests/startup_gfx2hlsl_sop2_complement_check.py ok (4.6s), tests/startup_gfx2hlsl_sopk_accum_check.py ok (0.8s), tests/startup_gfx2hlsl_sopk_signext_check.py ok (0.1s), tests/startup_gfx2hlsl_swap_check.py ok (0.2s), tests/startup_gfx2hlsl_vopc_sdwa_check.py ok (3.6s), tests/startup_gfx2hlsl_waitcnt_depctr_check.py ok (0.1s), tests/startup_gfx2hlsl_watch_check.py ok (2.4s), tests/startup_image_2d_array_check.py ok (0.1s), tests/startup_image_3d_check.py ok (0.1s), tests/startup_image_gather_lz_check.py ok (0.5s), tests/startup_image_load_d16_check.py ok (0.8s), tests/startup_image_sample_a16_check.py ok (0.2s), tests/startup_image_sample_b_check.py ok (0.2s), tests/startup_image_sample_c_check.py ok (0.2s), tests/startup_image_sample_l_check.py ok (0.1s), tests/startup_image_sample_lod_check.py ok (0.5s), tests/startup_inline_sampler_check.py ok (0.1s), tests/startup_mesh57_loop_refusal_check.py ok (0.1s), tests/startup_mesh57_skeleton_check.py ok (0.4s), tests/startup_run_ps1_check.py ok (11.3s), tests/startup_run_sh_check.py skipped (0.1s), tests/startup_sampler_heap_check.py ok (0.1s), tests/startup_shader_cache_rekey_check.py ok (2.1s), tests/startup_smem_address_check.py ok (0.1s), tests/startup_stream_fetch_check.py ok (0.2s), tests/startup_stream_interface_check.py ok (0.2s), tests/startup_translator_check.py ok (0.4s)
  • sccache: 4/6 hits; wall 70.3s

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7179399490 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2072#issuecomment-7179399490). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T01:04:06Z. --- @MasterDomino: #2072 is ready for review/merge at head 73f69a60 (`73f69a6042b70b975047f4c80c83c063be22da7c`). What changed since the last head: - Merged current `main` twice (merge commits, no force-push; the only conflict was a keep-both line in the Linux check list). - Added a real D3D12 WARP readback: `startup_gfx2hlsl_s_bit_scan_warp` / `_hardware` run all eight forms (s_bcnt0/1 b32/b64, s_ff0/ff1 b64, s_flbit b64/i64) as a pixel stage and compare the read-back words with the integer reference (FXC 5_1 and DXC 6_0), with a wrong-expectation control that must fail. - The check is listed in the Linux CI Python list; the docs describe the draw mode and that odd SGPR pairs are refused. - Head 73f69a60 also carries the float-render-target carry fix pushed by R0Y00; the receipt below is on that exact head. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `73f69a6042b70b975047f4c80c83c063be22da7c`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_buffer_format_word3_check -- -j 2`): `1.16s` (configure `2.04s`) - Test (`ctest --preset dev -R '^startup_gfx2hlsl_s_bit_scan(_warp)?$' --parallel 6 --no-tests=error --output-on-failure`): **2/2 passed** (`7.32s`: `startup_gfx2hlsl_s_bit_scan` `0.30s`, `startup_gfx2hlsl_s_bit_scan_warp` `7.10s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_buffer_format_word3_check -- -j 2`): `7.33s` (configure `2.25s`) - Test (`ctest --preset release -R '^startup_gfx2hlsl_s_bit_scan(_warp)?$' --parallel 6 --no-tests=error --output-on-failure`): **2/2 passed** (`5.81s`: `startup_gfx2hlsl_s_bit_scan` `0.14s`, `startup_gfx2hlsl_s_bit_scan_warp` `5.69s`) - **Windows Python checks**: `tests/mesh_heap_sampler_check.py` ok (`0.6s`), `tests/startup_buffer_address_check.py` ok (`0.4s`), `tests/startup_buffer_format_word3_table_check.py` ok (`0.1s`), `tests/startup_compute_request_offline_check.py` ok (`0.4s`), `tests/startup_compute_store_format_xyzw_check.py` ok (`0.2s`), `tests/startup_compute_translate_check.py` ok (`0.2s`), `tests/startup_flat_param_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_add_sub_co_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_add_sub_co_ci_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_bit_alu_check.py` ok (`0.6s`), `tests/startup_gfx2hlsl_capture_check.py` ok (`0.9s`), `tests/startup_gfx2hlsl_cmp16_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_compare_dst_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_compute_check.py` ok (`0.3s`), `tests/startup_gfx2hlsl_cselect_mask_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_cvt_alu_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_cvt_off_f32_i4_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_cvt_pk_int16_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_f32_lg_check.py` ok (`1.0s`), `tests/startup_gfx2hlsl_f32_nan_check.py` ok (`4.0s`), `tests/startup_gfx2hlsl_fma_mix_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_getpc_refusal_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_handler_arity_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_image_arity_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_image_get_lod_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_int_med3_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_interp_p2_hi_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_join_symbols_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_loop_constants_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_mask_data_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_mask_overwrite_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_operand_count_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_pack_absdiff_check.py` ok (`2.0s`), `tests/startup_gfx2hlsl_pack_b32_f16_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_readfirstlane_recompute_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_readfirstlane_uniform_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_refusals_check.py` ok (`0.5s`), `tests/startup_gfx2hlsl_root_check.py` ok (`0.6s`), `tests/startup_gfx2hlsl_s_bitset_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_sad_check.py` ok (`0.3s`), `tests/startup_gfx2hlsl_saveexec_same_reg_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_scalar_arity_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_scalar_brev_fold_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_scalar_m0_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_scalar_table_arity_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_sdwa_cvt_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_sgpr_spill_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_shift64_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_sload_const_offset_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_smem_offset_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_sop2_complement_check.py` ok (`4.6s`), `tests/startup_gfx2hlsl_sopk_accum_check.py` ok (`0.8s`), `tests/startup_gfx2hlsl_sopk_signext_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_swap_check.py` ok (`0.2s`), `tests/startup_gfx2hlsl_vopc_sdwa_check.py` ok (`3.6s`), `tests/startup_gfx2hlsl_waitcnt_depctr_check.py` ok (`0.1s`), `tests/startup_gfx2hlsl_watch_check.py` ok (`2.4s`), `tests/startup_image_2d_array_check.py` ok (`0.1s`), `tests/startup_image_3d_check.py` ok (`0.1s`), `tests/startup_image_gather_lz_check.py` ok (`0.5s`), `tests/startup_image_load_d16_check.py` ok (`0.8s`), `tests/startup_image_sample_a16_check.py` ok (`0.2s`), `tests/startup_image_sample_b_check.py` ok (`0.2s`), `tests/startup_image_sample_c_check.py` ok (`0.2s`), `tests/startup_image_sample_l_check.py` ok (`0.1s`), `tests/startup_image_sample_lod_check.py` ok (`0.5s`), `tests/startup_inline_sampler_check.py` ok (`0.1s`), `tests/startup_mesh57_loop_refusal_check.py` ok (`0.1s`), `tests/startup_mesh57_skeleton_check.py` ok (`0.4s`), `tests/startup_run_ps1_check.py` ok (`11.3s`), `tests/startup_run_sh_check.py` skipped (`0.1s`), `tests/startup_sampler_heap_check.py` ok (`0.1s`), `tests/startup_shader_cache_rekey_check.py` ok (`2.1s`), `tests/startup_smem_address_check.py` ok (`0.1s`), `tests/startup_stream_fetch_check.py` ok (`0.2s`), `tests/startup_stream_interface_check.py` ok (`0.2s`), `tests/startup_translator_check.py` ok (`0.4s`) - `sccache`: 4/6 hits; wall `70.3s` AI-assisted; commands listed were executed locally.
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!2065
No description provided.