d3d12: add workaround for max subregion number reported in slice auto mode

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40099>
This commit is contained in:
Pohsiang (John) Hsu 2026-02-24 09:23:22 -08:00 committed by Marge Bot
parent 1b1cde9d39
commit d5bd6874f6
2 changed files with 1 additions and 11 deletions

View file

@ -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:
{

View file

@ -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;
}