Lines Matching refs:box
388 buf_loc.PlacedFootprint.Footprint.Width = ALIGN(trans->base.box.width, in fill_buffer_location()
390 buf_loc.PlacedFootprint.Footprint.Height = ALIGN(trans->base.box.height, in fill_buffer_location()
435 trans->base.box.x, trans->base.box.y, trans->base.box.z, in transfer_buf_to_image_part()
436 trans->base.box.width, trans->base.box.height, trans->base.box.depth, in transfer_buf_to_image_part()
448 copy_info.dst_x = trans->base.box.x; in transfer_buf_to_image_part()
449 copy_info.dst_y = trans->base.box.y; in transfer_buf_to_image_part()
465 0, trans->base.box.depth, 0, in transfer_buf_to_image()
466 trans->base.box.z, 0); in transfer_buf_to_image()
468 int num_layers = trans->base.box.depth; in transfer_buf_to_image()
469 int start_z = trans->base.box.z; in transfer_buf_to_image()
487 struct pipe_box *box = &trans->base.box; in transfer_image_part_to_buf() local
501 box->x, box->y, start_box_z, in transfer_image_part_to_buf()
502 box->width, box->height, depth)) { in transfer_image_part_to_buf()
503 src_box.left = box->x; in transfer_image_part_to_buf()
504 src_box.right = box->x + box->width; in transfer_image_part_to_buf()
505 src_box.top = box->y; in transfer_image_part_to_buf()
506 src_box.bottom = box->y + box->height; in transfer_image_part_to_buf()
526 assert(resid == 0 || trans->base.box.depth == 1); in transfer_image_to_buf()
530 trans->base.box.x, trans->base.box.y, trans->base.box.z, in transfer_image_to_buf()
531 trans->base.box.width, trans->base.box.height, trans->base.box.depth, in transfer_image_to_buf()
542 …struct pipe_box box = {0,0,0, (int)res->base.width0, (int16_t)res->base.height0, (int16_t)res->bas… in transfer_image_to_buf() local
544 resolve_info.dst.box = box; in transfer_image_to_buf()
547 resolve_info.src.box = box; in transfer_image_to_buf()
561 0, 0, trans->base.box.z, trans->base.box.depth); in transfer_image_to_buf()
563 int start_layer = trans->base.box.z; in transfer_image_to_buf()
564 for (int z = start_layer; z < start_layer + trans->base.box.depth; ++z) { in transfer_image_to_buf()
614 linear_range(const struct pipe_box *box, unsigned stride, unsigned layer_stride) in linear_range() argument
618 range.Begin = linear_offset(box->x, box->y, box->z, in linear_range()
620 range.End = linear_offset(box->x + box->width, in linear_range()
621 box->y + box->height - 1, in linear_range()
622 box->z + box->depth - 1, in linear_range()
709 const struct pipe_box *box, in prepare_zs_layer_strides() argument
712 trans->base.stride = align(util_format_get_stride(res->base.format, box->width), in prepare_zs_layer_strides()
716 box->height); in prepare_zs_layer_strides()
721 const struct pipe_box *box, in read_zs_surface() argument
726 prepare_zs_layer_strides(res, box, trans); in read_zs_surface()
785 trans->base.box.width, trans->base.box.height); in read_zs_surface()
790 trans->base.box.width, trans->base.box.height); in read_zs_surface()
793 trans->base.box.width, trans->base.box.height); in read_zs_surface()
804 const struct pipe_box *box, in prepare_write_zs_surface() argument
807 prepare_zs_layer_strides(res, box, trans); in prepare_write_zs_surface()
859 trans->base.stride, trans->base.box.width, in write_zs_surface()
860 trans->base.box.height); in write_zs_surface()
862 trans->base.stride, trans->base.box.width, in write_zs_surface()
863 trans->base.box.height); in write_zs_surface()
867 trans->base.stride, trans->base.box.width, in write_zs_surface()
868 trans->base.box.height); in write_zs_surface()
870 trans->base.stride, trans->base.box.width, in write_zs_surface()
871 trans->base.box.height); in write_zs_surface()
891 const struct pipe_box *box, in d3d12_transfer_map() argument
911 ptrans->box = *box; in d3d12_transfer_map()
922 ptrans->stride = util_format_get_stride(pres->format, box->width); in d3d12_transfer_map()
925 box->height); in d3d12_transfer_map()
928 range = linear_range(box, ptrans->stride, ptrans->layer_stride); in d3d12_transfer_map()
935 ptr = read_zs_surface(ctx, res, box, trans); in d3d12_transfer_map()
937 ptr = prepare_write_zs_surface(res, box, trans); in d3d12_transfer_map()
942 ptrans->stride = align(util_format_get_stride(pres->format, box->width), in d3d12_transfer_map()
946 box->height); in d3d12_transfer_map()
952 unsigned staging_res_size = ptrans->layer_stride * box->depth; in d3d12_transfer_map()
957 assert(box->x >= 0); in d3d12_transfer_map()
958 unsigned aligned_x = (unsigned)box->x % BUFFER_MAP_ALIGNMENT; in d3d12_transfer_map()
959 staging_res_size = align(box->width + aligned_x, in d3d12_transfer_map()
978 uint64_t src_offset = box->x; in d3d12_transfer_map()
980 transfer_buf_to_buf(ctx, res, staging_res, src_offset, dst_offset, box->width); in d3d12_transfer_map()
1013 assert(ptrans->box.x >= 0); in d3d12_transfer_unmap()
1015 (unsigned)ptrans->box.x % BUFFER_MAP_ALIGNMENT : 0; in d3d12_transfer_unmap()
1023 uint64_t dst_offset = trans->base.box.x; in d3d12_transfer_unmap()
1025 transfer_buf_to_buf(ctx, staging_res, res, src_offset, dst_offset, ptrans->box.width); in d3d12_transfer_unmap()
1033 range.Begin = ptrans->box.x; in d3d12_transfer_unmap()
1034 range.End = ptrans->box.x + ptrans->box.width; in d3d12_transfer_unmap()
1060 struct pipe_box box; in d3d12_resource_make_writeable() local
1062 box.x = res->valid_buffer_range.start; in d3d12_resource_make_writeable()
1063 box.y = 0; in d3d12_resource_make_writeable()
1064 box.z = 0; in d3d12_resource_make_writeable()
1065 box.width = res->valid_buffer_range.end - res->valid_buffer_range.start; in d3d12_resource_make_writeable()
1066 box.height = 1; in d3d12_resource_make_writeable()
1067 box.depth = 1; in d3d12_resource_make_writeable()
1069 d3d12_direct_copy(ctx, dup_res, 0, &box, res, 0, &box, PIPE_MASK_RGBAZS); in d3d12_resource_make_writeable()