Repository navigation
fix(gpu): skip converting twin copy routes when depth converter is unavailable - #3360
Open
reeledMarek wants to merge 1 commit into
Open
reeledMarek wants to merge 1 commit into
reeledMarek wants to merge 1 commit into
Conversation
Dukestar69
approved these changes
Nov 26, 2026
Dukestar69
left a comment
There was a problem hiding this comment.
LGTM — verified on RTX 5090 (Windows / D3D12) against origin/main (63bcca4).
- Filtering out converting routes (and their plane barriers) when
converter()is unavailable avoids copying unconverted scratch bytes into the destination texture or emitting unnecessary transitions. cargo test -p victory-gpu --lib twin:: -- --test-threads=1: 3 passed, 0 failed (includingcopy_skips_converting_routes_when_converter_is_missing).cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
r.depth.is_some()) andconverter()returnsNone,Twin::copypreviously skipped the compute conversion pass but still ran the secondCopyTextureRegionpass from the unwritten scratch offset (r.depthorr.twin) into the destination texture, corrupting it with uninitialized scratch bytes.copy_withhelper), skipping routes that require conversion when no converter is available and returningfalseearly without transitions or incrementingCOPIESif no active routes remain.copy_skips_converting_routes_when_converter_is_missing.Verification
cargo clippy -p victory-gpu --all-targets --target x86_64-pc-windows-msvc --locked -- -D warningscargo test -p xtask --locked