From bb796f70a144e9c88ab46e6fb08be5895ca7a689 Mon Sep 17 00:00:00 2001 From: Sonny Jiang Date: Thu, 2 Mar 2023 12:26:30 -0600 Subject: [PATCH] radeonsi: Add NV12 support for AV1 8bit av1 decoding cannot use NV12 output, which is caused by missing NV12 RT format. It's a regression caused by commit [0504a3b0]. Fixes: 0504a3b0 ("radeonsi: correctly declare YUV420_10 RT Format support for AV1") Cc: mesa-stable Signed-off-by: Sonny Jiang Reviewed-by: David Wu Part-of: --- src/gallium/drivers/radeonsi/si_get.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c index 8c7c8a7db84..3ac326a4f17 100644 --- a/src/gallium/drivers/radeonsi/si_get.c +++ b/src/gallium/drivers/radeonsi/si_get.c @@ -874,8 +874,9 @@ static bool si_vid_is_format_supported(struct pipe_screen *screen, enum pipe_for if (profile == PIPE_VIDEO_PROFILE_VP9_PROFILE2) return (format == PIPE_FORMAT_P010) || (format == PIPE_FORMAT_P016); - if (profile == PIPE_VIDEO_PROFILE_AV1_MAIN) - return (format == PIPE_FORMAT_P010) || (format == PIPE_FORMAT_P016); + if (profile == PIPE_VIDEO_PROFILE_AV1_MAIN && entrypoint == PIPE_VIDEO_ENTRYPOINT_BITSTREAM) + return (format == PIPE_FORMAT_P010) || (format == PIPE_FORMAT_P016) || + (format == PIPE_FORMAT_NV12); /* JPEG supports YUV400 and YUV444 */ if (profile == PIPE_VIDEO_PROFILE_JPEG_BASELINE) {