Module: Mesa Branch: main Commit: 9feff3d695e48cb16c2a9fedd0c2d720c6d16a25 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9feff3d695e48cb16c2a9fedd0c2d720c6d16a25
Author: David Rosca <now...@gmail.com> Date: Tue Oct 31 17:46:33 2023 +0100 radeonsi/uvd_enc: Implement destroy_fence vfunc Reviewed-by: Leo Liu <leo....@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25991> --- src/gallium/drivers/radeonsi/radeon_uvd_enc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gallium/drivers/radeonsi/radeon_uvd_enc.c b/src/gallium/drivers/radeonsi/radeon_uvd_enc.c index 1e38eb8aef8..ae0249db583 100644 --- a/src/gallium/drivers/radeonsi/radeon_uvd_enc.c +++ b/src/gallium/drivers/radeonsi/radeon_uvd_enc.c @@ -241,6 +241,14 @@ static void radeon_uvd_enc_get_feedback(struct pipe_video_codec *encoder, void * FREE(fb); } +static void radeon_uvd_enc_destroy_fence(struct pipe_video_codec *encoder, + struct pipe_fence_handle *fence) +{ + struct radeon_uvd_encoder *enc = (struct radeon_uvd_encoder *)encoder; + + enc->ws->fence_reference(&fence, NULL); +} + struct pipe_video_codec *radeon_uvd_create_encoder(struct pipe_context *context, const struct pipe_video_codec *templ, struct radeon_winsys *ws, @@ -271,6 +279,7 @@ struct pipe_video_codec *radeon_uvd_create_encoder(struct pipe_context *context, enc->base.end_frame = radeon_uvd_enc_end_frame; enc->base.flush = radeon_uvd_enc_flush; enc->base.get_feedback = radeon_uvd_enc_get_feedback; + enc->base.destroy_fence = radeon_uvd_enc_destroy_fence; enc->get_buffer = get_buffer; enc->bits_in_shifter = 0; enc->screen = context->screen;