struct NineDevice9 *device = This->base.base.device;
assert(This->base.pool == D3DPOOL_MANAGED && This->managed.dirty);
- nine_context_range_upload(device, &This->managed.pending_upload, This->base.resource,
+ nine_context_range_upload(device, &This->managed.pending_upload,
+ (struct NineUnknown *)This,
+ This->base.resource,
This->managed.dirty_box.x,
This->managed.dirty_box.width,
(char *)This->managed.data + This->managed.dirty_box.x);
}
CSMT_ITEM_NO_WAIT_WITH_COUNTER(nine_context_range_upload,
+ ARG_BIND_REF(struct NineUnknown, src_ref),
ARG_BIND_RES(struct pipe_resource, res),
ARG_VAL(unsigned, offset),
ARG_VAL(unsigned, size),
{
struct nine_context *context = &device->context;
+ /* Binding src_ref avoids release before upload */
+ (void)src_ref;
+
context->pipe->buffer_subdata(context->pipe, res, 0, offset, size, data);
}
void
nine_context_range_upload(struct NineDevice9 *device,
unsigned *counter,
+ struct NineUnknown *src_ref,
struct pipe_resource *res,
unsigned offset,
unsigned size,