gpu: verify tile remaps across copy and direct queues #986

Manually merged
github merged 1 commit from gh-pr/986/head into gh-pr/986/base 2026-11-26 22:33:13 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-23 19:58 UTC · original
R0Y00:codex/gpu-copy-queue-tile-order → main · +209 −0 · 3 files · 1 commits · merged 2026-11-23 20:15 UTC

Refs #874. This source-built fixture covers COPY-to-DIRECT fence ordering independently of #968’s configuration and range attachment.

  • Map two 64 KiB tiles on a COPY queue and upload a different pattern to each tile.
  • Read from the original mapping on a DIRECT queue. Order that read before the remap to provide a deterministic stale-data control.
  • Remap the first virtual tile to the second physical tile on the COPY queue, signal its fence, and wait for that value on the DIRECT queue before reading from the same address again. The CPU waits only for the final readback.

The fixture uses stock D3D12 and synthetic data.

Local verification

Commit cd9ff65. Windows 26200.9974, MSVC 19.51, Windows SDK 10.0.26100. RTX 4060 Laptop (32.0.16.1656) and in-box WARP (10.0.26100.9818). The fixture leaves the debug layer disabled.

.\tools\dev.ps1
cmake --preset dev '-DCMAKE_CXX_FLAGS_DEBUG=/Z7 /Od /RTC1' '-DCMAKE_C_FLAGS_DEBUG=/Z7 /Od /RTC1'
cmake --build --preset dev --target vm_copy_queue_check
ctest --preset dev --no-tests=error -R '^vm_copy_queue_' -V

The local configure also points INTAKE_PYTHON at the existing requirements environment and uses /Z7 because this workstation’s installed PDB manager rejects /Zi. Both CTests passed, with no skips. Each matched all 16,384 words before and after the remap. The early read differed from all 16,384 remapped words.

I also built the fixture directly with cl.exe /nologo /std:c++17 /W4 /O2 /EHsc <source> /link d3d12.lib dxgi.lib /out:vm_copy_queue_check.exe and ran it with warp and hardware: both returned 0. A temporary mutation retaining physical tile 0 instead of moving tile 1 caused all 16,384 ordered words to mismatch on both adapters, and each process returned 1.

**@⁠R0Y00** on GitHub · 2026-11-23 19:58 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/986) `R0Y00:codex/gpu-copy-queue-tile-order` → `main` · +209 −0 · 3 files · 1 commits · merged 2026-11-23 20:15 UTC Refs #874. This source-built fixture covers COPY-to-DIRECT fence ordering independently of #968’s configuration and range attachment. - Map two 64 KiB tiles on a COPY queue and upload a different pattern to each tile. - Read from the original mapping on a DIRECT queue. Order that read before the remap to provide a deterministic stale-data control. - Remap the first virtual tile to the second physical tile on the COPY queue, signal its fence, and wait for that value on the DIRECT queue before reading from the same address again. The CPU waits only for the final readback. The fixture uses stock D3D12 and synthetic data. ## Local verification Commit `cd9ff65`. Windows 26200.9974, MSVC 19.51, Windows SDK 10.0.26100. RTX 4060 Laptop (32.0.16.1656) and in-box WARP (10.0.26100.9818). The fixture leaves the debug layer disabled. ```powershell .\tools\dev.ps1 cmake --preset dev '-DCMAKE_CXX_FLAGS_DEBUG=/Z7 /Od /RTC1' '-DCMAKE_C_FLAGS_DEBUG=/Z7 /Od /RTC1' cmake --build --preset dev --target vm_copy_queue_check ctest --preset dev --no-tests=error -R '^vm_copy_queue_' -V ``` The local configure also points `INTAKE_PYTHON` at the existing requirements environment and uses `/Z7` because this workstation’s installed PDB manager rejects `/Zi`. Both CTests passed, with no skips. Each matched all 16,384 words before and after the remap. The early read differed from all 16,384 remapped words. I also built the fixture directly with `cl.exe /nologo /std:c++17 /W4 /O2 /EHsc <source> /link d3d12.lib dxgi.lib /out:vm_copy_queue_check.exe` and ran it with `warp` and `hardware`: both returned 0. A temporary mutation retaining physical tile 0 instead of moving tile 1 caused all 16,384 ordered words to mismatch on both adapters, and each process returned 1.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:33:11 +00:00
github manually merged commit cd9ff65b46 into gh-pr/986/base 2026-11-26 22:33:13 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.