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

Merged
R0Y00 merged 1 commit from upstream-pr/986 into main 2026-11-23 20:15:02 +00:00
R0Y00 commented 2026-11-23 19:58:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T19:58:23Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6567655115 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/986). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T19:58:23Z. --- 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.
upstream-sync closed this pull request 2026-11-24 06:45:43 +00:00
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!979
No description provided.