summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-01-26 22:24:13 +0100
committerMarek Olšák <[email protected]>2017-02-14 21:46:16 +0100
commitd71bc0d741a20d146e8580e80e148c291aad0e64 (patch)
tree5adfa2d97bb781c03168970316f7172e70342c7e /src/gallium/include/pipe
parent3360dbe0c1ebeead9046955b3de4dcdf86cfbb40 (diff)
gallium: add common uploaders into pipe_context (v2)
For lower memory usage and more efficient updates of the buffer residency list. (e.g. if drivers keep seeing the same buffer for many consecutive "add" calls, the calls can be turned into no-ops trivially) v2: add const_uploader, add documentation Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Edmondo Tommasina <[email protected]> Tested-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe')
-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 45098c9c74f..49e366a74eb 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -76,6 +76,7 @@ struct pipe_viewport_state;
struct pipe_compute_state;
union pipe_color_union;
union pipe_query_result;
+struct u_upload_mgr;
/**
* Gallium rendering context. Basically:
@@ -89,6 +90,16 @@ struct pipe_context {
void *priv; /**< context private data (for DRI for example) */
void *draw; /**< private, for draw module (temporary?) */
+ /**
+ * Stream uploaders created by the driver. All drivers, state trackers, and
+ * modules should use them.
+ *
+ * Use u_upload_alloc or u_upload_data as many times as you want.
+ * Once you are done, use u_upload_unmap.
+ */
+ struct u_upload_mgr *stream_uploader; /* everything but shader constants */
+ struct u_upload_mgr *const_uploader; /* shader constants only */
+
void (*destroy)( struct pipe_context * );
/**