mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
d3d12: AV1 encode - Add lower resolution fallback check for uniform tile support
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25819>
This commit is contained in:
parent
1c1b890be3
commit
c0e0c82979
1 changed files with 12 additions and 0 deletions
|
|
@ -370,6 +370,18 @@ d3d12_video_encode_supported_tile_structures(const D3D12_VIDEO_ENCODER_CODEC &co
|
|||
sizeof(capDataTilesSupport));
|
||||
}
|
||||
|
||||
// Try with lower resolution as fallback
|
||||
D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC fallbackRes = { 1920u, 1080u };
|
||||
if(SUCCEEDED(hr) && !capDataTilesSupport.IsSupported && (fallbackRes.Width <= maxRes.Width)
|
||||
&& (fallbackRes.Height <= maxRes.Height) ) {
|
||||
auto oldRes = capDataTilesSupport.FrameResolution;
|
||||
capDataTilesSupport.FrameResolution = fallbackRes;
|
||||
hr = pD3D12VideoDevice->CheckFeatureSupport(D3D12_FEATURE_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_CONFIG,
|
||||
&capDataTilesSupport,
|
||||
sizeof(capDataTilesSupport));
|
||||
capDataTilesSupport.FrameResolution = oldRes;
|
||||
}
|
||||
|
||||
if(SUCCEEDED(hr) && capDataTilesSupport.IsSupported)
|
||||
supportedSliceStructures |= (PIPE_VIDEO_CAP_SLICE_STRUCTURE_POWER_OF_TWO_ROWS |
|
||||
PIPE_VIDEO_CAP_SLICE_STRUCTURE_EQUAL_ROWS |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue