mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
radeonsi/vcn: Allocate DPBs aligned to rec_alignment
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:
parent
081f580fbf
commit
d02ba9bb9c
1 changed files with 5 additions and 0 deletions
|
|
@ -2146,9 +2146,14 @@ static struct pipe_video_buffer *radeon_enc_create_dpb_buffer(struct pipe_video_
|
||||||
const struct pipe_video_buffer *templat)
|
const struct pipe_video_buffer *templat)
|
||||||
{
|
{
|
||||||
struct radeon_encoder *enc = (struct radeon_encoder *)encoder;
|
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;
|
struct pipe_video_buffer templ = *templat;
|
||||||
templ.bind |= PIPE_BIND_VIDEO_ENCODE_DPB;
|
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);
|
struct pipe_video_buffer *buf = enc->base.context->create_video_buffer(enc->base.context, &templ);
|
||||||
if (!buf) {
|
if (!buf) {
|
||||||
RADEON_ENC_ERR("Can't create dpb buffer!\n");
|
RADEON_ENC_ERR("Can't create dpb buffer!\n");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue