From 840325c2f795b8fe2da7bbb252d9be7b7c926893 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Thu, 22 May 2025 10:04:48 +0200 Subject: [PATCH] radv/video: Limit 10bit H265 decode support to stoney and newer Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12132 Reviewed-by: Dave Airlie Part-of: (cherry picked from commit 1608bc20b5d237fd29522b6c696e5654eddab5cf) --- .pick_status.json | 2 +- src/amd/vulkan/radv_video.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 3e5f9ffb3a1..cef563df096 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -5224,7 +5224,7 @@ "description": "radv/video: Limit 10bit H265 decode support to stoney and newer", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/amd/vulkan/radv_video.c b/src/amd/vulkan/radv_video.c index 2c3cdf674d1..52f6ed0593b 100644 --- a/src/amd/vulkan/radv_video.c +++ b/src/amd/vulkan/radv_video.c @@ -673,6 +673,7 @@ radv_GetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, cons break; } case VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR: { + const bool have_10bit = pdev->info.family >= CHIP_STONEY; /* H265 allows different luma and chroma bit depths */ if (pVideoProfile->lumaBitDepth != pVideoProfile->chromaBitDepth) return VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR; @@ -684,12 +685,12 @@ radv_GetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, cons vk_find_struct_const(pVideoProfile->pNext, VIDEO_DECODE_H265_PROFILE_INFO_KHR); if (h265_profile->stdProfileIdc != STD_VIDEO_H265_PROFILE_IDC_MAIN && - h265_profile->stdProfileIdc != STD_VIDEO_H265_PROFILE_IDC_MAIN_10 && + (!have_10bit || h265_profile->stdProfileIdc != STD_VIDEO_H265_PROFILE_IDC_MAIN_10) && h265_profile->stdProfileIdc != STD_VIDEO_H265_PROFILE_IDC_MAIN_STILL_PICTURE) 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) + (!have_10bit || pVideoProfile->lumaBitDepth != VK_VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR)) return VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR; pCapabilities->maxDpbSlots = RADV_VIDEO_H264_MAX_DPB_SLOTS;