d3d12: use final pixel footprints for mesh table mirrors #518

Merged
MathiewMay merged 5 commits from upstream-pr/518 into main 2026-11-29 21:51:41 +00:00
MathiewMay commented 2026-11-29 18:58:53 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by MathiewMay on 2026-11-29T18:58:53Z.


Dependency and summary

Depends on #512's consumption-time descriptor materialization. This branch is stacked on its 81d7efab prerequisite; the pixel-only commits are 83eabde9, 97d56646 and 0583cc65. Target remains main.

Refine a mesh-rewritten table's pixel-only mirrors from the PSV of the final portable pixel stage actually sent to the driver, after stage selection/redirection. Original console resource metadata need not describe that translation. A resource-free final pixel stage consumes no mirror descriptors; sparse accesses materialize only their actual physical intervals, not the poisoned holes between them. Existing non-mirror footprints are preserved. Unknown/malformed stage, resource or root metadata remains conservative.

Regression and validation

The independent mesh-descriptor-empty and mesh-descriptor-sparse homebrew scenarios poison unused mirror records and compare every output pixel with a reference. The sparse fixture deliberately lacks the user-data corroboration needed to trust its original console register names: its final portable PSV, not its original PSV, must determine the access. Null pipelines and missing worker translations are refused.

  • Test-only 97d56646, using the exact #512 native prerequisite: both new GPU output comparisons fail, while all nine other raster gates pass. This is not a compilation/setup failure.
  • Complete isolated python tuxbox.py check --no-gpu: all seven groups pass; Windows native-test typecheck also passes. Nine new Rust controls cover empty/sparse accesses, array intersections, register spaces, CBVs/UAVs, appended offsets, duplicates and conservative malformed/unknown metadata.
  • Fresh uninstrumented build at 0583cc653747f4a2cf91067c736e77372f39cff4: 11/11 raster gates pass, including both independent poisoned-mirror output comparisons.
  • Strictly matched prerequisite control: replacing only D3D12 with #512's provider makes exactly the two new mirror cases fail reference readback; the other nine raster gates still pass. Guests, fixtures, compiler helpers and every other provider are identical and SHA-checked.
  • Full translator GPU suite: 65/65 groups pass.
  • Full homebrew/Lanes verification: 133/133 checks pass.
  • D3D12 provider regression controls: 22/22 pass.
  • Native D3D12 tests: 418 passed, 1 failed, 8 ignored. The prerequisite is 409 passed, 1 failed, 8 ignored. Both retain the pristine-fd636d09 device::placement::check_pool::tests::check_chunk_runs_xmem_access_only_on_caller_thread failure (left: 128, right: 64); it is disclosed, not counted as passing or changed here.

These results are the exact pixel stack on pinned fd636d09, with prerequisite 81d7efab. The additional all-three run on refreshed main is reported separately below, not counted as this PR's isolated run.

Validation correction: an initial shared compiled target silently supplied the previous scene DLL to a pixel artifact; identical provider hashes and a 0.01-second non-compiling build exposed it. That artifact was retained but rejected as pixel-source evidence. The accepted build uses new per-artifact native/compiler targets, verifies fresh D3D12 compilation and SHA-binds source, compiler helpers, guests and providers. Temporary tracing stays on a separate unpublished diagnostic branch and is not in this PR or the accepted uninstrumented binary.

Commands use placeholders for immutable local artifacts. The GPU wrappers run sequentially in an authenticated hidden/offline display with the stopped fixture prefix; no prefix copies, cache/save replacement, existing-cache cleanup or retail launch:

python tuxbox.py check --no-gpu
cargo check --locked --offline --target x86_64-pc-windows-msvc -p tuxbox-d3d12 --tests
python "$CAMPAIGN/isolated_candidate.py" pixel-v2 --tree "$CLEAN_PIXEL_WORKTREE"
python "$MEASURE/run_latest_verify.py" "$ARTIFACT" "$TARGET_WORK" lanes-raster-tables
python "$MEASURE/run_latest_verify.py" "$MATCHED_PREREQUISITE_D3D12_ARTIFACT" "$RED_WORK" lanes-raster-tables
python "$MEASURE/run_latest_translator.py" "$ARTIFACT" "$TRANSLATOR_WORK"
python "$MEASURE/run_latest_verify.py" "$ARTIFACT" "$VERIFY_WORK"
python "$MEASURE/run_latest_regressions.py" "$ARTIFACT" "$REGRESSION_WORK"
python "$MEASURE/run_windows_reuse.py" --unit tuxbox_d3d12 "$ARTIFACT" "$UNIT_WORK"

GPU/backend: AMD Radeon RX 9070 (1002:7550, RADV GFX1201), Mesa 26.2.7, GE-Proton11-14 on Linux. NVIDIA validation is still missing and required before merge. No title shaders, captures or retail performance claims are included.

Additional all-three integration on refreshed main

A separate combined run of #512, #514 and #518 on 2d6dc33838f66c0784d539567628c07158351115 (private integration 08c5a6bf) used new per-artifact compiled targets. It is not an isolated run of this PR. All 7 code groups, 16 targeted checks, 66 translator groups, 133 homebrew checks and 22 provider controls pass. Swapping only D3D12 back to that clean main gives exactly seven expected descriptor/mirror reference-readback failures, while nine other targeted controls pass.

Native results are 449 passed / 4 failed / 8 ignored, versus pristine refreshed main's 431 passed / 4 failed / 8 ignored. The exact failure sets match; neither native suite is described as passing:

  • device::placement::check_pool::tests::check_chunk_collects_all_changes_and_merges_profile — 128 vs 64.
  • device::placement::check_pool::tests::check_chunk_reuses_cached_runs_and_retries_active_mapping_state — 32 vs 0.
  • device::placement::check_pool::tests::check_chunk_runs_xmem_access_only_on_caller_thread — 128 vs 64.
  • device::placement::guest_read::tests::section_watched_texture_caches_runs_and_invalidates_on_watch_or_mapping_change — 0 vs 1.

The first combined provider-control attempt stopped after one passing case because newer main requires its constant-buffer helper to be prebuilt. Building bash tools/build_frosty_cbv_layer.sh build/frosty-cbv-layer from the frozen sources into new private build output, without replacing a prior helper or changing frozen sources, made a fresh complete 22/22 run pass. The full native scene-capable runner then verified the four-failure baseline match. NVIDIA remains untested.

<!-- greyfinch-sync:brcly/TuxBox:issue:5554015281 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/518). Originally posted by [MathiewMay](https://github.com/MathiewMay) on 2026-11-29T18:58:53Z. --- ## Dependency and summary Depends on #512's consumption-time descriptor materialization. This branch is stacked on its `81d7efab` prerequisite; the pixel-only commits are `83eabde9`, `97d56646` and `0583cc65`. Target remains `main`. Refine a mesh-rewritten table's pixel-only mirrors from the PSV of the **final portable pixel stage actually sent to the driver**, after stage selection/redirection. Original console resource metadata need not describe that translation. A resource-free final pixel stage consumes no mirror descriptors; sparse accesses materialize only their actual physical intervals, not the poisoned holes between them. Existing non-mirror footprints are preserved. Unknown/malformed stage, resource or root metadata remains conservative. ## Regression and validation The independent `mesh-descriptor-empty` and `mesh-descriptor-sparse` homebrew scenarios poison unused mirror records and compare every output pixel with a reference. The sparse fixture deliberately lacks the user-data corroboration needed to trust its original console register names: its final portable PSV, not its original PSV, must determine the access. Null pipelines and missing worker translations are refused. - Test-only `97d56646`, using the exact #512 native prerequisite: **both new GPU output comparisons fail**, while all nine other raster gates pass. This is not a compilation/setup failure. - Complete isolated `python tuxbox.py check --no-gpu`: **all seven groups pass**; Windows native-test typecheck also passes. Nine new Rust controls cover empty/sparse accesses, array intersections, register spaces, CBVs/UAVs, appended offsets, duplicates and conservative malformed/unknown metadata. - Fresh uninstrumented build at `0583cc653747f4a2cf91067c736e77372f39cff4`: **11/11 raster gates pass**, including both independent poisoned-mirror output comparisons. - Strictly matched prerequisite control: replacing **only D3D12** with #512's provider makes **exactly the two new mirror cases fail** reference readback; the other nine raster gates still pass. Guests, fixtures, compiler helpers and every other provider are identical and SHA-checked. - Full translator GPU suite: **65/65 groups pass**. - Full homebrew/Lanes verification: **133/133 checks pass**. - D3D12 provider regression controls: **22/22 pass**. - Native D3D12 tests: **418 passed, 1 failed, 8 ignored**. The prerequisite is **409 passed, 1 failed, 8 ignored**. Both retain the pristine-`fd636d09` `device::placement::check_pool::tests::check_chunk_runs_xmem_access_only_on_caller_thread` failure (`left: 128`, `right: 64`); it is disclosed, not counted as passing or changed here. These results are the exact pixel stack on pinned `fd636d09`, with prerequisite `81d7efab`. The additional all-three run on refreshed main is reported separately below, not counted as this PR's isolated run. Validation correction: an initial shared compiled target silently supplied the previous scene DLL to a pixel artifact; identical provider hashes and a 0.01-second non-compiling build exposed it. That artifact was retained but rejected as pixel-source evidence. The accepted build uses new per-artifact native/compiler targets, verifies fresh D3D12 compilation and SHA-binds source, compiler helpers, guests and providers. Temporary tracing stays on a separate unpublished diagnostic branch and is not in this PR or the accepted uninstrumented binary. Commands use placeholders for immutable local artifacts. The GPU wrappers run sequentially in an authenticated hidden/offline display with the stopped fixture prefix; no prefix copies, cache/save replacement, existing-cache cleanup or retail launch: ```sh python tuxbox.py check --no-gpu cargo check --locked --offline --target x86_64-pc-windows-msvc -p tuxbox-d3d12 --tests python "$CAMPAIGN/isolated_candidate.py" pixel-v2 --tree "$CLEAN_PIXEL_WORKTREE" python "$MEASURE/run_latest_verify.py" "$ARTIFACT" "$TARGET_WORK" lanes-raster-tables python "$MEASURE/run_latest_verify.py" "$MATCHED_PREREQUISITE_D3D12_ARTIFACT" "$RED_WORK" lanes-raster-tables python "$MEASURE/run_latest_translator.py" "$ARTIFACT" "$TRANSLATOR_WORK" python "$MEASURE/run_latest_verify.py" "$ARTIFACT" "$VERIFY_WORK" python "$MEASURE/run_latest_regressions.py" "$ARTIFACT" "$REGRESSION_WORK" python "$MEASURE/run_windows_reuse.py" --unit tuxbox_d3d12 "$ARTIFACT" "$UNIT_WORK" ``` GPU/backend: AMD Radeon RX 9070 (`1002:7550`, RADV GFX1201), Mesa 26.2.7, GE-Proton11-14 on Linux. **NVIDIA validation is still missing and required before merge.** No title shaders, captures or retail performance claims are included. ## Additional all-three integration on refreshed main A separate **combined** run of #512, #514 and #518 on `2d6dc33838f66c0784d539567628c07158351115` (private integration `08c5a6bf`) used new per-artifact compiled targets. It is not an isolated run of this PR. All **7 code groups, 16 targeted checks, 66 translator groups, 133 homebrew checks and 22 provider controls pass**. Swapping only D3D12 back to that clean main gives **exactly seven expected descriptor/mirror reference-readback failures**, while nine other targeted controls pass. Native results are **449 passed / 4 failed / 8 ignored**, versus pristine refreshed main's **431 passed / 4 failed / 8 ignored**. The exact failure sets match; neither native suite is described as passing: - `device::placement::check_pool::tests::check_chunk_collects_all_changes_and_merges_profile` — 128 vs 64. - `device::placement::check_pool::tests::check_chunk_reuses_cached_runs_and_retries_active_mapping_state` — 32 vs 0. - `device::placement::check_pool::tests::check_chunk_runs_xmem_access_only_on_caller_thread` — 128 vs 64. - `device::placement::guest_read::tests::section_watched_texture_caches_runs_and_invalidates_on_watch_or_mapping_change` — 0 vs 1. The first combined provider-control attempt stopped after one passing case because newer main requires its constant-buffer helper to be prebuilt. Building `bash tools/build_frosty_cbv_layer.sh build/frosty-cbv-layer` from the frozen sources into new private build output, without replacing a prior helper or changing frozen sources, made a fresh complete **22/22** run pass. The full native scene-capable runner then verified the four-failure baseline match. NVIDIA remains untested.
NickStallman commented 2026-11-29 20:08:20 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-29T20:08:20Z.


NVIDIA run: full python tuxbox.py check passes on an RTX 5090 (10de:2b85, 620.70.10, GE-Proton11-14, Linux, windows-dxc 1.8.2505.1).

Tree Pass Fail
main 2d6dc338 (control, same card and prefix) 192 0
0583cc65 (so with #512) merged into 2d6dc338 (clean merge) 199 0

The seven extra are #512's five and this PR's lanes-mesh-descriptor-empty and lanes-mesh-descriptor-sparse. No GPU errors in the kernel log.

Not run: the native D3D12 unit tests (not part of check), the prerequisite control, and the game.

<!-- greyfinch-sync:brcly/TuxBox:comment:7261838023 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/518#issuecomment-7261838023). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-29T20:08:20Z. --- NVIDIA run: **full `python tuxbox.py check` passes** on an RTX 5090 (`10de:2b85`, 620.70.10, GE-Proton11-14, Linux, `windows-dxc` 1.8.2505.1). | Tree | Pass | Fail | |---|---|---| | `main` 2d6dc338 (control, same card and prefix) | 192 | 0 | | 0583cc65 (so with #512) merged into 2d6dc338 (clean merge) | 199 | 0 | The seven extra are #512's five and this PR's `lanes-mesh-descriptor-empty` and `lanes-mesh-descriptor-sparse`. No GPU errors in the kernel log. Not run: the native D3D12 unit tests (not part of `check`), the prerequisite control, and the game.
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
brcly/TuxBox!518
No description provided.