runtime: correlate and prove a slot 86 Mesh draw through presentation #3729

Open
github-bot wants to merge 3 commits from github-bot/gh-3727 into main AGit
Owner

@⁠lambirou on GitHub · 2026-12-01 11:34 UTC · original
lambirou:codex/3641-mesh86-presentation-proof → main · +528 −2 · 6 files · 3 commits · open

Problem

The slot 86 Mesh path could create a desktop PSO and record a DispatchMesh, but there was no source-built proof that one selected draw reaches the target before composition and appears in the presented frame, with a skipped-draw control and a correlation across record, close and submission.

Change

  • Runtime: correlate one slot 86 Mesh drawing across record, close and queue submission under the opt-in X2W_MESH86_PRESENT_TRACE=1, naming the list pointer, recording id, published mesh key and group counts. The default path is unchanged when the switch is off.
  • Fixture: a source-built Mesh86 draw paints the left half of the target red. The target is read back before composition and after the window's plane composite; both frames must match. The skipped-draw control leaves both frames clear. A sampled root SRV shape is refused with its exact reason and both frames stay clear.
  • Documentation and CTest registration for WARP and an adapter.

Tests

  • ctest --preset release --no-tests=error -R '^startup_mesh86_present_' -V — 2/2 pass on WARP and RX 9060 XT (driver 32.0.32029.2010).
  • Trace on: record, close and submit share the same list, recording, key and groups 1,1,1; trace off: same pixels, no correlation row.
  • Skip: both frames keep the clear colour and no correlation row is printed.
  • Refused shape: both frames stay clear with the named first refusal.

Limits

This is a source-built fixture; it does not establish full-game startup or title scene output. The sampled root SRV shape is reported, not fixed here (the #3641/#3640 work covers it).

Refs #3643, #3543, #3640

**@⁠lambirou** on GitHub · 2026-12-01 11:34 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3727) `lambirou:codex/3641-mesh86-presentation-proof` → `main` · +528 −2 · 6 files · 3 commits · open ## Problem The slot 86 Mesh path could create a desktop PSO and record a DispatchMesh, but there was no source-built proof that one selected draw reaches the target before composition and appears in the presented frame, with a skipped-draw control and a correlation across record, close and submission. ## Change - Runtime: correlate one slot 86 Mesh drawing across record, close and queue submission under the opt-in `X2W_MESH86_PRESENT_TRACE=1`, naming the list pointer, recording id, published mesh key and group counts. The default path is unchanged when the switch is off. - Fixture: a source-built Mesh86 draw paints the left half of the target red. The target is read back before composition and after the window's plane composite; both frames must match. The skipped-draw control leaves both frames clear. A sampled root SRV shape is refused with its exact reason and both frames stay clear. - Documentation and CTest registration for WARP and an adapter. ## Tests - `ctest --preset release --no-tests=error -R '^startup_mesh86_present_' -V` — 2/2 pass on WARP and RX 9060 XT (driver 32.0.32029.2010). - Trace on: record, close and submit share the same list, recording, key and groups 1,1,1; trace off: same pixels, no correlation row. - Skip: both frames keep the clear colour and no correlation row is printed. - Refused shape: both frames stay clear with the named first refusal. ## Limits This is a source-built fixture; it does not establish full-game startup or title scene output. The sampled root SRV shape is reported, not fixed here (the #3641/#3640 work covers it). Refs #3643, #3543, #3640
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 11:40:38 +00:00
Author
Owner

@⁠lambirou on GitHub · 2026-12-02 14:45 UTC · original · reviewed

Reviewed b7d2a01f; read the recording/submission correlation and the presentation fixture, not built here.

Verdict: approve. The trace is opt-in, bounded to 48 rows per stage, and records the same id at indirect-record time, list close, reset and queue submission. The argument record is read only when its title bytes are readable, so an unreadable record reports groups_known=0 instead of faulting.

  • NIT mesh86_trace_id() is documented as "call under allocator_lock"; the record path does, but queue_execute reads state.mesh86_trace_recording without a visible lock on the same field. If the list cannot be submitted concurrently with a record/reset, add that invariant to the comment; otherwise the field needs the same lock.
  • NIT The side table is a process-wide static first_calls counter, so the 48-row bound is shared by every list. That is intentional for log volume, but the comment should say it is process-wide rather than per recording.
  • Checked, no finding: the trace is off unless X2W_MESH86_PRESENT_TRACE or X2W_D3D12_TRACE_DIRECT_MESH is set; reset logs an unsubmitted recording and clears it; close and submit log the same id; the fixture proves the target and presented-frame correlation.

The PR remains stacked on the Mesh86 bases and is currently DIRTY; rebase before merge.

**@⁠lambirou** on GitHub · 2026-12-02 14:45 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3727#pullrequestreview-6153072480) · **reviewed** Reviewed `b7d2a01f`; read the recording/submission correlation and the presentation fixture, not built here. **Verdict: approve.** The trace is opt-in, bounded to 48 rows per stage, and records the same id at indirect-record time, list close, reset and queue submission. The argument record is read only when its title bytes are readable, so an unreadable record reports `groups_known=0` instead of faulting. - **NIT** `mesh86_trace_id()` is documented as "call under allocator_lock"; the record path does, but `queue_execute` reads `state.mesh86_trace_recording` without a visible lock on the same field. If the list cannot be submitted concurrently with a record/reset, add that invariant to the comment; otherwise the field needs the same lock. - **NIT** The side table is a process-wide static `first_calls` counter, so the 48-row bound is shared by every list. That is intentional for log volume, but the comment should say it is process-wide rather than per recording. - Checked, no finding: the trace is off unless `X2W_MESH86_PRESENT_TRACE` or `X2W_D3D12_TRACE_DIRECT_MESH` is set; reset logs an unsubmitted recording and clears it; close and submit log the same id; the fixture proves the target and presented-frame correlation. The PR remains stacked on the Mesh86 bases and is currently `DIRTY`; rebase before merge.
github-bot force-pushed github-bot/gh-3727 from b7d2a01ffd to 9e0edbdae4 2026-12-02 15:04:41 +00:00 Compare
This pull request has changes conflicting with the target branch.
  • CMakePresets.json
  • docs/experiments/mesh86-pixel-execz.md
  • src/startup_stubs/d3d12_xs_device.cpp
  • tests/startup_indirect_draw_indexed.cpp
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3729/head:github-bot/gh-3727'
git switch 'github-bot/gh-3727'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3727'
git switch 'github-bot/gh-3727'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3727'
git switch 'github-bot/gh-3727'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3727'
git switch 'main'
git merge --squash 'github-bot/gh-3727'
git switch 'main'
git merge --ff-only 'github-bot/gh-3727'
git switch 'main'
git merge 'github-bot/gh-3727'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.