summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe/p_context.h
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-02-02 21:10:44 +0100
committerNicolai Hähnle <[email protected]>2017-04-05 10:37:04 +0200
commitd6e6fa01a51f3c9328c4cfdc1d7b3b448de11b84 (patch)
treecbced671242be91fd6d1bc6a69139f9c724fcb61 /src/gallium/include/pipe/p_context.h
parent4e6feacf6aa589574da3b70f32ed4e87494c7000 (diff)
gallium: add sparse buffer interface and capability
v2: - explain the resource_commit interface in more detail Reviewed-by: Marek Olšák <[email protected]>
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 a29fff514a6..4d5535b9fd6 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -585,6 +585,19 @@ struct pipe_context {
void (*memory_barrier)(struct pipe_context *, unsigned flags);
/**
+ * Change the commitment status of a part of the given resource, which must
+ * have been created with the PIPE_RESOURCE_FLAG_SPARSE bit.
+ *
+ * \param level The texture level whose commitment should be changed.
+ * \param box The region of the resource whose commitment should be changed.
+ * \param commit Whether memory should be committed or un-committed.
+ *
+ * \return false if out of memory, true on success.
+ */
+ bool (*resource_commit)(struct pipe_context *, struct pipe_resource *,
+ unsigned level, struct pipe_box *box, bool commit);
+
+ /**
* Creates a video codec for a specific video format/profile
*/
struct pipe_video_codec *(*create_video_codec)( struct pipe_context *context,