#define U_UPLOAD_MGR_H
#include "pipe/p_compiler.h"
+#include "pipe/p_defines.h"
struct pipe_context;
struct pipe_resource;
*
* \param pipe Pipe driver.
* \param default_size Minimum size of the upload buffer, in bytes.
- * \param alignment Alignment of each suballocation in the upload buffer.
* \param bind Bitmask of PIPE_BIND_* flags.
+ * \param usage PIPE_USAGE_*
*/
-struct u_upload_mgr *u_upload_create( struct pipe_context *pipe,
- unsigned default_size,
- unsigned alignment,
- unsigned bind );
+struct u_upload_mgr *
+u_upload_create(struct pipe_context *pipe, unsigned default_size,
+ unsigned bind, enum pipe_resource_usage usage);
/**
* Destroy the upload manager.
* \param upload Upload manager
* \param min_out_offset Minimum offset that should be returned in out_offset.
* \param size Size of the allocation.
+ * \param alignment Alignment of the suballocation within the buffer
* \param out_offset Pointer to where the new buffer offset will be returned.
* \param outbuf Pointer to where the upload buffer will be returned.
* \param ptr Pointer to the allocated memory that is returned.
void u_upload_alloc(struct u_upload_mgr *upload,
unsigned min_out_offset,
unsigned size,
+ unsigned alignment,
unsigned *out_offset,
struct pipe_resource **outbuf,
void **ptr);
void u_upload_data(struct u_upload_mgr *upload,
unsigned min_out_offset,
unsigned size,
+ unsigned alignment,
const void *data,
unsigned *out_offset,
struct pipe_resource **outbuf);
unsigned min_out_offset,
unsigned offset,
unsigned size,
+ unsigned alignment,
struct pipe_resource *inbuf,
unsigned *out_offset,
struct pipe_resource **outbuf);