struct pipe_context;
struct pipe_resource;
+#ifdef __cplusplus
+extern "C" {
+#endif
/**
* Create the upload manager.
* \param default_size Minimum size of the upload buffer, in bytes.
* \param bind Bitmask of PIPE_BIND_* flags.
* \param usage PIPE_USAGE_*
+ * \param flags bitmask of PIPE_RESOURCE_FLAG_* flags.
*/
struct u_upload_mgr *
u_upload_create(struct pipe_context *pipe, unsigned default_size,
- unsigned bind, enum pipe_resource_usage usage);
+ unsigned bind, enum pipe_resource_usage usage, unsigned flags);
/**
* Create the default uploader for pipe_context. Only pipe_context::screen
struct u_upload_mgr *
u_upload_create_default(struct pipe_context *pipe);
+/**
+ * Create an uploader with identical parameters as another one, but using
+ * the given pipe_context instead.
+ */
+struct u_upload_mgr *
+u_upload_clone(struct pipe_context *pipe, struct u_upload_mgr *upload);
+
/**
* Destroy the upload manager.
*/
unsigned *out_offset,
struct pipe_resource **outbuf);
+#ifdef __cplusplus
+} // extern "C" {
+#endif
+
#endif