Lines Matching refs:ptrans
116 struct pipe_transfer *ptrans)
119 struct v3d_transfer *trans = v3d_transfer(ptrans);
122 struct v3d_resource *rsc = v3d_resource(ptrans->resource);
123 struct v3d_resource_slice *slice = &rsc->slices[ptrans->level];
125 if (ptrans->usage & PIPE_MAP_WRITE) {
126 for (int z = 0; z < ptrans->box.depth; z++) {
129 ptrans->level,
130 ptrans->box.z + z);
134 ptrans->stride *
135 ptrans->box.height * z),
136 ptrans->stride,
139 &ptrans->box);
145 pipe_resource_reference(&ptrans->resource, NULL);
146 slab_free(&v3d->transfer_pool, ptrans);
239 struct pipe_transfer *ptrans;
269 ptrans = &trans->base;
271 pipe_resource_reference(&ptrans->resource, prsc);
272 ptrans->level = level;
273 ptrans->usage = usage;
274 ptrans->box = *box;
289 *pptrans = ptrans;
292 u_box_pixels_to_blocks(&ptrans->box, &ptrans->box, format);
302 ptrans->stride = ptrans->box.width * rsc->cpp;
303 ptrans->layer_stride = ptrans->stride * ptrans->box.height;
305 trans->map = malloc(ptrans->layer_stride * ptrans->box.depth);
308 for (int z = 0; z < ptrans->box.depth; z++) {
311 ptrans->level,
312 ptrans->box.z + z);
314 ptrans->stride *
315 ptrans->box.height * z),
316 ptrans->stride,
321 &ptrans->box);
326 ptrans->stride = slice->stride;
327 ptrans->layer_stride = rsc->cube_map_stride;
330 ptrans->box.y * ptrans->stride +
331 ptrans->box.x * rsc->cpp +
332 ptrans->box.z * rsc->cube_map_stride;
337 v3d_resource_transfer_unmap(pctx, ptrans);