diff options
author | Nicolai Hähnle <[email protected]> | 2017-10-22 17:38:53 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-11-09 14:00:50 +0100 |
commit | 14b9fa75e4c35ccccb767004ba19212901aae404 (patch) | |
tree | 60c723e367b546b0859699b1ccd9a1b91895c4a7 /src/gallium/include | |
parent | 2bdfbb0e5380f63f044151a12e149745fa672a77 (diff) |
gallium: add pipe_context::callback
For running post-draw operations inside the driver thread. ddebug will
use it.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/include')
-rw-r--r-- | src/gallium/include/pipe/p_context.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index d9228e4fc92..0dd4ad12424 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); }; |