summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_context.h13
-rw-r--r--src/gallium/include/pipe/p_defines.h2
2 files changed, 15 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,
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 39f66355c32..cd857ae65a7 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -459,6 +459,7 @@ enum pipe_flush_flags
#define PIPE_RESOURCE_FLAG_MAP_PERSISTENT (1 << 0)
#define PIPE_RESOURCE_FLAG_MAP_COHERENT (1 << 1)
#define PIPE_RESOURCE_FLAG_TEXTURING_MORE_LIKELY (1 << 2)
+#define PIPE_RESOURCE_FLAG_SPARSE (1 << 3)
#define PIPE_RESOURCE_FLAG_DRV_PRIV (1 << 16) /* driver/winsys private */
#define PIPE_RESOURCE_FLAG_ST_PRIV (1 << 24) /* state-tracker/winsys private */
@@ -758,6 +759,7 @@ enum pipe_cap
PIPE_CAP_TGSI_TEX_TXF_LZ,
PIPE_CAP_TGSI_CLOCK,
PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE,
+ PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE,
};
#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)