Lines Matching defs:box
314 unsigned usage, const struct pipe_box *box,
330 transfer->b.b.box = *box;
338 unsigned level, unsigned usage, const struct pipe_box *box,
346 assert(box->x + box->width <= resource->width0);
368 !util_ranges_intersect(&buf->valid_buffer_range, box->x, box->x + box->width)) {
373 if (usage & PIPE_MAP_DISCARD_RANGE && box->x == 0 && box->width == resource->width0) {
427 u_upload_alloc(uploader, 0, box->width + (box->x % SI_MAP_BUFFER_ALIGNMENT),
432 data += box->x % SI_MAP_BUFFER_ALIGNMENT;
433 return si_buffer_get_transfer(ctx, resource, usage, box, ptransfer, data, staging,
453 box->width + (box->x % SI_MAP_BUFFER_ALIGNMENT), 256);
456 si_copy_buffer(sctx, &staging->b.b, resource, box->x % SI_MAP_BUFFER_ALIGNMENT,
457 box->x, box->width, SI_OP_SYNC_BEFORE_AFTER);
464 data += box->x % SI_MAP_BUFFER_ALIGNMENT;
466 return si_buffer_get_transfer(ctx, resource, usage, box, ptransfer, data, staging, 0);
476 data += box->x;
478 return si_buffer_get_transfer(ctx, resource, usage, box, ptransfer, data, NULL, 0);
482 const struct pipe_box *box)
490 stransfer->b.b.offset + transfer->box.x % SI_MAP_BUFFER_ALIGNMENT + (box->x - transfer->box.x);
493 si_copy_buffer(sctx, transfer->resource, &stransfer->staging->b.b, box->x, src_offset,
494 box->width, SI_OP_SYNC_BEFORE_AFTER);
497 util_range_add(&buf->b.b, &buf->valid_buffer_range, box->x, box->x + box->width);
506 struct pipe_box box;
508 u_box_1d(transfer->box.x + rel_box->x, rel_box->width, &box);
509 si_buffer_do_flush_region(ctx, transfer, &box);
519 si_buffer_do_flush_region(ctx, transfer, &transfer->box);
543 struct pipe_box box;
551 u_box_1d(offset, size, &box);
552 map = si_buffer_transfer_map(ctx, buffer, 0, usage, &box, &transfer);
726 struct pipe_box *box, bool commit)
728 return ctx->ws->buffer_commit(ctx->ws, res->buf, box->x, box->width, commit);
732 unsigned level, struct pipe_box *box, bool commit)
751 return si_buffer_commit(ctx, res, box, commit);
753 return si_texture_commit(ctx, res, level, box, commit);