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

Merged
lambirou merged 1 commit from upstream-pr/3950 into main 2026-12-03 17:25:07 +00:00
lambirou commented 2026-12-03 16:51:21 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-12-03T16:51:21Z.


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, #3676 and #3763.

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.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5630965606 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3950). Originally posted by [lambirou](https://github.com/lambirou) on 2026-12-03T16:51:21Z. --- ## 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, #3676 and #3763. ## 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.
R0Y00 commented 2026-12-03 17:24:06 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T17:24:06Z.

Review: APPROVED


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 #3426. 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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6174899933 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3950#pullrequestreview-6174899933). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T17:24:06Z. **Review:** APPROVED --- 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 #3426. 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.
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!3950
No description provided.