Resolve intermittent stretched geometry and corrupted draw inputs #3

Open
opened 2026-12-06 00:19:56 +00:00 by github-bot · 0 comments
Owner

@⁠VictoryX-dev on GitHub · 2026-12-03 02:57 UTC · original

Problem

Some scene and character objects intermittently render with stretched or expanding polygons during gameplay. We need reproducible evidence pinpointing the exact corrupt draw-input path(s) and a targeted fix that does not degrade frame pacing or memory stability.

Known Evidence

  • Confirmed in gameplay: Intermittent stretched geometry still occurs in demanding Series S scenes even after RC3's texture-sparkle and rainbow-face fixes.
  • Experimental / Synthetic fixtures (off by default, unmeasured in gameplay):
    • VICTORY_DRAW_INPUT_ALIAS=1 (host/draw_inputs.rs): routes indirect draw/dispatch inputs (arguments, count, vertex and index buffers) to the GPU writer's backing when the same command list made an exact full GPU copy over those bytes before the consumer. Synthetic RX 9070 XT D3D12 debug-layer fixture (draw::geometry_order_tests::alias_tests::exact_draw_input_aliases_on_rx9070) passes. Current reach is limited to same-list card copies (cross-list copies, shader writes and dynamically indexed buffers still fall back to default lookup).
    • VICTORY_SUBMIT_TAKE=2 (submit_take.rs): audit-only mode that counts GEOMETRY PAGES WRITTEN AFTER THEIR SUBMIT when the title mutates vertex/index pages between its ExecuteCommandLists call and our submitting lane's preparation. Synthetic fixture passes. (Mode 1 is unreviewed and unsafe — do not use.)
  • Engineering target: Zero stretched or corrupted geometry artifacts in gameplay without disabling asynchronous submission or indirect batching.

Approaches That Did Not Work

  • VICTORY_WINDOWS_ORDERED=1 (kept off): Promoted one-sided windows rewritten under an in-flight reader to per-submission ordered copies. The mechanism fired as designed (~42 rewrites/frame ordered), but stretched geometry still occurred, while P99 worsened by +2.5 ms and private bytes rose by +0.5 GB.

Relevant Source Modules

  • runtime/crates/victory-gpu/src/host/draw_inputs.rs
  • runtime/crates/victory-gpu/src/submit_take.rs
  • runtime/crates/victory-gpu/src/host/geomtrace.rs
  • runtime/crates/victory-gpu/src/draw.rs
  • runtime/crates/victory-gpu/src/indirect.rs
  • runtime/crates/victory-gpu/src/shadow.rs
  • runtime/crates/victory-gpu/src/replay/

Expected Contribution

  • Run diagnostic captures (VICTORY_SUBMIT_TAKE=2, VICTORY_GEOMETRY_TRACE=2, VICTORY_STALE_DRAWS=1) and gameplay A/B checks on VICTORY_DRAW_INPUT_ALIAS=1 to determine whether stretched geometry stems from:
    1. same-list or cross-list GPU-written draw inputs read from stale default backings,
    2. post-submit CPU vertex/index ring overwrites under VICTORY_ASYNC_SUBMIT=1,
    3. re-executed command lists or indirect argument aliasing.
  • Build a minimal synthetic D3D12 fixture reproducing the proven failure mode and implement a sound, reversible fix.

Acceptance Criteria

  • A synthetic D3D12 regression test fails before the fix and passes after it (with D3D12 debug validation clean).
  • Root cause is backed by diagnostic counts or replay evidence rather than speculation.
  • Gameplay validation confirms stretched geometry is eliminated without regressing P99 frame time or memory footprint.
**@⁠VictoryX-dev** on GitHub · 2026-12-03 02:57 UTC · [original](https://github.com/VictoryX-dev/VictoryX/issues/3) ## Problem Some scene and character objects intermittently render with stretched or expanding polygons during gameplay. We need reproducible evidence pinpointing the exact corrupt draw-input path(s) and a targeted fix that does not degrade frame pacing or memory stability. ## Known Evidence - **Confirmed in gameplay:** Intermittent stretched geometry still occurs in demanding Series S scenes even after RC3's texture-sparkle and rainbow-face fixes. - **Experimental / Synthetic fixtures (off by default, unmeasured in gameplay):** - `VICTORY_DRAW_INPUT_ALIAS=1` (`host/draw_inputs.rs`): routes indirect draw/dispatch inputs (arguments, count, vertex and index buffers) to the GPU writer's backing when the same command list made an exact full GPU copy over those bytes before the consumer. Synthetic RX 9070 XT D3D12 debug-layer fixture (`draw::geometry_order_tests::alias_tests::exact_draw_input_aliases_on_rx9070`) passes. Current reach is limited to same-list card copies (cross-list copies, shader writes and dynamically indexed buffers still fall back to default lookup). - `VICTORY_SUBMIT_TAKE=2` (`submit_take.rs`): audit-only mode that counts `GEOMETRY PAGES WRITTEN AFTER THEIR SUBMIT` when the title mutates vertex/index pages between its `ExecuteCommandLists` call and our submitting lane's preparation. Synthetic fixture passes. *(Mode `1` is unreviewed and unsafe — do not use.)* - **Engineering target:** Zero stretched or corrupted geometry artifacts in gameplay without disabling asynchronous submission or indirect batching. ## Approaches That Did Not Work - **`VICTORY_WINDOWS_ORDERED=1` (kept off):** Promoted one-sided windows rewritten under an in-flight reader to per-submission ordered copies. The mechanism fired as designed (~42 rewrites/frame ordered), **but stretched geometry still occurred**, while P99 worsened by +2.5 ms and private bytes rose by +0.5 GB. ## Relevant Source Modules - `runtime/crates/victory-gpu/src/host/draw_inputs.rs` - `runtime/crates/victory-gpu/src/submit_take.rs` - `runtime/crates/victory-gpu/src/host/geomtrace.rs` - `runtime/crates/victory-gpu/src/draw.rs` - `runtime/crates/victory-gpu/src/indirect.rs` - `runtime/crates/victory-gpu/src/shadow.rs` - `runtime/crates/victory-gpu/src/replay/` ## Expected Contribution - Run diagnostic captures (`VICTORY_SUBMIT_TAKE=2`, `VICTORY_GEOMETRY_TRACE=2`, `VICTORY_STALE_DRAWS=1`) and gameplay A/B checks on `VICTORY_DRAW_INPUT_ALIAS=1` to determine whether stretched geometry stems from: 1. same-list or cross-list GPU-written draw inputs read from stale default backings, 2. post-submit CPU vertex/index ring overwrites under `VICTORY_ASYNC_SUBMIT=1`, 3. re-executed command lists or indirect argument aliasing. - Build a minimal synthetic D3D12 fixture reproducing the proven failure mode and implement a sound, reversible fix. ## Acceptance Criteria - [ ] A synthetic D3D12 regression test fails before the fix and passes after it (with D3D12 debug validation clean). - [ ] Root cause is backed by diagnostic counts or replay evidence rather than speculation. - [ ] Gameplay validation confirms stretched geometry is eliminated without regressing P99 frame time or memory footprint.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-06 00:19:56 +00:00
This discussion has been locked. Commenting is limited to contributors.
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/VictoryX-dev--VictoryX#3
No description provided.