diff --git a/src/gallium/drivers/d3d12/d3d12_video_enc_hevc.cpp b/src/gallium/drivers/d3d12/d3d12_video_enc_hevc.cpp index dfc75843450..846856e2c9f 100644 --- a/src/gallium/drivers/d3d12/d3d12_video_enc_hevc.cpp +++ b/src/gallium/drivers/d3d12/d3d12_video_enc_hevc.cpp @@ -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 //