Lines Matching refs:ptrans
74 struct pipe_transfer *ptrans)
77 struct vc4_transfer *trans = vc4_transfer(ptrans);
80 struct vc4_resource *rsc = vc4_resource(ptrans->resource);
81 struct vc4_resource_slice *slice = &rsc->slices[ptrans->level];
83 if (ptrans->usage & PIPE_MAP_WRITE) {
85 ptrans->box.z * rsc->cube_map_stride,
87 trans->map, ptrans->stride,
89 &ptrans->box);
94 pipe_resource_reference(&ptrans->resource, NULL);
95 slab_free(&vc4->transfer_pool, ptrans);
108 struct pipe_transfer *ptrans;
162 ptrans = &trans->base;
164 pipe_resource_reference(&ptrans->resource, prsc);
165 ptrans->level = level;
166 ptrans->usage = usage;
167 ptrans->box = *box;
178 *pptrans = ptrans;
189 u_box_pixels_to_blocks(&ptrans->box, &ptrans->box, format);
191 ptrans->stride = ptrans->box.width * rsc->cpp;
192 ptrans->layer_stride = ptrans->stride * ptrans->box.height;
194 trans->map = malloc(ptrans->layer_stride * ptrans->box.depth);
197 vc4_load_tiled_image(trans->map, ptrans->stride,
199 ptrans->box.z * rsc->cube_map_stride,
202 &ptrans->box);
206 ptrans->stride = slice->stride;
207 ptrans->layer_stride = ptrans->stride;
210 ptrans->box.y / util_format_get_blockheight(format) * ptrans->stride +
211 ptrans->box.x / util_format_get_blockwidth(format) * rsc->cpp +
212 ptrans->box.z * rsc->cube_map_stride;
217 vc4_resource_transfer_unmap(pctx, ptrans);