From 3aaec4750d6fda39b3bb4fc0a159fba1655feede Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Fri, 20 Aug 2010 16:35:34 +0200 Subject: u_staging: improve interface --- src/gallium/auxiliary/util/u_staging.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/gallium/auxiliary/util/u_staging.c') diff --git a/src/gallium/auxiliary/util/u_staging.c b/src/gallium/auxiliary/util/u_staging.c index e2dc696..363e1c8 100644 --- a/src/gallium/auxiliary/util/u_staging.c +++ b/src/gallium/auxiliary/util/u_staging.c @@ -23,20 +23,16 @@ util_staging_resource_template(struct pipe_resource *pt, unsigned width, unsigne } struct util_staging_transfer * -util_staging_transfer_new(struct pipe_context *pipe, +util_staging_transfer_init(struct pipe_context *pipe, struct pipe_resource *pt, struct pipe_subresource sr, unsigned usage, const struct pipe_box *box, - bool direct) + bool direct, struct util_staging_transfer *tx) { struct pipe_screen *pscreen = pipe->screen; - struct util_staging_transfer *tx; - struct pipe_resource staging_resource_template; - tx = CALLOC_STRUCT(util_staging_transfer); - if (!tx) - return NULL; + struct pipe_resource staging_resource_template; pipe_resource_reference(&tx->base.resource, pt); tx->base.sr = sr; -- cgit v1.1