Lines Matching defs:box
90 const struct pipe_box *box);
1263 struct pipe_box box = {0, 0, 0,
1266 box.depth = util_num_layers(&res->base.b, i);
1267 ctx->base.resource_copy_region(&ctx->base, &res->base.b, i, 0, 0, 0, &staging.base.b, i, &box);
1630 struct pipe_box box = trans->base.b.box;
1631 int x = box.x;
1633 box.x = trans->offset;
1637 box.y, box.z, trans->base.b.level, &box, trans->base.b.usage);
1640 x, box.y, box.z, &src->base.b,
1641 0, &box);
1689 create_transfer(struct zink_context *ctx, struct pipe_resource *pres, unsigned usage, const struct pipe_box *box)
1705 trans->base.b.box = *box;
1727 const struct pipe_box *box,
1733 struct zink_transfer *trans = create_transfer(ctx, pres, usage, box);
1746 !util_ranges_intersect(&res->valid_buffer_range, box->x, box->x + box->width)) {
1751 if (usage & PIPE_MAP_DISCARD_RANGE && box->x == 0 && box->width == res->base.b.width0) {
1780 unsigned map_offset = box->x;
1802 u_upload_alloc(mgr, 0, box->width,
1824 trans->offset = box->x % screen->info.props.limits.minMemoryMapAlignment;
1825 trans->staging_res = pipe_buffer_create(&screen->base, PIPE_BIND_LINEAR, PIPE_USAGE_STAGING, box->width + trans->offset);
1829 zink_copy_buffer(ctx, staging_res, res, trans->offset, box->x, box->width);
1835 trans->offset = box->x % screen->info.props.limits.minMemoryMapAlignment;
1836 trans->staging_res = pipe_buffer_create(&screen->base, PIPE_BIND_LINEAR, PIPE_USAGE_STAGING, box->width + trans->offset);
1876 VkDeviceSize size = box->width;
1887 util_range_add(&res->base.b, &res->valid_buffer_range, box->x, box->x + box->width);
1905 const struct pipe_box *box,
1911 struct zink_transfer *trans = create_transfer(ctx, pres, usage, box);
1923 zink_fb_clears_apply_or_discard(ctx, pres, zink_rect_from_box(box), false);
1926 zink_fb_clears_apply_region(ctx, pres, zink_rect_from_box(box));
1933 trans->base.b.stride = util_format_get_stride(format, box->width);
1936 box->height);
1944 templ.width0 = trans->base.b.layer_stride * box->depth;
1993 box->z * srl.depthPitch +
1994 (box->y / desc->block.height) * srl.rowPitch +
1995 (box->x / desc->block.width) * (desc->block.bits / 8);
1997 VkDeviceSize size = (VkDeviceSize)box->width * box->height * desc->block.bits / 8;
2029 const struct pipe_box *box)
2041 size = box->width;
2042 src_offset = box->x + (trans->staging_res ? trans->offset : ptrans->box.x);
2043 dst_offset = box->x + ptrans->box.x;
2045 size = (VkDeviceSize)box->width * box->height * util_format_get_blocksize(m->base.b.format);
2047 box->z * trans->depthPitch +
2048 util_format_get_2d_size(m->base.b.format, trans->base.b.stride, box->y) +
2049 util_format_get_stride(m->base.b.format, box->x);
2078 struct pipe_box box = ptrans->box;
2079 box.x = box.y = box.z = 0;
2080 zink_transfer_flush_region(pctx, ptrans, &box);
2127 struct pipe_box box;
2135 u_box_1d(offset, size, &box);
2136 map = zink_buffer_map(ctx, buffer, 0, usage, &box, &transfer);