gallium/u_threaded: increase batch size to increase performance
[mesa.git] / src / gallium / auxiliary / util / u_upload_mgr.h
index 633291e2ce3bb480023ed28aca3d8260c87af5e7..a66b73655657d3c7daffef773202390c8c4ea6a1 100644 (file)
@@ -38,6 +38,9 @@
 struct pipe_context;
 struct pipe_resource;
 
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 /**
  * Create the upload manager.
@@ -46,10 +49,11 @@ struct pipe_resource;
  * \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
@@ -58,6 +62,13 @@ u_upload_create(struct pipe_context *pipe, unsigned default_size,
 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.
  */
@@ -109,4 +120,8 @@ void u_upload_data(struct u_upload_mgr *upload,
                    unsigned *out_offset,
                    struct pipe_resource **outbuf);
 
+#ifdef __cplusplus
+} // extern "C" {
+#endif
+
 #endif