mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
radv/video: Add bit depth and profile check for VP9 decode
Fixes: b8ac2d47e7 ("radv/video: add KHR_video_decode_vp9 support.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36311>
This commit is contained in:
parent
bdad9e7e48
commit
fd0c70aded
1 changed files with 12 additions and 0 deletions
|
|
@ -861,6 +861,18 @@ radv_GetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, cons
|
|||
case VK_VIDEO_CODEC_OPERATION_DECODE_VP9_BIT_KHR: {
|
||||
struct VkVideoDecodeVP9CapabilitiesKHR *ext =
|
||||
vk_find_struct(pCapabilities->pNext, VIDEO_DECODE_VP9_CAPABILITIES_KHR);
|
||||
|
||||
const struct VkVideoDecodeVP9ProfileInfoKHR *vp9_profile =
|
||||
vk_find_struct_const(pVideoProfile->pNext, VIDEO_DECODE_VP9_PROFILE_INFO_KHR);
|
||||
|
||||
if (vp9_profile->stdProfile != STD_VIDEO_VP9_PROFILE_0 &&
|
||||
vp9_profile->stdProfile != STD_VIDEO_VP9_PROFILE_2)
|
||||
return VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR;
|
||||
|
||||
if (pVideoProfile->lumaBitDepth != VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR &&
|
||||
pVideoProfile->lumaBitDepth != VK_VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR)
|
||||
return VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR;
|
||||
|
||||
pCapabilities->maxDpbSlots = RADV_VIDEO_VP9_MAX_DPB_SLOTS;
|
||||
pCapabilities->maxActiveReferencePictures = RADV_VIDEO_VP9_MAX_NUM_REF_FRAME;
|
||||
if (pdev->info.vcn_ip_version >= VCN_3_0_0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue