d3d12: Video Encode H264 - Workaround for D3D12 validation bug requiring pRefPicMarkingOperationsCommands for IDR frames

Fixes: 0249f2e652 ("d3d12: Video Encode H264 - Support direct mmco operations")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31000>
This commit is contained in:
Sil Vilerino
2024-09-03 11:48:09 -04:00
committed by Marge Bot
parent 74be809237
commit f2bb4e0743

View File

@@ -391,6 +391,11 @@ d3d12_video_encoder_references_manager_h264::begin_frame(D3D12_VIDEO_ENCODER_PIC
// assume that the client is attempting to set the H264 slice header long_term_reference_flag and will do so in
// the output bitstream for such EncodeFrame call.
m_curFrameState.adaptive_ref_pic_marking_mode_flag = 1;
// Workaround for D3D12 validation bug requiring pRefPicMarkingOperationsCommands for IDR frames
m_curFrameState.RefPicMarkingOperationsCommandsCount = 1u;
m_CurrentFrameReferencesData.pMemoryOps.resize(m_curFrameState.RefPicMarkingOperationsCommandsCount);
m_curFrameState.pRefPicMarkingOperationsCommands = m_CurrentFrameReferencesData.pMemoryOps.data();
}
///