diff --git a/src/gallium/drivers/d3d12/d3d12_video_enc.cpp b/src/gallium/drivers/d3d12/d3d12_video_enc.cpp index 921b48e6487..c990311fefe 100644 --- a/src/gallium/drivers/d3d12/d3d12_video_enc.cpp +++ b/src/gallium/drivers/d3d12/d3d12_video_enc.cpp @@ -3025,7 +3025,7 @@ d3d12_video_encoder_calculate_max_slices_count_in_output( case D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_BYTES_PER_SUBREGION: case D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_AUTO: { - maxSlices = MaxSubregionsNumberFromCaps; + maxSlices = std::max(128u, MaxSubregionsNumberFromCaps); } break; case D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_SQUARE_UNITS_PER_SUBREGION_ROW_UNALIGNED: { diff --git a/src/gallium/drivers/d3d12/d3d12_video_enc_hevc.cpp b/src/gallium/drivers/d3d12/d3d12_video_enc_hevc.cpp index 1b9ce63888d..25ded7e57a3 100644 --- a/src/gallium/drivers/d3d12/d3d12_video_enc_hevc.cpp +++ b/src/gallium/drivers/d3d12/d3d12_video_enc_hevc.cpp @@ -1481,16 +1481,6 @@ d3d12_video_encoder_update_current_encoder_config_state_hevc(struct d3d12_video_ pD3D12Enc->m_currentEncodeCapabilities.m_encoderLevelSuggestedDesc.m_HEVCLevelSetting.Level); } - if (pD3D12Enc->m_currentEncodeCapabilities.m_MaxSlicesInOutput > - pD3D12Enc->m_currentEncodeCapabilities.m_currentResolutionSupportCaps.MaxSubregionsNumber) { - debug_printf("[d3d12_video_encoder_hevc] Desired number of subregions %d is not supported (higher than max " - "reported slice number %d in query caps) for current resolution (%d, %d)\n.", - pD3D12Enc->m_currentEncodeCapabilities.m_MaxSlicesInOutput, - pD3D12Enc->m_currentEncodeCapabilities.m_currentResolutionSupportCaps.MaxSubregionsNumber, - pD3D12Enc->m_currentEncodeConfig.m_currentResolution.Width, - pD3D12Enc->m_currentEncodeConfig.m_currentResolution.Height); - return false; - } return true; }