diff --git a/src/gallium/include/pipe/p_video_codec.h b/src/gallium/include/pipe/p_video_codec.h index e13dc5d4786..c68d8fd672c 100644 --- a/src/gallium/include/pipe/p_video_codec.h +++ b/src/gallium/include/pipe/p_video_codec.h @@ -119,6 +119,20 @@ struct pipe_video_codec * get encoder feedback */ void (*get_feedback)(struct pipe_video_codec *codec, void *feedback, unsigned *size); + + /** + * Get decoder fence. + * + * Can be used to query the status of the previous decode 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 (*get_decoder_fence)(struct pipe_video_codec *codec, + struct pipe_fence_handle *fence, + uint64_t timeout); }; /** diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h index 84d70f74fc3..784d8462b9e 100644 --- a/src/gallium/include/pipe/p_video_state.h +++ b/src/gallium/include/pipe/p_video_state.h @@ -166,6 +166,8 @@ struct pipe_picture_desc uint32_t key_size; enum pipe_format input_format; enum pipe_format output_format; + /* A fence used on PIPE_VIDEO_ENTRYPOINT_DECODE to signal job completion */ + struct pipe_fence_handle **fence; }; struct pipe_quant_matrix