Repository navigation
GPU: re-register invalidated texture readback tickets - #1376
Merged
Merged
Conversation
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.
Problem
If a texture's backing memory is reused or remapped, the previous readback ticket becomes invalid. A later write in the same list finds the old target and suppresses registration, so the readback is dropped.
Change
Re-register a stale target in place; keep a fresh target and preserve deduplication. Use the existing ticket invalidation and mapping lock. Add a synthetic R32_FLOAT texture regression with a thread-local test configuration restored on drop.
Verification
Direct base 52ac4ec. Clean isolated workspace all-target/all-feature cargo check and Clippy -D warnings passed.
a_rewritten_back_texture_after_reuse_is_read_backexercised on a host device with WARP requested; registered, invalidated, registered again and recorded exactly one readback at close. Diff check passed. Staged asset policy fails solely on host.rs size (530160 bytes; upstream already 528954, limit 524288). Await the existing upstream split #1357 rather than weakening the policy or bundling unrelated source movement. No real water/gameplay claim. CI/review pending.AI-assisted adaptation from fork 0b4c9c8 and 575e3d5; no title assets.