fix(d3d11): prevent cross-device frame reuse - #80
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
Why
Playback traces showed strictly ordered 41/42 ms PTS intervals with no seeks, drops, audio underflows, surface resizes, or presentation stalls while the visible output occasionally inserted a frame with an object's position from another point in time.
The active path used a renderer device separate from the decoder and sampled a shared decoder surface without an explicit cross-device completion fence. Once the retained AVFrame was released, the decoder could reuse that surface before the renderer GPU had sampled it, producing a one-frame temporal flash.
Keeping decode and render work on the same protected D3D11 device preserves command ordering through surface reuse.
Verification
cargo fmt --all -- --checkcargo test -p erika --lib --target x86_64-pc-windows-msvc renderer_stats_distinguish_direct_and_shared_zero_copyflutter build windows --debug --verbose