Translate two-table depth-only pixel shaders and verify swapped CBVs #486

Merged
R0Y00 merged 1 commit from upstream-pr/492 into main 2026-11-22 07:23:42 +00:00
R0Y00 commented 2026-11-22 07:14:59 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T07:14:59Z.


Scope

Translate a bounded depth-only PS with two independently bound descriptor tables through the native container entry and LLVM 15. Track the provenance of the descriptor address, the four descriptor words, scalar memory completion and both EXEC-controlled exits. The caller supplies the binding convention.

Verification

  • python3 -B tests/depth_mask_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 passed with the source-built fixture and its binding, branch and wait rejection controls.
  • ctest --preset dev --no-tests=error -R "^depth_mask_draw_" -V passed on hardware and WARP. The positive fixture changes each CB independently and physically swaps both roots. Comparing the swapped draw against the original oracle must fail specifically at the depth readback.
  • The local inventory covered 26,503 records. 354 distinct PS containers from the unresolved dual-buffer cohort share a newly translated instruction stream. All 354 envelopes were individually extracted and translated, then their shared source was separately compiled for each record. Each backend created 354 PSOs and drew 354 times. All 724,992 depth values matched the independent oracle across those 708 draws. The selected entry reads an integer through s8/table+0x480/buffer+0x5f0 and a float through original s9/table+0/buffer+0. On 32×32 controlled inputs the swapped negative differed at 897 samples. Both normal and swapped positive references matched all 1,024 samples.
  • Windows build 26200.9974, RTX 4060 Laptop driver 32.0.16.1656, WARP 10.0.26100.9818, debug layer enabled. Public reproduction requires only source-built inputs.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6539714266 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/492). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-22T07:14:59Z. --- ## Scope Translate a bounded depth-only PS with two independently bound descriptor tables through the native container entry and LLVM 15. Track the provenance of the descriptor address, the four descriptor words, scalar memory completion and both EXEC-controlled exits. The caller supplies the binding convention. ## Verification - `python3 -B tests/depth_mask_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1` passed with the source-built fixture and its binding, branch and wait rejection controls. - `ctest --preset dev --no-tests=error -R "^depth_mask_draw_" -V` passed on hardware and WARP. The positive fixture changes each CB independently and physically swaps both roots. Comparing the swapped draw against the original oracle must fail specifically at the depth readback. - The local inventory covered 26,503 records. 354 distinct PS containers from the unresolved dual-buffer cohort share a newly translated instruction stream. All 354 envelopes were individually extracted and translated, then their shared source was separately compiled for each record. Each backend created 354 PSOs and drew 354 times. All 724,992 depth values matched the independent oracle across those 708 draws. The selected entry reads an integer through s8/table+0x480/buffer+0x5f0 and a float through original s9/table+0/buffer+0. On 32×32 controlled inputs the swapped negative differed at 897 samples. Both normal and swapped positive references matched all 1,024 samples. - Windows build 26200.9974, RTX 4060 Laptop driver 32.0.16.1656, WARP 10.0.26100.9818, debug layer enabled. Public reproduction requires only source-built inputs.
upstream-sync closed this pull request 2026-11-24 06:43:19 +00:00
Jess-Doit commented 2026-11-24 06:48:28 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-22T07:52:13Z.


Independent Windows 10 check of the source-built depth fixture from #492 at a8b130d on main.

  • Windows 10 22H2 build 19045.6456, Debug, MSVC 19.44.35230, Windows SDK 10.0.26100.0, DXC 1.9.2602.17.
  • GTX 1060 6 GB, driver 32.0.15.6094, and in-box WARP 10.0.19041.5794.
cmake --build --preset dev --target offscreen_check
ctest --preset dev --no-tests=error -V -R '^depth_mask_draw_(hardware|warp)$'

Both CTests passed. On each adapter all four positive draws matched 1,024 depth pixels exactly, including the physically swapped CBVs with the swapped reference. The negative comparison of the same swap against the original reference reported 384 mismatches on both adapters. The D3D12 debug layer was enabled and reported zero errors or warnings across all ten draws.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7076170580 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/492#issuecomment-7076170580). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-22T07:52:13Z. --- Independent Windows 10 check of the source-built depth fixture from #492 at `a8b130d` on `main`. - Windows 10 22H2 build 19045.6456, Debug, MSVC 19.44.35230, Windows SDK 10.0.26100.0, DXC 1.9.2602.17. - GTX 1060 6 GB, driver 32.0.15.6094, and in-box WARP 10.0.19041.5794. ```powershell cmake --build --preset dev --target offscreen_check ctest --preset dev --no-tests=error -V -R '^depth_mask_draw_(hardware|warp)$' ``` Both CTests passed. On each adapter all four positive draws matched 1,024 depth pixels exactly, including the physically swapped CBVs with the swapped reference. The negative comparison of the same swap against the original reference reported 384 mismatches on both adapters. The D3D12 debug layer was enabled and reported zero errors or warnings across all ten draws. AI-assisted.
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!486
No description provided.