GPU: implement SetMarker, BeginEvent, and EndEvent on command lists (slots 0x1c0-0x1d0) #1168

Closed
github-bot wants to merge 2 commits from gh-pr/1168/head into gh-pr/1168/base
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-24 16:19 UTC · original
geiyiliyabumo:feat/list-predication-and-markers → main · +151 −2 · 1 files · 2 commits · closed without merging

Summary

Closes #859

Full verification details and change notes are documented in #859 (commit a74fe6b, based on main ffe310e).

 crates/victory-gpu/src/list.rs | 369 ++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 366 insertions(+), 3 deletions(-)

Verification (Windows 11 x64 MSVC)

  • rustfmt --edition 2024 --check on edited files: PASS
  • cargo xtask policy: PASS (zero game files/data)
  • cargo clippy --all-targets --locked -- -D warnings (default + --features diagnostics where applicable): PASS
  • Targeted & crate unit/GPU tests: PASS

AI-assisted; synthetic tests only, no game files.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 16:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/1168) `geiyiliyabumo:feat/list-predication-and-markers` → `main` · +151 −2 · 1 files · 2 commits · closed without merging ### Summary Closes #859 Full verification details and change notes are documented in #859 (commit `a74fe6b`, based on `main` `ffe310e`). ```text crates/victory-gpu/src/list.rs | 369 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 366 insertions(+), 3 deletions(-) ``` ### Verification (Windows 11 x64 MSVC) - `rustfmt --edition 2024 --check` on edited files: **PASS** - `cargo xtask policy`: **PASS** (zero game files/data) - `cargo clippy --all-targets --locked -- -D warnings` (default + `--features diagnostics` where applicable): **PASS** - Targeted & crate unit/GPU tests: **PASS** *AI-assisted; synthetic tests only, no game files.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:22:02 +00:00
github-bot closed this pull request 2026-11-26 04:22:02 +00:00
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-24 16:45 UTC · original

Tested SetPredication / SetMarker / BeginEvent / EndEvent on RTX 5090 and WARP (VICTORY_D3D12_DEBUG=1 and VICTORY_D3D12_DRED=1). One subtle interaction with DRED breadcrumbs in set_marker:

  • Double SETMARKER desynchronizes HostList::removal_data: When VICTORY_D3D12_DRED=1 is enabled (crate::host::dred_on()), host.note_op(...) already emits a host list.SetMarker(...) breadcrumb so HostList::notes stays strictly 1:1 with D3D12_AUTO_BREADCRUMB_OP_SETMARKER entries (host.rs:685). Calling host.note_op(...) and then unconditionally calling host.list.SetMarker(...) emits two SETMARKER breadcrumbs for one note entry, shifting all subsequent crash breadcrumbs on that command list by one. Returning early after note_op when dred_on() is active (with decoded UTF-16LE/UTF-8 marker text) preserves exact 1:1 breadcrumb indexing.
  • For the CPU-backed upload path in set_predication, recording note_read(..., (gpu, 8)) on upload.GetGPUVirtualAddress() also lets DRED page-fault attribution match the staged 8-byte predicate buffer, and guarding note_op until upload succeeds avoids orphaned notes on allocation failure.

Reference commit verified with VICTORY_D3D12_DRED=1 + 64-bit high-bit deferred write readback on RTX 5090 & WARP: github.com/fuzeofficlal/VIctory@b1d1dee5c3

**@⁠fuzeofficlal** on GitHub · 2026-11-24 16:45 UTC · [original](https://github.com/Marvisak/VIctory/pull/1168#issuecomment-7138151964) Tested `SetPredication` / `SetMarker` / `BeginEvent` / `EndEvent` on RTX 5090 and WARP (`VICTORY_D3D12_DEBUG=1` and `VICTORY_D3D12_DRED=1`). One subtle interaction with DRED breadcrumbs in `set_marker`: - **Double `SETMARKER` desynchronizes `HostList::removal_data`**: When `VICTORY_D3D12_DRED=1` is enabled (`crate::host::dred_on()`), `host.note_op(...)` already emits a host `list.SetMarker(...)` breadcrumb so `HostList::notes` stays strictly 1:1 with `D3D12_AUTO_BREADCRUMB_OP_SETMARKER` entries (`host.rs:685`). Calling `host.note_op(...)` and then unconditionally calling `host.list.SetMarker(...)` emits two `SETMARKER` breadcrumbs for one note entry, shifting all subsequent crash breadcrumbs on that command list by one. Returning early after `note_op` when `dred_on()` is active (with decoded UTF-16LE/UTF-8 marker text) preserves exact 1:1 breadcrumb indexing. - For the CPU-backed upload path in `set_predication`, recording `note_read(..., (gpu, 8))` on `upload.GetGPUVirtualAddress()` also lets DRED page-fault attribution match the staged 8-byte predicate buffer, and guarding `note_op` until `upload` succeeds avoids orphaned notes on allocation failure. Reference commit verified with `VICTORY_D3D12_DRED=1` + 64-bit high-bit deferred write readback on RTX 5090 & WARP: https://github.com/fuzeofficlal/VIctory/commit/b1d1dee5c387f7fa68be389d0e0a1d7aea7d2c4b
Author
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-24 17:16 UTC · original

Thanks @⁠fuzeofficlal for catching the DRED breadcrumb desynchronization and upload-path attribution!

Folded both fixes into this PR:

  • In \set_marker, when \crate::host::dred_on()\ is enabled, decode UTF-16LE/UTF-8 marker labels into \host.note_op(...)\ and return early instead of emitting a second host \SetMarker, keeping \HostList::notes\ strictly 1:1 with \D3D12_AUTO_BREADCRUMB_OP_SETMARKER.
  • In \set_predication, defer
    ote_read\ on the CPU-backed upload path until \host.upload(device, 8)\ succeeds and record (upload.GetGPUVirtualAddress(), 8)\ for DRED page-fault attribution.

Re-verified \cargo test -p victory-gpu --features diagnostics --lib list::tests\ (3/3 passed) with \VICTORY_D3D12_DRED=1\ on both WARP and AMD Radeon RX 9060 XT, plus \clippy\ (default + --all-features\ -D warnings) and \cargo xtask policy.

AI-assisted; synthetic tests only, no game files.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 17:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/1168#issuecomment-7138958971) Thanks @⁠fuzeofficlal for catching the DRED breadcrumb desynchronization and upload-path attribution! Folded both fixes into this PR: - In \set_marker\, when \crate::host::dred_on()\ is enabled, decode UTF-16LE/UTF-8 marker labels into \host.note_op(...)\ and return early instead of emitting a second host \SetMarker\, keeping \HostList::notes\ strictly 1:1 with \D3D12_AUTO_BREADCRUMB_OP_SETMARKER\. - In \set_predication\, defer \ ote_read\ on the CPU-backed upload path until \host.upload(device, 8)\ succeeds and record \(upload.GetGPUVirtualAddress(), 8)\ for DRED page-fault attribution. Re-verified \cargo test -p victory-gpu --features diagnostics --lib list::tests\ (3/3 passed) with \VICTORY_D3D12_DRED=1\ on both WARP and AMD Radeon RX 9060 XT, plus \clippy\ (default + \--all-features\ \-D warnings\) and \cargo xtask policy\. *AI-assisted; synthetic tests only, no game files.*
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 18:00 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 3247043: cargo test -p victory-gpu passes, 52 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 18:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/1168#issuecomment-7140032329) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 3247043: `cargo test -p victory-gpu` passes, 52 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:38 UTC · original · edited 2026-11-25 07:23 UTC

Automated triage for the maintainers.

Merge candidate. Update after your reply: set_predication is gone, so slot 0xf8 stays E_NOTIMPL as on main, and the PR now covers only slots 0x1c0/0x1c8/0x1d0 in crates/victory-gpu/src/list.rs. On main these slots are object::missing entries: they log once and return E_NOTIMPL, which a void method's caller ignores. Here they forward the title's metadata and payload to the host SetMarker/BeginEvent/EndEvent, with a null pointer or zero size mapped to no payload. With DRED on, set_marker records only through HostList::note_op, so notes stays 1:1 with the SETMARKER breadcrumbs. Rendering is unchanged; the gain is labelled PIX captures and DRED reports. The tests check the slots in both list tables and run the calls, including null and zero-size payloads, on a host device. CI: passing (check).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 00:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/1168#issuecomment-7148725008) · edited 2026-11-25 07:23 UTC <!-- victory-triage v1 head=e752367ae6c33349112013e561bdcdbcd573ab4d verdict=merge-candidate at=2026-11-25T07:23:04Z --> Automated triage for the maintainers. **Merge candidate.** Update after your reply: `set_predication` is gone, so slot 0xf8 stays `E_NOTIMPL` as on `main`, and the PR now covers only slots 0x1c0/0x1c8/0x1d0 in `crates/victory-gpu/src/list.rs`. On `main` these slots are `object::missing` entries: they log once and return `E_NOTIMPL`, which a void method's caller ignores. Here they forward the title's metadata and payload to the host `SetMarker`/`BeginEvent`/`EndEvent`, with a null pointer or zero size mapped to no payload. With DRED on, `set_marker` records only through `HostList::note_op`, so `notes` stays 1:1 with the `SETMARKER` breadcrumbs. Rendering is unchanged; the gain is labelled PIX captures and DRED reports. The tests check the slots in both list tables and run the calls, including null and zero-size payloads, on a host device. CI: passing (`check`). --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-25 01:54 UTC · original

Rebased cleanly onto \main\ (\ccfb029). \cargo test -p victory-gpu --locked\ (143 passed, 0 failed), \cargo clippy -p victory-gpu --all-targets --locked -- -D warnings, and \cargo xtask policy\ all pass.

**@⁠geiyiliyabumo** on GitHub · 2026-11-25 01:54 UTC · [original](https://github.com/Marvisak/VIctory/pull/1168#issuecomment-7150091792) Rebased cleanly onto \main\ (\ccfb029\). \cargo test -p victory-gpu --locked\ (143 passed, 0 failed), \cargo clippy -p victory-gpu --all-targets --locked -- -D warnings\, and \cargo xtask policy\ all pass.
Author
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-25 04:10 UTC · original

Narrowed this PR as suggested in triage: removed \SetPredication\ (slot \

**@⁠geiyiliyabumo** on GitHub · 2026-11-25 04:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/1168#issuecomment-7152593696) Narrowed this PR as suggested in triage: removed \SetPredication\ (slot \
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 21:59 UTC · original

Automated triage for the maintainers, second look (a review against current main, with builds and tests where they could change the verdict).

Closing because the title never calls these slots (an unimplemented list slot logs its first call, and no title run has logged them), and for the title's newer list layout their positions are not settled. Two methods were added to the base list somewhere between 0x1b8 and 0x1e8, and the marker call the console upscaler makes at 0x1d8 does not have the PC BeginEvent/EndEvent shape. Filling 0x1c0-0x1d0 on a guess would replace the log that is meant to pin them with a host call that could read title pointers as marker payloads. The gain, even when right, is PIX labels only.

If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 21:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/1168#issuecomment-7175801770) Automated triage for the maintainers, second look (a review against current `main`, with builds and tests where they could change the verdict). Closing because the title never calls these slots (an unimplemented list slot logs its first call, and no title run has logged them), and for the title's newer list layout their positions are not settled. Two methods were added to the base list somewhere between 0x1b8 and 0x1e8, and the marker call the console upscaler makes at 0x1d8 does not have the PC `BeginEvent`/`EndEvent` shape. Filling 0x1c0-0x1d0 on a guess would replace the log that is meant to pin them with a host call that could read title pointers as marker payloads. The gain, even when right, is PIX labels only. If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1168
No description provided.