Repository navigation
fix(gpu): treat unreadable memory in ValueWait::holds as not holding - #3359
Open
reeledMarek wants to merge 1 commit into
Open
reeledMarek wants to merge 1 commit into
reeledMarek wants to merge 1 commit into
Conversation
…instead of unknown
Dukestar69
approved these changes
Nov 26, 2026
Dukestar69
left a comment
There was a problem hiding this comment.
LGTM — verified on Windows against origin/main (63bcca4).
- Returning
Some(false)instead ofNonewhenread(self.address, self.bytes)returnsNoneprevents unreadable wait memory from being treated as an unknown comparison (which previously released the waiting queue segment early). cargo test -p victory-gpu --lib hold:: -- --test-threads=1: 11 passed, 0 failed (includingunreadable_memory_holds_the_queue_without_counting_as_unknown).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
ValueWait::holdsdocumented unreadable memory as not holding, but returnedNoneviaread(self.address, self.bytes)?—the same sentinel used for unknown D3D12 comparison functions.Held::pumptreatsNoneas an unknown comparison (incrementingdone.unknownand leavingok = true), so queues waiting on unreadable memory ran prematurely instead of staying held, andHeld::blockedomitted those waits because it filters forSome(false).Some(false)whenread(self.address, self.bytes)returnsNone, reservingNonestrictly for unknown comparison functions.comparisons_test_the_masked_valueand adds regression testunreadable_memory_holds_the_queue_without_counting_as_unknown.Verification
cargo clippy -p victory-gpu --all-targets --target x86_64-pc-windows-msvc --locked -- -D warningshold::testsunit tests directly (rustc --edition 2024 --test)cargo test -p xtask --locked