Fix decode corruption issue#1
Open
wyc55069407 wants to merge 1 commit into
Open
Conversation
Certain frames will have artifacts or green image(no data) due to data not done copying into driver. Root cause: there is a call of buffer_subdata in d3d12_video_decoder_end_frame to create a temp resoure, do map/umap to set bitstream data (CPU side) into this resource, call CopyBufferRegion to copy temp resource data into real bistream buffer, Then do decode. However, there is sync missed between CopyBufferRegion and decode. Fix is: 1. Create a fence for sync between copy bitstream and decode workload. 2. Add fence Signal at common CmdQueue after Execute CmdList of workload: copy bitstream from temp to bitstream buffer through CopyBufferRegion. 3. Add fence Wait at decode CmdQueue before Execute CmdList of workload decode. Signed-off-by: Wang, Yuchen <yuchen.wang@intel.com>
|
This is a valid fix, preferring the other fix proposed in 73a3057 Picked fix in https://gitlab.freedesktop.org/sivileri/mesa/-/commit/9ca2a6917f6708f0da601557a01abff8dc10ad79 Note: As I was evaluating and discussing this fix, please note for further reference that work done in the pipe->context queue can be synced directly by waiting on the CPU as below: Alternatively, if you desire to wait on the GPU (on a separate queue independent from the pipe->context) you can directly sync the fence within the GPU and avoid a CPU wait as below: |
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.
Certain frames will have artifacts or green image(no data) due to
data not done copying into driver.
Root cause: there is a call of buffer_subdata in d3d12_video_decoder_end_frame to
create a temp resoure, do map/umap to set bitstream data (CPU side) into this resource,
call CopyBufferRegion to copy temp resource data into real bistream buffer, Then do decode.
However, there is sync missed between CopyBufferRegion and decode.
Fix is:
copy bitstream from temp to bitstream buffer through CopyBufferRegion.
Signed-off-by: Wang, Yuchen yuchen.wang@intel.com