unsigned size,
const void *data)
{
- unsigned access = PIPE_TRANSFER_WRITE;
-
- if (offset == 0 && size == buf->width0) {
- access |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE;
- } else {
- access |= PIPE_TRANSFER_DISCARD_RANGE;
- }
-
- pipe->buffer_subdata(pipe, buf, access, offset, size, data);
+ /* Don't set any other usage bits. Drivers should derive them. */
+ pipe->buffer_subdata(pipe, buf, PIPE_TRANSFER_WRITE, offset, size, data);
}
/**
{
struct pipe_box box;
+ if (offset == 0 && size == resource->width0)
+ usage |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE;
+ else
+ usage |= PIPE_TRANSFER_DISCARD_RANGE;
+
u_box_1d(offset, size, &box);
virgl_transfer_inline_write(pipe, resource, 0, usage, &box, data, 0, 0);
}