Skip to content

GPU: preserve RTV and DSV descriptor values across command-list cuts - #1371

Open
spk-c wants to merge 1 commit into
fxceless:mainfrom
spk-c:submit/target-replay
Open

spk-c wants to merge 1 commit into
fxceless:mainfrom
spk-c:submit/target-replay

Conversation

@spk-c

@spk-c spk-c commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Problem

When a title list is cut and its state replayed into a new host list, the original RTV/DSV CPU slots may already have been rewritten. Replay currently looks at those slots again, instead of the descriptor values captured by the original SetRenderTargets call.

Change

Snapshot descriptor words and resource identity at SetRenderTargets and reconstruct views from the snapshots on replay. Preserve current upstream target-format tracking and existing typed-null/missing-view behavior. The caller's resource lifetime contract remains unchanged; no new raw pointer dereference is introduced beyond the existing resource lookup path.

Verification

Directly based on upstream 52ac4ec. Fresh isolated workspace all-target/all-feature cargo check and Clippy -D warnings passed; synthetic render_target_snapshot_preserves_original_descriptor_words passed; staged asset policy (2 files) and diff check passed. The test checks value capture rather than a full GPU replay. No gameplay claims. Full upstream policy currently also needs upstream #1357's oversized source-file split; CI/review pending.

AI-assisted, adapted from fork commits 745b0d1 and 9059527. No proprietary assets.

AI-assisted; adapted from fork 745b0d1 and 9059527, preserving upstream target-format tracking.
@spk-c
spk-c marked this pull request as ready for review November 26, 2026 19:23
KomanderDG88 added a commit to KomanderDG88/VIniVIdiVIci that referenced this pull request Nov 26, 2026
…ure fixes), cascade shadows, render-target snapshots, and switches for rays, memory and input

Twenty-two commits, tested as fe2ede8 (cargo check of the workspace with
diagnostics clean; victory-gpu --lib 356 passed, 0 failed) and built by
Codex as fe2ede8-diagnostics.

On by default, each with a way back:
- the original's fifth merge up to e4245f3 with 93db653: VICTORY_PAGE_WRITES
  now also sends back to pending the textures written by slots and by
  plain reads (1|2|8; =guards is the default of before), textures without
  room on the card are asked for again (VIctory #3198), a released view
  heap forgets its run of title memory (fxceless#589), shader fixes (fxceless#1112, fxceless#702,
  mesh corners, samplers behind a uniform branch, sampleLevel);
- fxceless#1002: exact cascade shadows on cards of 32 lanes
  (VICTORY_SHADER_CASCADE_EXACT=0 goes back);
- fxceless#1371: render targets replayed from a copy taken at SetRenderTargets
  (VICTORY_RT_SNAPSHOT=0 goes back).

Off by default: VICTORY_RT_SKIN_SKIP, VICTORY_RT_RESOLVE_SKIP,
VICTORY_ACTIVATE_RAYS_SKIP, VICTORY_HAIR_VB_SKIP (with a census of such
programs), VICTORY_ALT_FLIP (fxceless#1341), VICTORY_RAM_TRIM, VICTORY_WINDOW_REUSE
(fxceless#1362), VICTORY_COLD_SKIP (fxceless#1358), the worker chain of fxceless#1290,
VICTORY_KEYS_FILE, VICTORY_NULL_SAMPLES, and the merge's CARD_HASH_WIDE=alt,
GATHER_SEGMENTS, GATHER_DISPATCHES, DIRTY_4K, MERGE_RUNS_ALT,
HEAP_RECHECK_EVERY and WAVE_WIDE_ONLY. The profiler test walks only modules
that never unload.

Left out: diagnostics/translate-water-5dc3-6f22-2026-11-26.txt, a
translation diagnostic of the original's run that lists offsets and
instructions of two of the title's shaders.

Measured by Codex on fe2ede8, the ten switches of Status, screenshots
every second, one pair of sessions of 480 s, the same binary: in the
opening's cafeteria two faces were drawn with their features with the new
default, and one of them came out without features and the background
washed out with VICTORY_PAGE_WRITES=guards, at different moments and
poses; in the reverse pair a face came out almost all black with the new
default (the guards session was stopped by the memory guard at 391 s), so
these fixes are not the whole answer to black faces. Not measured for
frame rate yet. Neither session crashed; frames of a second
or more between 150 and 450 s: 49 (longest 5.7 s) with guards, 52 (6.8 s)
with the default. A first session with a cold shader cache was ended at
388 s by the title itself after a frame of 21.5 s spent waiting for the
runtime's remapping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
grosterr added a commit to grosterr/victory-fork that referenced this pull request Nov 26, 2026
…st cuts)

Co-Authored-By: Antigravity <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant