summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe/p_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/include/pipe/p_context.h')
-rw-r--r--src/gallium/include/pipe/p_context.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index 69352f7260f..7d09ce4b19a 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -537,6 +537,19 @@ struct pipe_context {
unsigned sample_count,
unsigned sample_index,
float *out_value);
+
+ /**
+ * Flush the resource cache, so that the resource can be used
+ * by an external client. Possible usage:
+ * - flushing a resource before presenting it on the screen
+ * - flushing a resource if some other process or device wants to use it
+ * This shouldn't be used to flush caches if the resource is only managed
+ * by a single pipe_screen and is not shared with another process.
+ * (i.e. you shouldn't use it to flush caches explicitly if you want to e.g.
+ * use the resource for texturing)
+ */
+ void (*flush_resource)(struct pipe_context *ctx,
+ struct pipe_resource *resource);
};