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

Merged
lambirou merged 4 commits from upstream-pr/3727 into main 2026-12-02 18:41:02 +00:00
lambirou commented 2026-12-01 11:34:58 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-12-01T11:34:58Z.


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 #3639/#3640 work covers it).

Refs #3641, #3541, #3638

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5584835983 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3727). Originally posted by [lambirou](https://github.com/lambirou) on 2026-12-01T11:34:58Z. --- ## 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 #3639/#3640 work covers it). Refs #3641, #3541, #3638
lambirou commented 2026-12-02 14:45:51 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-12-02T14:45:51Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6153072480 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3727#pullrequestreview-6153072480). Originally posted by [lambirou](https://github.com/lambirou) on 2026-12-02T14:45:51Z. **Review:** COMMENTED --- 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.
R0Y00 commented 2026-12-02 16:18:13 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T16:18:13Z.

Review: COMMENTED


I trial-merged db6ee6ba with main 6e3a181b locally. The sole conflict was CMakePresets.json; keeping main's pr filter and adding startup_mesh86_present_warp resolved it. Independent MSVC Debug CTest ^startup_mesh86_present_(warp|hardware)$ passed 2/2, including skipped-draw/refusal controls and target/present readback. The hardware leg used RTX 4060 Laptop (32.0.16.1656), debug layer enabled. Please sync this PR with that preset resolution so required CI can validate the new head.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6154734858 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3727#pullrequestreview-6154734858). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-02T16:18:13Z. **Review:** COMMENTED --- I trial-merged db6ee6ba with main 6e3a181b locally. The sole conflict was CMakePresets.json; keeping main's pr filter and adding startup_mesh86_present_warp resolved it. Independent MSVC Debug CTest `^startup_mesh86_present_(warp|hardware)$` passed 2/2, including skipped-draw/refusal controls and target/present readback. The hardware leg used RTX 4060 Laptop (32.0.16.1656), debug layer enabled. Please sync this PR with that preset resolution so required CI can validate the new head.
R0Y00 commented 2026-12-02 18:40:53 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T18:40:53Z.

Review: APPROVED


Re-reviewed 851dd366. The preset conflict resolution keeps the main checks and registers the new presentation test. Independent Windows 11 build 26300 / MSVC Debug ctest --preset dev --no-tests=error --output-on-failure -j 1 -R '^startup_mesh86_present_(warp|hardware)$' passed 2/2 on inbox WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656, with the D3D12 debug layer enabled. The source-built fixture checks both target and composed-frame readback, list recording correlation, the skipped-draw control and the root-SRV refusal.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6156690980 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3727#pullrequestreview-6156690980). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-02T18:40:53Z. **Review:** APPROVED --- Re-reviewed 851dd366. The preset conflict resolution keeps the main checks and registers the new presentation test. Independent Windows 11 build 26300 / MSVC Debug `ctest --preset dev --no-tests=error --output-on-failure -j 1 -R '^startup_mesh86_present_(warp|hardware)$'` passed 2/2 on inbox WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656, with the D3D12 debug layer enabled. The source-built fixture checks both target and composed-frame readback, list recording correlation, the skipped-draw control and the root-SRV refusal.
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!3727
No description provided.