Module: Mesa Branch: main Commit: 89df5976f8096a8bffc880611be23d218cc248bb URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=89df5976f8096a8bffc880611be23d218cc248bb
Author: Dave Airlie <[email protected]> Date: Wed Apr 26 16:43:38 2023 +1000 radv/video: fix dpb surface programming This just programs the dpb fields directly from the image surface. Makes things happier on navi33 Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21980> --- src/amd/vulkan/radv_video.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/amd/vulkan/radv_video.c b/src/amd/vulkan/radv_video.c index a9397df6f07..fbed8bf64ef 100644 --- a/src/amd/vulkan/radv_video.c +++ b/src/amd/vulkan/radv_video.c @@ -974,13 +974,10 @@ static bool rvcn_dec_message_decode(struct radv_cmd_buffer *cmd_buffer, decode->sc_coeff_size = 0; decode->sw_ctxt_size = RDECODE_SESSION_CONTEXT_SIZE; - decode->db_pitch = align(frame_info->dstPictureResource.codedExtent.width, vid->db_alignment); - - if (device->physical_device->rad_info.family >= CHIP_NAVI21 && - (vid->stream_type == RDECODE_CODEC_H265 && - vid->vk.h265.profile_idc == STD_VIDEO_H265_PROFILE_IDC_MAIN_10)) - decode->db_aligned_height = align(frame_info->dstPictureResource.codedExtent.height, 64); + decode->db_pitch = dpb->planes[0].surface.u.gfx9.surf_pitch; + decode->db_aligned_height = dpb->planes[0].surface.u.gfx9.surf_height; + decode->db_swizzle_mode = dpb->planes[0].surface.u.gfx9.swizzle_mode; decode->db_array_mode = device->physical_device->vid_addr_gfx_mode; decode->dt_pitch = luma->surface.u.gfx9.surf_pitch * luma->surface.blk_w;
