anv: enable the video h265 decode extension.

Currently tested on CometLake(gen9) and AlderLake(gen12)

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>
This commit is contained in:
Hyunjun Ko 2023-03-30 16:42:02 +09:00 committed by Marge Bot
parent a64ae20d0f
commit 60f871dc9e

View file

@ -287,6 +287,7 @@ get_device_extensions(const struct anv_physical_device *device,
.KHR_video_queue = device->video_decode_enabled,
.KHR_video_decode_queue = device->video_decode_enabled,
.KHR_video_decode_h264 = VIDEO_CODEC_H264DEC && device->video_decode_enabled,
.KHR_video_decode_h265 = VIDEO_CODEC_H265DEC && device->video_decode_enabled,
.KHR_vulkan_memory_model = true,
.KHR_workgroup_memory_explicit_layout = true,
.KHR_zero_initialize_workgroup_memory = true,
@ -2569,8 +2570,10 @@ void anv_GetPhysicalDeviceQueueFamilyProperties2(
case VK_STRUCTURE_TYPE_QUEUE_FAMILY_VIDEO_PROPERTIES_KHR: {
VkQueueFamilyVideoPropertiesKHR *prop =
(VkQueueFamilyVideoPropertiesKHR *)ext;
if (queue_family->queueFlags & VK_QUEUE_VIDEO_DECODE_BIT_KHR)
prop->videoCodecOperations = VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR;
if (queue_family->queueFlags & VK_QUEUE_VIDEO_DECODE_BIT_KHR) {
prop->videoCodecOperations = VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR |
VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR;
}
break;
}
default: