util_dynarray_init(&ctx->draw_patches);
- util_slab_create(&ctx->transfer_pool, sizeof(struct pipe_transfer),
+ util_slab_create(&ctx->transfer_pool, sizeof(struct fd_transfer),
16, UTIL_SLAB_SINGLETHREADED);
fd_draw_init(pctx);
struct fd_context *ctx = fd_context(pctx);
struct fd_resource *rsc = fd_resource(prsc);
struct fd_resource_slice *slice = fd_resource_slice(rsc, level);
+ struct fd_transfer *trans;
struct pipe_transfer *ptrans;
enum pipe_format format = prsc->format;
uint32_t op = 0;
return NULL;
/* util_slab_alloc() doesn't zero: */
- memset(ptrans, 0, sizeof(*ptrans));
+ trans = fd_transfer(ptrans);
+ memset(trans, 0, sizeof(*trans));
pipe_resource_reference(&ptrans->resource, prsc);
ptrans->level = level;
return (struct fd_resource *)ptex;
}
+struct fd_transfer {
+ struct pipe_transfer base;
+ void *staging;
+};
+
+static INLINE struct fd_transfer *
+fd_transfer(struct pipe_transfer *ptrans)
+{
+ return (struct fd_transfer *)ptrans;
+}
+
static INLINE struct fd_resource_slice *
fd_resource_slice(struct fd_resource *rsc, unsigned level)
{