shader: lower ds_nop in pixel_aot #853

Manually merged
github merged 2 commits from gh-pr/853/head into gh-pr/853/base 2026-11-26 22:23:35 +00:00
Owner

@⁠stan495 on GitHub · 2026-11-23 13:23 UTC · original
stan495:codex/gfx1030-ds-nop → main · +50 −5 · 4 files · 2 commits · merged 2026-11-23 13:46 UTC

Change

Lower operandless ds_nop in the straight-line pixel profile. Keep the program-end, color-export and immediate DS swizzle wait guards ahead of the new handling. Reuse the gfx1030 wave64 swizzle fixture to exercise the instruction at entry and under whole-quad EXEC.

Verification

Tested 3d84719 based on 34d03c7. With LLVM 15.0.7, the source-built round trip verified the leading eight-byte encoding and decoded both ds_nop instructions. The Python controls matched the HLSL generated with s_nop 0 at the same positions and rejected operands, GDS, an offset, post-export and post-end placements, and a ds_nop inserted before a required wait. Before the change, the new positive control raised Unsupported instruction 0: ds_nop.

On Windows 11 25H2 build 26200.9974 and DXC 1.8.2502.11, both program variants matched all 256 UINT channel words against the CPU oracle on WARP (10.0.26100.9818) and Radeon RX 7900 XTX (32.0.32029.2010). The D3D12 debug layer reported zero errors and warnings. Both backends caught the existing blue-channel mutation at (0, 0), with 0x3e400000 expected and 0x3d800000 observed. CTest passed 3/3 with zero skips. The targeted coverage report recorded 2/123 gfx1030 DS forms, including ds_nop.

.\tools\dev.ps1
$env:XBOX2WINDOWS_ADAPTER = '7900 XTX'
cmake --preset dev
cmake --build --preset dev --target offscreen_check
ctest --preset dev --no-tests=error -R '^(pixel_aot_ds_swizzle_(warp|hardware)|pixel_aot_warp)$' --output-junit "$PWD/out/results.xml" -V
python -B tests/pixel_aot_check.py
python -B tests/form_coverage_check.py
python -B tests/docs_links_check.py
python -B tests/bidi_controls_check.py
python -B tools/form_coverage.py out/results.xml --json out/coverage.json
git diff --check origin/main...HEAD
python3 -B tests/pixel_aot_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1
LLVM_LIB=libLLVM-15.so.1 LLVM_MC=llvm-mc-15 LLVM_OBJCOPY=llvm-objcopy-15 python3 -B tests/rdna2_tools_check.py

The LLVM-enabled disassembler suite passed 72/72. The tests use source-built fixtures and measure desktop translation.

AI-assisted (Codex and DeepSeek Harness).

**@⁠stan495** on GitHub · 2026-11-23 13:23 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/853) `stan495:codex/gfx1030-ds-nop` → `main` · +50 −5 · 4 files · 2 commits · merged 2026-11-23 13:46 UTC ## Change Lower operandless `ds_nop` in the straight-line pixel profile. Keep the program-end, color-export and immediate DS swizzle wait guards ahead of the new handling. Reuse the gfx1030 wave64 swizzle fixture to exercise the instruction at entry and under whole-quad EXEC. ## Verification Tested `3d84719` based on `34d03c7`. With LLVM 15.0.7, the source-built round trip verified the leading eight-byte encoding and decoded both `ds_nop` instructions. The Python controls matched the HLSL generated with `s_nop 0` at the same positions and rejected operands, GDS, an offset, post-export and post-end placements, and a `ds_nop` inserted before a required wait. Before the change, the new positive control raised `Unsupported instruction 0: ds_nop`. On Windows 11 25H2 build 26200.9974 and DXC 1.8.2502.11, both program variants matched all 256 UINT channel words against the CPU oracle on WARP (10.0.26100.9818) and Radeon RX 7900 XTX (32.0.32029.2010). The D3D12 debug layer reported zero errors and warnings. Both backends caught the existing blue-channel mutation at (0, 0), with `0x3e400000` expected and `0x3d800000` observed. CTest passed 3/3 with zero skips. The targeted coverage report recorded 2/123 gfx1030 DS forms, including `ds_nop`. ```powershell .\tools\dev.ps1 $env:XBOX2WINDOWS_ADAPTER = '7900 XTX' cmake --preset dev cmake --build --preset dev --target offscreen_check ctest --preset dev --no-tests=error -R '^(pixel_aot_ds_swizzle_(warp|hardware)|pixel_aot_warp)$' --output-junit "$PWD/out/results.xml" -V python -B tests/pixel_aot_check.py python -B tests/form_coverage_check.py python -B tests/docs_links_check.py python -B tests/bidi_controls_check.py python -B tools/form_coverage.py out/results.xml --json out/coverage.json git diff --check origin/main...HEAD ``` ```sh python3 -B tests/pixel_aot_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 LLVM_LIB=libLLVM-15.so.1 LLVM_MC=llvm-mc-15 LLVM_OBJCOPY=llvm-objcopy-15 python3 -B tests/rdna2_tools_check.py ``` The LLVM-enabled disassembler suite passed 72/72. The tests use source-built fixtures and measure desktop translation. AI-assisted (Codex and DeepSeek Harness).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:23:34 +00:00
github manually merged commit b99e8b58aa into gh-pr/853/base 2026-11-26 22:23:35 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-23 13:34 UTC · original

I refreshed the branch in b99e8b5 after #651 changed the shared LLVM round-trip assertions. The test preserves both the branch offsets and the DS NOP encoding/count checks. On Windows 26200.9974, WARP 10.0.26100.9818 and RTX 4060 Laptop driver 32.0.16.1656 each matched both 256-word variants and caught the blue-channel mutation. The debug layer reported zero errors and warnings. LLVM 15 and form coverage passed. GitHub CI is running.

**@⁠R0Y00** on GitHub · 2026-11-23 13:34 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/853#issuecomment-7102727869) I refreshed the branch in b99e8b5 after #651 changed the shared LLVM round-trip assertions. The test preserves both the branch offsets and the DS NOP encoding/count checks. On Windows 26200.9974, WARP 10.0.26100.9818 and RTX 4060 Laptop driver 32.0.16.1656 each matched both 256-word variants and caught the blue-channel mutation. The debug layer reported zero errors and warnings. LLVM 15 and form coverage passed. GitHub CI is running.
This discussion has been locked. Commenting is limited to contributors.
No description provided.