Skip to content

GPU: a skipped pipeline is not started early either - #172

Closed
ericomeehan wants to merge 1 commit into
fxceless:mainfrom
ericomeehan:team/skip-early
Closed

ericomeehan wants to merge 1 commit into
fxceless:mainfrom
ericomeehan:team/skip-early

Conversation

@ericomeehan

Copy link
Copy Markdown

VICTORY_SKIP_PIPELINES is only checked when a draw or dispatch runs (draw.rs, via is_skipped). A pipeline is started earlier than that when the title creates it, if an earlier run drew with it: hand_out → make::early → wanted_early → start(p, EARLY). The early list is saved to disk (library::save, every 20 s while workers finish pipelines, and on a normal exit) and only grows. So if a pipeline gets on the list before its host compile crashes the driver, every later run compiles it again at creation, skipped or not, and crashes the same way. The skip doesn't help, and only a fresh cache directory does.

Seen in the field: on #145 (#145 (comment)), a tester on an RX 9070 XT reports that VICTORY_SKIP_PIPELINES alone did not stop the driver compiler crashes, because the skipped pipeline is still created, early since d279e69. With a local change that doesn't create pipelines whose shader is skipped, plus VICTORY_SHADER_OPT=11 and their two remaining crashing hashes skipped, they had no compiler crash in three runs. Credit to them for finding the gap. Their change sounds broader than this one, which covers only the early start. @hashdev512, if your local version also covers other paths (rectangle draws, say), it may be the better fix, and I'm happy to close this in its favour.

This change:

  • pipeline.rs: skipped_shader takes the pipeline's shaders (&[Arc<Shader>]) instead of the Pipeline, so it can be asked about a Pending too. Matching, its cfg and its two callers' behaviour are unchanged. No new gated item.
  • make.rs: early returns at once when one of the pipeline's shaders is skipped. The check is under #[cfg(feature = "diagnostics")], which (inside the Windows-only make module) is the skip list's current gate.

For dispatches, mesh dispatches and non-rectangle draws, the skip check already returns before host_pipeline is asked, so early was the path left for skipped compute programs. A rectangle-topology draw still asks host_pipeline through completes_rects() before or regardless of the skip check. This PR doesn't change that.

Notes for merging:

Checked: CI on a copy of this branch (clippy with and without --all-features, tests). There's no new test: the change is one early return, and early needs a device. The race itself comes from reading the code. I haven't reproduced a crash with it, and I couldn't run the title.

Written with an AI assistant (Claude).

🤖 Generated with Claude Code

VICTORY_SKIP_PIPELINES was only checked at draw and dispatch time. A
pipeline an earlier run drew with is on the persisted early list and
make::early starts its host compile when the title creates it, so a
skipped pipeline whose driver compile crashes still crashed the run.
skipped_shader now takes the pipeline's shaders, and make::early returns
for a pipeline with a skipped shader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JustDownTV pushed a commit to JustDownTV/victory-gta6 that referenced this pull request Nov 24, 2026
RicerBoy added a commit to RicerBoy/DropItLikeItsHot that referenced this pull request Nov 24, 2026
…e is not started early either

Part of #16

# Conflicts:
#	crates/victory-gpu/src/pipeline.rs
@ericomeehan ericomeehan closed this by deleting the head repository Nov 25, 2026
RecompLive pushed a commit to RecompLive/victory-fork that referenced this pull request Nov 25, 2026
XMA: cache IMDCT rotation tables per subframe size
oceansde012 pushed a commit to oceansde012/victory-gta6 that referenced this pull request Nov 25, 2026
XMA: cache IMDCT rotation tables per subframe size
(cherry picked from commit 7d99f63)
oceansde012 pushed a commit to oceansde012/victory-gta6 that referenced this pull request Nov 25, 2026
Revens2 pushed a commit to Revens2/VItoriaBr that referenced this pull request Nov 25, 2026
…-fork#172)

(cherry picked from commit aa28528ac4596f07945070e33d545a6a52f2ce9e)
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