d3d12: Set HEVC slice mode state before calling d3d12_video_encoder_negotiate_requested_features_and_d3d12_driver_caps

Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
This commit is contained in:
Sil Vilerino 2025-02-12 21:30:11 -05:00 committed by Marge Bot
parent 2939604248
commit be33edbdf1

View file

@ -1341,6 +1341,12 @@ d3d12_video_encoder_update_current_encoder_config_state_hevc(struct d3d12_video_
pD3D12Enc->m_currentEncodeConfig.m_encoderSliceConfigMode =
D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_FULL_FRAME;
// Set slices config (configure before calling d3d12_video_encoder_calculate_max_slices_count_in_output)
if(!d3d12_video_encoder_negotiate_current_hevc_slices_configuration(pD3D12Enc, hevcPic)) {
debug_printf("d3d12_video_encoder_negotiate_current_hevc_slices_configuration failed!\n");
return false;
}
if (!d3d12_video_encoder_negotiate_requested_features_and_d3d12_driver_caps(pD3D12Enc, capEncoderSupportData1)) {
debug_printf("[d3d12_video_encoder_hevc] After negotiating caps, D3D12_FEATURE_VIDEO_ENCODER_SUPPORT1 "
"arguments are not supported - "
@ -1350,12 +1356,6 @@ d3d12_video_encoder_update_current_encoder_config_state_hevc(struct d3d12_video_
return false;
}
// Set slices config (configure before calling d3d12_video_encoder_calculate_max_slices_count_in_output)
if(!d3d12_video_encoder_negotiate_current_hevc_slices_configuration(pD3D12Enc, hevcPic)) {
debug_printf("d3d12_video_encoder_negotiate_current_hevc_slices_configuration failed!\n");
return false;
}
///
// Calculate current settings based on the returned values from the caps query
//