From 14b9fa75e4c35ccccb767004ba19212901aae404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolai=20H=C3=A4hnle?= Date: Sun, 22 Oct 2017 17:38:53 +0200 Subject: gallium: add pipe_context::callback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For running post-draw operations inside the driver thread. ddebug will use it. Reviewed-by: Marek Olšák --- src/gallium/include/pipe/p_context.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/gallium/include') diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index d9228e4fc9..0dd4ad1242 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -855,6 +855,17 @@ struct pipe_context { */ void (*make_image_handle_resident)(struct pipe_context *ctx, uint64_t handle, unsigned access, bool resident); + + /** + * Call the given function from the driver thread. + * + * This is set by threaded contexts for use by debugging wrappers. + * + * \param asap if true, run the callback immediately if there are no pending + * commands to be processed by the driver thread + */ + void (*callback)(struct pipe_context *ctx, void (*fn)(void *), void *data, + bool asap); }; -- cgit v1.2.3