From 3cec5a84ca21988b52087f14e6caed7ed9778eda Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 30 Sep 2024 13:24:56 +0200 Subject: [PATCH] pipe: Add video fence_wait This will be used to replace get_*_fence functions. Reviewed-by: Leo Liu Reviewed-By: Sil Vilerino Part-of: --- src/gallium/include/pipe/p_video_codec.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/gallium/include/pipe/p_video_codec.h b/src/gallium/include/pipe/p_video_codec.h index 604b3ba61c6..75d50bed66c 100644 --- a/src/gallium/include/pipe/p_video_codec.h +++ b/src/gallium/include/pipe/p_video_codec.h @@ -166,6 +166,20 @@ struct pipe_video_codec struct pipe_fence_handle *fence, uint64_t timeout); + /** + * Wait for fence. + * + * Can be used to query the status of the previous job denoted by + * 'fence' given 'timeout'. + * + * A pointer to a fence pointer can be passed to the codecs before the + * end_frame vfunc and the codec should then be responsible for allocating a + * fence on command stream submission. + */ + int (*fence_wait)(struct pipe_video_codec *codec, + struct pipe_fence_handle *fence, + uint64_t timeout); + /** * Destroy fence. */