radeonsi/uvd: Align bitstream buffer to 128 when resizing
Also use the same initial size as VCN. Cc: mesa-stable Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32673>
This commit is contained in:
@@ -1052,6 +1052,10 @@ static void ruvd_decode_bitstream(struct pipe_video_codec *decoder,
|
||||
|
||||
if (new_size > buf->res->buf->size) {
|
||||
dec->ws->buffer_unmap(dec->ws, buf->res->buf);
|
||||
dec->bs_ptr = NULL;
|
||||
|
||||
new_size = align(new_size, 128);
|
||||
|
||||
if (!si_vid_resize_buffer(dec->base.context, &dec->cs, buf, new_size, NULL)) {
|
||||
RVID_ERR("Can't resize bitstream buffer!");
|
||||
return;
|
||||
@@ -1280,7 +1284,7 @@ struct pipe_video_codec *si_common_uvd_create_decoder(struct pipe_context *conte
|
||||
for (i = 0; i < 16; i++)
|
||||
dec->render_pic_list[i] = NULL;
|
||||
dec->fb_size = (sctx->family == CHIP_TONGA) ? FB_BUFFER_SIZE_TONGA : FB_BUFFER_SIZE;
|
||||
bs_buf_size = width * height * (512 / (16 * 16));
|
||||
bs_buf_size = align(width * height / 32, 128);
|
||||
for (i = 0; i < NUM_BUFFERS; ++i) {
|
||||
unsigned msg_fb_it_size = FB_BUFFER_OFFSET + dec->fb_size;
|
||||
STATIC_ASSERT(sizeof(struct ruvd_msg) <= FB_BUFFER_OFFSET);
|
||||
|
||||
Reference in New Issue
Block a user