Lines Matching refs:ptrans
610 struct pipe_transfer *ptrans;
654 ptrans = &trans->base;
656 pipe_resource_reference(&ptrans->resource, pres);
657 ptrans->level = level;
658 ptrans->usage = usage;
659 ptrans->box = *box;
661 *pptrans = ptrans;
664 ptrans->stride = util_format_get_stride(pres->format, ptrans->box.width);
665 ptrans->layer_stride = ptrans->stride * ptrans->box.height;
667 trans->staging = malloc(ptrans->stride * ptrans->box.height * ptrans->box.depth);
675 for (i = 0; i < ptrans->box.depth; i++)
677 trans->staging + i * ptrans->stride * ptrans->box.height,
679 ptrans->box.x, ptrans->box.y,
680 ptrans->box.width, ptrans->box.height,
681 ptrans->stride,
693 ptrans->stride = res->levels[level].stride;
694 ptrans->layer_stride = res->levels[level].layer_stride;
697 panfrost_minmax_cache_invalidate(res->index_cache, ptrans);
701 box->y / util_format_get_blockheight(pres->format) * ptrans->stride +
709 struct pipe_transfer *ptrans)
726 ptrans->box.width == res->base.width0 &&
727 ptrans->box.height == res->base.height0 &&
728 ptrans->box.depth == depth &&
729 ptrans->box.x == 0 &&
730 ptrans->box.y == 0 &&
731 ptrans->box.z == 0;
741 struct pipe_transfer *ptrans,
745 struct lima_resource *res = lima_resource(ptrans->resource);
746 struct lima_transfer *trans = lima_transfer(ptrans);
754 if (lima_should_convert_linear(res, ptrans)) {
763 ptrans->box.width,
764 ptrans->box.height,
765 trans->staging + i * ptrans->stride * ptrans->box.height,
766 ptrans->stride,
774 unsigned line_stride = res->levels[ptrans->level].stride;
781 trans->staging + i * ptrans->stride * ptrans->box.height,
782 ptrans->box.x, ptrans->box.y,
783 ptrans->box.width, ptrans->box.height,
785 ptrans->stride,
794 struct pipe_transfer *ptrans)
797 struct lima_transfer *trans = lima_transfer(ptrans);
798 struct lima_resource *res = lima_resource(ptrans->resource);
801 u_box_2d(0, 0, ptrans->box.width, ptrans->box.height, &box);
802 lima_transfer_flush_region(pctx, ptrans, &box);
805 panfrost_minmax_cache_invalidate(res->index_cache, ptrans);
807 pipe_resource_reference(&ptrans->resource, NULL);