radeonsi/uvd_enc: Remove unused stream_handle

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34807>
This commit is contained in:
David Rosca 2025-05-05 09:10:35 +02:00 committed by Marge Bot
parent 4339cf0aff
commit fb53eec720
2 changed files with 4 additions and 9 deletions

View file

@ -1088,9 +1088,8 @@ static void radeon_uvd_enc_begin_frame(struct pipe_video_codec *encoder,
}
}
if (!enc->stream_handle) {
if (!enc->si) {
struct rvid_buffer fb;
enc->stream_handle = si_vid_alloc_stream_handle();
enc->si = CALLOC_STRUCT(rvid_buffer);
si_vid_create_buffer(enc->screen, enc->si, 128 * 1024, PIPE_USAGE_DEFAULT);
si_vid_create_buffer(enc->screen, &fb, 4096, PIPE_USAGE_STAGING);
@ -1208,17 +1207,15 @@ static void radeon_uvd_enc_destroy(struct pipe_video_codec *encoder)
{
struct radeon_uvd_encoder *enc = (struct radeon_uvd_encoder *)encoder;
if (enc->stream_handle) {
if (enc->si) {
struct rvid_buffer fb;
enc->need_feedback = false;
si_vid_create_buffer(enc->screen, &fb, 512, PIPE_USAGE_STAGING);
enc->fb = &fb;
destroy(enc);
flush(enc, PIPE_FLUSH_ASYNC, NULL);
if (enc->si) {
si_vid_destroy_buffer(enc->si);
FREE(enc->si);
}
si_vid_destroy_buffer(enc->si);
FREE(enc->si);
si_vid_destroy_buffer(&fb);
}

View file

@ -338,8 +338,6 @@ struct radeon_uvd_enc_pic {
struct radeon_uvd_encoder {
struct pipe_video_codec base;
unsigned stream_handle;
struct pipe_screen *screen;
struct radeon_winsys *ws;
struct radeon_cmdbuf cs;