shader: map s_bitset1_b32 on a root address high word to the stride-one V# #3702

Merged
lukaslw-lab merged 1 commit from upstream-pr/3702 into main 2026-12-01 08:44:42 +00:00
lukaslw-lab commented 2026-12-01 05:09:21 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-12-01T05:09:21Z.


Change

s_bitset1_b32 <root address high>, 16 sets bit 16 of the high address word, the same bit as the s_or_b32 <high>, 0x10000 that byte_descriptor_field already maps to root_stride_one_high. It now gets the same symbol, so a raw V# built that way reaches the existing stride-one path (word 2 0xffffffff, word 3 0x11014fac). s_bitset1_b32 does not write SCC, so the compute and mesh code generators leave SCC unchanged for it instead of setting it to 1 as for s_or_b32. Any other bit, the low word and s_bitset0_b32 keep unbound numeric SGPR.

This is the first refusal of 24 slot 86 mesh requests on a local capture (#3703); they reach later refusals, listed there. Refs #3641.

Verification

Build release at this branch (Windows 10 19045, MSVC 2022, DXC 1.9.2609):

python -B tests/native_direct_mesh_check.py <compile_dxil.exe> <dxc dir>       -> passed
python -B tests/native_direct_container_check.py <compile_dxil.exe> <dxc dir>  -> passed
python -B tests/docs_links_check.py                                            -> passed
ctest --test-dir out/build/release -R "native_direct|descriptor_scc|native_scalar|mesh|native_.*root|compute_desc"
  -> 217 tests: 106 passed, 86 capability skips (77), 25 failed

The same 25 _hardware tests fail on this host without this change (Windows 10 without the Agility SDK; NVIDIA RTX 3080 Ti, driver 32.0.16.1047, debug layer on).

Controls:

  • Without the source change, both checks fail: unbound numeric SGPR s27 (mesh) and s5 (compute).
  • With the two SCC lines reverted, both SCC assertions fail.

Evidence and follow-up

Source-built words only. The mesh check compiles the s_or_b32 and s_bitset1_b32 forms of the existing root SRV read to byte-identical DXIL and checks that a compare before the stride write reaches an s_cselect_b32 after it. Bit 15, the low word and s_bitset0_b32 are refused. The compute check covers the same on a compute root descriptor. Note: docs/experiments/native-root-stride-bitset1.md.

Follow-ups in #3703: mesh scalar loops (design first), v_mad_f32, idxen offen raw loads.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.

AI-assisted.

🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5579475857 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3702). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-12-01T05:09:21Z. --- ## Change `s_bitset1_b32 <root address high>, 16` sets bit 16 of the high address word, the same bit as the `s_or_b32 <high>, 0x10000` that `byte_descriptor_field` already maps to `root_stride_one_high`. It now gets the same symbol, so a raw V# built that way reaches the existing stride-one path (word 2 `0xffffffff`, word 3 `0x11014fac`). `s_bitset1_b32` does not write SCC, so the compute and mesh code generators leave SCC unchanged for it instead of setting it to 1 as for `s_or_b32`. Any other bit, the low word and `s_bitset0_b32` keep `unbound numeric SGPR`. This is the first refusal of 24 slot 86 mesh requests on a local capture (#3703); they reach later refusals, listed there. Refs #3641. ## Verification Build `release` at this branch (Windows 10 19045, MSVC 2022, DXC 1.9.2609): ``` python -B tests/native_direct_mesh_check.py <compile_dxil.exe> <dxc dir> -> passed python -B tests/native_direct_container_check.py <compile_dxil.exe> <dxc dir> -> passed python -B tests/docs_links_check.py -> passed ctest --test-dir out/build/release -R "native_direct|descriptor_scc|native_scalar|mesh|native_.*root|compute_desc" -> 217 tests: 106 passed, 86 capability skips (77), 25 failed ``` The same 25 `_hardware` tests fail on this host without this change (Windows 10 without the Agility SDK; NVIDIA RTX 3080 Ti, driver 32.0.16.1047, debug layer on). Controls: - Without the source change, both checks fail: `unbound numeric SGPR s27` (mesh) and `s5` (compute). - With the two SCC lines reverted, both SCC assertions fail. ## Evidence and follow-up Source-built words only. The mesh check compiles the `s_or_b32` and `s_bitset1_b32` forms of the existing root SRV read to byte-identical DXIL and checks that a compare before the stride write reaches an `s_cselect_b32` after it. Bit 15, the low word and `s_bitset0_b32` are refused. The compute check covers the same on a compute root descriptor. Note: `docs/experiments/native-root-stride-bitset1.md`. Follow-ups in #3703: mesh scalar loops (design first), `v_mad_f32`, `idxen offen` raw loads. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets. AI-assisted. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
R0Y00 commented 2026-12-01 08:43:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-01T08:43:23Z.

Review: APPROVED


Reviewed stride-one root descriptor recognition and SCC preservation. The integrated native_direct_container and native_direct_mesh fixtures passed, including the positive and refusal controls.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6127738869 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3702#pullrequestreview-6127738869). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-01T08:43:23Z. **Review:** APPROVED --- Reviewed stride-one root descriptor recognition and SCC preservation. The integrated native_direct_container and native_direct_mesh fixtures passed, including the positive and refusal controls.
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!3702
No description provided.