mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 13:50:09 +01:00
radv/video: add KHR_video_maintenance1 support
This just adds support for allowing worst case image sizing with no specified profiles and for using inline queries. Reviewed-by: Lynne <dev@lynne.ee> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30671>
This commit is contained in:
parent
fc137ecaca
commit
b30462535b
4 changed files with 18 additions and 8 deletions
|
|
@ -1,3 +1,4 @@
|
|||
Expose Vulkan 1.3 on v3dv, both rpi4 and rpi5
|
||||
VK_EXT_descriptor_buffer on nvk
|
||||
VK_EXT_post_depth_coverage on nvk
|
||||
VK_KHR_video_maintenance1 on radv
|
||||
|
|
|
|||
|
|
@ -1102,7 +1102,8 @@ radv_image_create_layout(struct radv_device *device, struct radv_image_create_in
|
|||
if (image->vk.usage & (VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR |
|
||||
VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR |
|
||||
VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR)) {
|
||||
assert(profile_list);
|
||||
if (!device->vk.enabled_features.videoMaintenance1)
|
||||
assert(profile_list);
|
||||
uint32_t width_align, height_align;
|
||||
radv_video_get_profile_alignments(pdev, profile_list, &width_align, &height_align);
|
||||
image_info.width = align(image_info.width, width_align);
|
||||
|
|
|
|||
|
|
@ -573,6 +573,7 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
|
|||
.KHR_uniform_buffer_standard_layout = true,
|
||||
.KHR_variable_pointers = true,
|
||||
.KHR_vertex_attribute_divisor = true,
|
||||
.KHR_video_maintenance1 = true,
|
||||
.KHR_video_queue = !!(instance->perftest_flags & RADV_PERFTEST_VIDEO_DECODE) || pdev->video_encode_enabled,
|
||||
.KHR_video_decode_av1 = (pdev->info.vcn_ip_version >= VCN_3_0_0 && pdev->info.vcn_ip_version != VCN_3_0_33 &&
|
||||
VIDEO_CODEC_AV1DEC && !!(instance->perftest_flags & RADV_PERFTEST_VIDEO_DECODE)),
|
||||
|
|
@ -1233,6 +1234,9 @@ radv_physical_device_get_features(const struct radv_physical_device *pdev, struc
|
|||
|
||||
/* VK_KHR_maintenance7 */
|
||||
.maintenance7 = true,
|
||||
|
||||
/* VK_KHR_video_maintenance1 */
|
||||
.videoMaintenance1 = true,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2706,14 +2706,18 @@ radv_video_get_profile_alignments(struct radv_physical_device *pdev, const VkVid
|
|||
{
|
||||
vk_video_get_profile_alignments(profile_list, width_align_out, height_align_out);
|
||||
bool is_h265_main_10 = false;
|
||||
for (unsigned i = 0; i < profile_list->profileCount; i++) {
|
||||
if (profile_list->pProfiles[i].videoCodecOperation == VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR) {
|
||||
const struct VkVideoDecodeH265ProfileInfoKHR *h265_profile =
|
||||
vk_find_struct_const(profile_list->pProfiles[i].pNext, VIDEO_DECODE_H265_PROFILE_INFO_KHR);
|
||||
if (h265_profile->stdProfileIdc == STD_VIDEO_H265_PROFILE_IDC_MAIN_10)
|
||||
is_h265_main_10 = true;
|
||||
|
||||
if (profile_list) {
|
||||
for (unsigned i = 0; i < profile_list->profileCount; i++) {
|
||||
if (profile_list->pProfiles[i].videoCodecOperation == VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR) {
|
||||
const struct VkVideoDecodeH265ProfileInfoKHR *h265_profile =
|
||||
vk_find_struct_const(profile_list->pProfiles[i].pNext, VIDEO_DECODE_H265_PROFILE_INFO_KHR);
|
||||
if (h265_profile->stdProfileIdc == STD_VIDEO_H265_PROFILE_IDC_MAIN_10)
|
||||
is_h265_main_10 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
is_h265_main_10 = true;
|
||||
|
||||
uint32_t db_alignment = radv_video_get_db_alignment(pdev, 64, is_h265_main_10);
|
||||
*width_align_out = MAX2(*width_align_out, db_alignment);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue