radeonsi/vcn: Allocate DPBs aligned to rec_alignment
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14618
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39221>
This commit is contained in:
Benjamin Cheng 2026-01-08 16:25:40 -05:00 committed by Marge Bot
parent 081f580fbf
commit d02ba9bb9c

View file

@ -2146,9 +2146,14 @@ static struct pipe_video_buffer *radeon_enc_create_dpb_buffer(struct pipe_video_
const struct pipe_video_buffer *templat)
{
struct radeon_encoder *enc = (struct radeon_encoder *)encoder;
uint32_t rec_alignment =
get_rec_alignment(u_reduce_video_profile(enc->base.profile));
struct pipe_video_buffer templ = *templat;
templ.bind |= PIPE_BIND_VIDEO_ENCODE_DPB;
templ.width = align(templ.width, rec_alignment);
templ.height = align(templ.height, rec_alignment);
struct pipe_video_buffer *buf = enc->base.context->create_video_buffer(enc->base.context, &templ);
if (!buf) {
RADEON_ENC_ERR("Can't create dpb buffer!\n");