aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-09-20 15:08:29 +0200
committerMarek Olšák <[email protected]>2013-09-20 20:35:55 +0200
commit419cd5f2a24b87d31a2fd9dd9b7d0025b4f5515c (patch)
tree517df295a28d5fc0f0542de5e6f2552886b32e5b /src/gallium/include
parentd2bd63433a252c84488023e9877e70d69223da42 (diff)
gallium: add flush_resource context function
r600g needs explicit flushing before DRI2 buffers are presented on the screen. v2: add (stub) implementations for all drivers, fix frontbuffer flushing v3: fix galahad Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/include')
-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);
};