From d9bbae6a0ce6aa374974eec892f084ddbac9a07d Mon Sep 17 00:00:00 2001 From: Sil Vilerino Date: Fri, 17 Nov 2023 17:56:47 -0500 Subject: [PATCH] pipe: Add get_feedback_fence for encode async waiting on pipe_feedback_fence Reviewed-by: Ruijing Dong Reviewed-by: Jesse Natalie Part-of: --- src/gallium/include/pipe/p_video_codec.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/gallium/include/pipe/p_video_codec.h b/src/gallium/include/pipe/p_video_codec.h index 152273e8dc8..c3cefcf848d 100644 --- a/src/gallium/include/pipe/p_video_codec.h +++ b/src/gallium/include/pipe/p_video_codec.h @@ -151,6 +151,18 @@ struct pipe_video_codec struct pipe_fence_handle *fence, uint64_t timeout); + /** + * Gets a weak reference to a feedback fence. + * + * Can be used to wait on the pipe_fence_handle directly instead + * of waiting on the get_feedback blocking call. + * + * Returns NULL if the feedback parameter does not have + * a valid in-flight submitted frame + */ + struct pipe_fence_handle* (*get_feedback_fence)(struct pipe_video_codec *codec, + void *feedback); + /** * Destroy fence. */