gpu: verify cross-page copy provenance for mapped sections #1003

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

@⁠R0Y00 on GitHub · 2026-11-23 20:42 UTC · original
R0Y00:codex/gpu-page-source-provenance → main · +168 −2 · 3 files · 1 commits · merged 2026-11-23 21:01 UTC

Refs #874. Extends the #986 fixture with a source-side test for a cross-page transfer.

  • Create two distinct pagefile sections and map them in reverse creation order at adjacent CPU addresses. The two section handles also back two real D3D12 buffers through OpenExistingHeapFromFileMapping.
  • Copy the 4 KiB span centered on the CPU page boundary to one DEFAULT buffer and compare all 1,024 readback words with the expected token order and offsets.
  • Write new words through the CPU aliases. Readback without another upload must still match the prior GPU contents. After the second upload the same readback must match the new words.

The test uses Win32 and D3D12 APIs and synthetic data. The separate queue ordering tests from #986 still run.

Local verification

Commit 1d7954f. 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 release '-DCMAKE_CXX_FLAGS_DEBUG=/Z7 /Od /RTC1' '-DCMAKE_C_FLAGS_DEBUG=/Z7 /Od /RTC1'
cmake --build --preset release --target vm_copy_queue_check
ctest --preset release --no-tests=error -R '^vm_(copy_queue|page_provenance)_' -V

The local configure points INTAKE_PYTHON at the existing requirements environment. The workstation uses embedded debug info because its installed PDB manager rejects /Zi.

All four CTests passed without skips. Both adapters had zero mismatches at all three provenance checkpoints. Two temporary /O2 mutants, copying from the original section order and skipping the second upload, each failed with 1,024 of 1,024 words wrong at the expected checkpoint on both adapters and returned 1.

**@⁠R0Y00** on GitHub · 2026-11-23 20:42 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1003) `R0Y00:codex/gpu-page-source-provenance` → `main` · +168 −2 · 3 files · 1 commits · merged 2026-11-23 21:01 UTC Refs #874. Extends the #986 fixture with a source-side test for a cross-page transfer. - Create two distinct pagefile sections and map them in reverse creation order at adjacent CPU addresses. The two section handles also back two real D3D12 buffers through `OpenExistingHeapFromFileMapping`. - Copy the 4 KiB span centered on the CPU page boundary to one DEFAULT buffer and compare all 1,024 readback words with the expected token order and offsets. - Write new words through the CPU aliases. Readback without another upload must still match the prior GPU contents. After the second upload the same readback must match the new words. The test uses Win32 and D3D12 APIs and synthetic data. The separate queue ordering tests from #986 still run. ## Local verification Commit `1d7954f`. 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 release '-DCMAKE_CXX_FLAGS_DEBUG=/Z7 /Od /RTC1' '-DCMAKE_C_FLAGS_DEBUG=/Z7 /Od /RTC1' cmake --build --preset release --target vm_copy_queue_check ctest --preset release --no-tests=error -R '^vm_(copy_queue|page_provenance)_' -V ``` The local configure points `INTAKE_PYTHON` at the existing requirements environment. The workstation uses embedded debug info because its installed PDB manager rejects `/Zi`. All four CTests passed without skips. Both adapters had zero mismatches at all three provenance checkpoints. Two temporary /O2 mutants, copying from the original section order and skipping the second upload, each failed with 1,024 of 1,024 words wrong at the expected checkpoint on both adapters and returned 1.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:34:20 +00:00
github manually merged commit 1d7954ff76 into gh-pr/1003/base 2026-11-26 22:34:22 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.