Lines Matching defs:box
1208 src_box.x += xfer->box.x % CROCUS_MAP_BUFFER_ALIGNMENT;
1211 .x = xfer->box.x + flush_box->x,
1212 .y = xfer->box.y + flush_box->y,
1213 .z = xfer->box.z + flush_box->z,
1237 struct pipe_box *box = &xfer->box;
1241 box->x % CROCUS_MAP_BUFFER_ALIGNMENT : 0;
1245 .width0 = box->width + extra,
1246 .height0 = box->height,
1250 .array_size = box->depth,
1272 xfer->resource, xfer->level, box);
1374 const struct pipe_box *box = &xfer->box;
1383 for (int s = 0; s < box->depth; s++) {
1385 get_image_offset_el(surf, xfer->level, box->z + s, &x0_el, &y0_el);
1387 for (uint32_t y = 0; y < box->height; y++) {
1388 for (uint32_t x = 0; x < box->width; x++) {
1390 x0_el + box->x + x,
1391 y0_el + box->y + y,
1407 const struct pipe_box *box = &xfer->box;
1412 xfer->layer_stride = xfer->stride * box->height;
1418 map->buffer = map->ptr = malloc(xfer->layer_stride * box->depth);
1431 for (int s = 0; s < box->depth; s++) {
1433 get_image_offset_el(surf, xfer->level, box->z + s, &x0_el, &y0_el);
1435 for (uint32_t y = 0; y < box->height; y++) {
1436 for (uint32_t x = 0; x < box->width; x++) {
1438 x0_el + box->x + x,
1439 y0_el + box->y + y,
1456 const struct pipe_box *box,
1464 assert(box->x % fmtl->bw == 0);
1465 assert(box->y % fmtl->bh == 0);
1468 get_image_offset_el(surf, level, box->z + z, &x0_el, &y0_el);
1470 *x1_B = (box->x / fmtl->bw + x0_el) * cpp;
1471 *y1_el = box->y / fmtl->bh + y0_el;
1472 *x2_B = (DIV_ROUND_UP(box->x + box->width, fmtl->bw) + x0_el) * cpp;
1473 *y2_el = DIV_ROUND_UP(box->y + box->height, fmtl->bh) + y0_el;
1480 const struct pipe_box *box = &xfer->box;
1488 for (int s = 0; s < box->depth; s++) {
1490 tile_extents(surf, box, xfer->level, s, &x1, &x2, &y1, &y2);
1508 const struct pipe_box *box = &xfer->box;
1513 xfer->layer_stride = xfer->stride * box->height;
1516 tile_extents(surf, box, xfer->level, 0, &x1, &x2, &y1, &y2);
1523 os_malloc_aligned(xfer->layer_stride * box->depth, 16);
1531 for (int s = 0; s < box->depth; s++) {
1533 tile_extents(surf, box, xfer->level, s, &x1, &x2, &y1, &y2);
1535 /* Use 's' rather than 'box->z' to rebase the first slice to 0. */
1556 struct pipe_box *box = &xfer->box;
1565 map->ptr = ptr + box->x;
1573 assert(box->x % fmtl->bw == 0);
1574 assert(box->y % fmtl->bh == 0);
1575 get_image_offset_el(surf, xfer->level, box->z, &x0_el, &y0_el);
1577 x0_el += box->x / fmtl->bw;
1578 y0_el += box->y / fmtl->bh;
1589 const struct pipe_box *box,
1598 !util_ranges_intersect(&res->valid_buffer_range, box->x,
1599 box->x + box->width);
1607 const struct pipe_box *box,
1626 can_promote_to_async(res, box, usage)) {
1634 crocus_has_invalid_primary(res, level, 1, box->z, box->depth);
1663 xfer->box = *box;
1667 util_ranges_intersect(&res->valid_buffer_range, box->x,
1668 box->x + box->width);
1671 util_range_add(&res->base.b, &res->valid_buffer_range, box->x, box->x + box->width);
1693 !crocus_has_invalid_primary(res, level, 1, box->z, box->depth))
1712 level, box->z, box->depth,
1739 const struct pipe_box *box)
1746 crocus_flush_staging_region(xfer, box);
1757 util_range_add(&res->base.b, &res->valid_buffer_range, box->x, box->x + box->width);
1791 .width = xfer->box.width,
1792 .height = xfer->box.height,
1793 .depth = xfer->box.depth,