runtime: attribute GPU-to-CPU copy refusals #3953

Open
lambirou wants to merge 1 commit from upstream-pr/3953 into main
lambirou commented 2026-12-03 16:56:40 +00:00 (Migrated from github.com)

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


Problem

The #3716 GPU-to-CPU census reports one dest_title_refusals total whenever a
refused copy or resolve has a destination with title memory. A refusal caused by
the source, such as CopyBufferRegion ... title_backed_source, is counted by the
same total. A historical run reported 299,486 refusals while every detailed
sample was a source refusal, so the total cannot identify what needs fixing.

Change

  • Add a fixed operation-by-cause matrix for the five copy/query operations and
    every refusal cause they can return.
  • Record title_backed_source separately from
    destination_has_title_memory, while preserving the existing total and query
    subset semantics.
  • Emit non-zero buckets in the five-second heartbeat.
  • Add x2w_d3d12_gpu_to_cpu_refusal_snapshot so fixtures can inspect the matrix
    without changing the layout of the existing snapshot export.
  • Exercise all five operations and add a negative control that fails if a
    source refusal is attributed to destination title memory.

This changes diagnostics only. Map, copy forwarding and refusal behavior remain
unchanged.

Refs #3676.

Validation

Windows 11, MSVC 19.44 Debug, debug layer unavailable, WARP and AMD Radeon RX
9060 XT (32.0.32029.2010):

ctest --preset dev --no-tests=error -R '^startup_gpu_to_cpu_' --output-on-failure -j1
ctest --preset dev --no-tests=error -R '^(startup_list_copy|startup_list_queries)' --output-on-failure -j1
python -B tests/standin_exports_check.py
  • GPU-to-CPU suite: 16/16 passed, including both negative controls.
  • Copy/query families: 17/17 passed.
  • Stand-in exports: 515 cases on current main, 6/6 mutations killed.
  • Markdown links: 286 files and 1,011 links checked.

The historical 299,486-refusal run has not been replayed with this build. Known
detail lines were source refusals, but the full breakdown needs a new heartbeat.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5631054781 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3953). Originally posted by [lambirou](https://github.com/lambirou) on 2026-12-03T16:56:40Z. --- ## Problem The #3716 GPU-to-CPU census reports one `dest_title_refusals` total whenever a refused copy or resolve has a destination with title memory. A refusal caused by the source, such as `CopyBufferRegion ... title_backed_source`, is counted by the same total. A historical run reported 299,486 refusals while every detailed sample was a source refusal, so the total cannot identify what needs fixing. ## Change - Add a fixed operation-by-cause matrix for the five copy/query operations and every refusal cause they can return. - Record `title_backed_source` separately from `destination_has_title_memory`, while preserving the existing total and query subset semantics. - Emit non-zero buckets in the five-second heartbeat. - Add `x2w_d3d12_gpu_to_cpu_refusal_snapshot` so fixtures can inspect the matrix without changing the layout of the existing snapshot export. - Exercise all five operations and add a negative control that fails if a source refusal is attributed to destination title memory. This changes diagnostics only. `Map`, copy forwarding and refusal behavior remain unchanged. Refs #3676. ## Validation Windows 11, MSVC 19.44 Debug, debug layer unavailable, WARP and AMD Radeon RX 9060 XT (`32.0.32029.2010`): ```text ctest --preset dev --no-tests=error -R '^startup_gpu_to_cpu_' --output-on-failure -j1 ctest --preset dev --no-tests=error -R '^(startup_list_copy|startup_list_queries)' --output-on-failure -j1 python -B tests/standin_exports_check.py ``` - GPU-to-CPU suite: 16/16 passed, including both negative controls. - Copy/query families: 17/17 passed. - Stand-in exports: 515 cases on current `main`, 6/6 mutations killed. - Markdown links: 286 files and 1,011 links checked. The historical 299,486-refusal run has not been replayed with this build. Known detail lines were source refusals, but the full breakdown needs a new heartbeat.
lambirou commented 2026-12-03 17:40:12 +00:00 (Migrated from github.com)

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


Rebased onto the current main and resolved the refusal-attribution overlap in commit a7ee7c444. Revalidated locally: 16/16 GPU-to-CPU, 17/17 copy/query and 515 stand-in export cases with 6/6 mutations killed. GitHub checks are running on the new head; ready for review when they pass.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7386876876 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3953#issuecomment-7386876876). Originally posted by [lambirou](https://github.com/lambirou) on 2026-12-03T17:40:12Z. --- Rebased onto the current `main` and resolved the refusal-attribution overlap in commit `a7ee7c444`. Revalidated locally: 16/16 GPU-to-CPU, 17/17 copy/query and 515 stand-in export cases with 6/6 mutations killed. GitHub checks are running on the new head; ready for review when they pass.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3953:upstream-pr/3953'
git switch 'upstream-pr/3953'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3953'
git switch 'upstream-pr/3953'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3953'
git switch 'upstream-pr/3953'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3953'
git switch 'main'
git merge --squash 'upstream-pr/3953'
git switch 'main'
git merge --ff-only 'upstream-pr/3953'
git switch 'main'
git merge 'upstream-pr/3953'
git push origin 'main'
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!3953
No description provided.