gpu: add GPU-to-CPU visibility reference #3952

Manually merged
github merged 1 commit from github-bot/gh-3950 into gh-pr/3950/base 2026-12-03 17:36:29 +00:00 AGit
Owner

@⁠lambirou on GitHub · 2026-12-03 16:51 UTC · original
lambirou:codex/memory-console-reference → main · +147 −10 · 3 files · 1 commits · merged 2026-12-03 17:25 UTC

Problem

The linear-buffer tests report whether a GPU-written range is visible through the
title alias, but they do not isolate the CPU read before and after the fence the
title observes. That makes it hard to compare the Windows behavior with an
authorized console run or to use the result as the boundary for a later targeted
readback.

Change

Add a bounded --reference mode to the existing production-wrapper fixture. It
runs only the GPU-write/CPU-read cases for share, copy and refusal, before
and after the fence. It checks all 1,024 written words, every neighbouring byte
outside the range, and a GPU readback in the same submission. The latter proves
that the dispatch ran when the title alias remains stale.

Add a title-neutral console procedure for the same synthetic vector. It describes
an out-of-repo GDK harness and keeps its result unmeasured until target, guard
and fence-protocol bytes are recorded. No GDK files enter the repository.

Refs #1914, #3678 and #3765.

Validation

Windows 11, MSVC, dev preset, debug layer off, WARP and AMD Radeon RX 9060 XT:

ctest --preset dev --no-tests=error -R '^gpu_cpu_visibility_reference_' --output-on-failure -j1
ctest --preset dev --no-tests=error -R '^linear_buffer_backing_' --output-on-failure -j1
  • Reference mode: 6/6 passed, 0 skipped.
  • Full linear-buffer family: 30/30 passed, including its negative controls.
  • Markdown links: 285 files and 1,010 links checked.
  • Bidirectional-control scan: 3,090 files checked.

Observed reference results are documented in the new note. The D3D12 debug layer
could not be enabled because it is not installed on the test host.

Limits

  • The console result remains unmeasured.
  • One buffer, one compute dispatch, one queue and one fence observation are covered.
  • Multiple aliases, page reuse, cross-queue cases, explicit cache operations and textures remain outside this slice.
**@⁠lambirou** on GitHub · 2026-12-03 16:51 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3950) `lambirou:codex/memory-console-reference` → `main` · +147 −10 · 3 files · 1 commits · merged 2026-12-03 17:25 UTC ## Problem The linear-buffer tests report whether a GPU-written range is visible through the title alias, but they do not isolate the CPU read before and after the fence the title observes. That makes it hard to compare the Windows behavior with an authorized console run or to use the result as the boundary for a later targeted readback. ## Change Add a bounded `--reference` mode to the existing production-wrapper fixture. It runs only the GPU-write/CPU-read cases for `share`, `copy` and `refusal`, before and after the fence. It checks all 1,024 written words, every neighbouring byte outside the range, and a GPU readback in the same submission. The latter proves that the dispatch ran when the title alias remains stale. Add a title-neutral console procedure for the same synthetic vector. It describes an out-of-repo GDK harness and keeps its result `unmeasured` until target, guard and fence-protocol bytes are recorded. No GDK files enter the repository. Refs #1914, #3678 and #3765. ## Validation Windows 11, MSVC, `dev` preset, debug layer off, WARP and AMD Radeon RX 9060 XT: ```text ctest --preset dev --no-tests=error -R '^gpu_cpu_visibility_reference_' --output-on-failure -j1 ctest --preset dev --no-tests=error -R '^linear_buffer_backing_' --output-on-failure -j1 ``` - Reference mode: 6/6 passed, 0 skipped. - Full linear-buffer family: 30/30 passed, including its negative controls. - Markdown links: 285 files and 1,010 links checked. - Bidirectional-control scan: 3,090 files checked. Observed reference results are documented in the new note. The D3D12 debug layer could not be enabled because it is not installed on the test host. ## Limits - The console result remains unmeasured. - One buffer, one compute dispatch, one queue and one fence observation are covered. - Multiple aliases, page reuse, cross-queue cases, explicit cache operations and textures remain outside this slice.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 16:58:15 +00:00
github-bot changed target branch from main to gh-pr/3950/base 2026-12-03 17:36:22 +00:00
github manually merged commit 72b10c2d85 into gh-pr/3950/base 2026-12-03 17:36:29 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-03 17:24 UTC · original · approved these changes

Independent Windows 11 build 26300 MSVC Debug run on WARP and RTX 4060 Laptop. All six gpu_cpu_visibility_reference cases passed. The full backing family had one RTX copy-mode gate2q failure (35/36 overall): both readers matched 1,024/1,024 B words but the wait count was +0. The same signature predates this PR in #3428. The exact-head targeted retry passed 3/3 and the parent test source passed 5/5 in an isolated comparison. This PR adds a reference branch to the test and does not change runtime code or the gate2q case. The reference comparison checks the staged GPU readback and old or new CPU alias bytes at the fence boundary, preserving neighbouring bytes. Required Windows CI passed.

**@⁠R0Y00** on GitHub · 2026-12-03 17:24 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3950#pullrequestreview-6174899933) · **approved these changes** Independent Windows 11 build 26300 MSVC Debug run on WARP and RTX 4060 Laptop. All six gpu_cpu_visibility_reference cases passed. The full backing family had one RTX copy-mode gate2q failure (35/36 overall): both readers matched 1,024/1,024 B words but the wait count was +0. The same signature predates this PR in #3428. The exact-head targeted retry passed 3/3 and the parent test source passed 5/5 in an isolated comparison. This PR adds a reference branch to the test and does not change runtime code or the gate2q case. The reference comparison checks the staged GPU readback and old or new CPU alias bytes at the fence boundary, preserving neighbouring bytes. Required Windows CI passed.
This discussion has been locked. Commenting is limited to contributors.
No description provided.