summaryrefslogtreecommitdiff
path: root/src/gallium/include
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2017-10-22 17:38:53 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2017-11-09 14:00:50 +0100
commit14b9fa75e4c35ccccb767004ba19212901aae404 (patch)
tree60c723e367b546b0859699b1ccd9a1b91895c4a7 /src/gallium/include
parent2bdfbb0e5380f63f044151a12e149745fa672a77 (diff)
gallium: add pipe_context::callback
For running post-draw operations inside the driver thread. ddebug will use it. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_context.h11
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 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);
};