Repository navigation
Conversation
The reorder copy runs on the transfer queue and is ordered against the decode queue with timeline semaphores whose stage mask is COPY. Its barriers used NONE as the source stage of the transitions into the transfer layouts and as the destination stage of the transition back, so the transitions were outside the scope those semaphores cover. The validation layer reports that as a WRITE_AFTER_WRITE hazard against vkCmdDecodeVideoKHR. Use COPY for those stages, so each transition is chained to the wait before it and the signal after it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This was referenced Nov 18, 2026
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.
With the validation layer's synchronization checks on, decoding any stream that takes the copying path reports
WRITE_AFTER_WRITEhazards betweenvkCmdDecodeVideoKHRand the copy's layout transition. I mentioned these in #61; this is the cause and a fix.The copy on the transfer queue is ordered against the decode queue with timeline semaphores whose stage mask is
COPY. Its barriers useNONEas the source stage of the transitions into the transfer layouts, and as the destination stage of the transition back. That puts the transitions outside the scope the semaphores cover, which is what the layer says:Using
COPYfor those three stage masks chains each transition to the wait before it and the signal after it.Results (RTX 4080 SUPER, NVIDIA 620.70.06, validation layer 1.4.363 with core, sync and thread-safety checks)
cargo test --test decode_streams --test sample_planes -- --ignoredwithPIXELFORGE_VALIDATION=1:main(v0.13.0)Output stays byte-identical to ffmpeg and dav1d in those tests. I have only run this on NVIDIA, where I never saw wrong pixels from it, so I can't say whether it shows up as corruption on drivers where the transition does real work.
🤖 Created and tested with Claude Fable 5.2 in Claude Code.