• Home
  • Raw
  • Download

Lines Matching refs:ptrans

74                             struct pipe_transfer *ptrans)  in vc4_resource_transfer_unmap()  argument
77 struct vc4_transfer *trans = vc4_transfer(ptrans); in vc4_resource_transfer_unmap()
80 struct vc4_resource *rsc = vc4_resource(ptrans->resource); in vc4_resource_transfer_unmap()
81 struct vc4_resource_slice *slice = &rsc->slices[ptrans->level]; in vc4_resource_transfer_unmap()
83 if (ptrans->usage & PIPE_MAP_WRITE) { in vc4_resource_transfer_unmap()
85 ptrans->box.z * rsc->cube_map_stride, in vc4_resource_transfer_unmap()
87 trans->map, ptrans->stride, in vc4_resource_transfer_unmap()
89 &ptrans->box); in vc4_resource_transfer_unmap()
94 pipe_resource_reference(&ptrans->resource, NULL); in vc4_resource_transfer_unmap()
95 slab_free(&vc4->transfer_pool, ptrans); in vc4_resource_transfer_unmap()
108 struct pipe_transfer *ptrans; in vc4_resource_transfer_map() local
164 ptrans = &trans->base; in vc4_resource_transfer_map()
166 pipe_resource_reference(&ptrans->resource, prsc); in vc4_resource_transfer_map()
167 ptrans->level = level; in vc4_resource_transfer_map()
168 ptrans->usage = usage; in vc4_resource_transfer_map()
169 ptrans->box = *box; in vc4_resource_transfer_map()
180 *pptrans = ptrans; in vc4_resource_transfer_map()
196 assert(!(ptrans->box.x & 3)); in vc4_resource_transfer_map()
197 assert(!(ptrans->box.y & 3)); in vc4_resource_transfer_map()
198 ptrans->box.x >>= 2; in vc4_resource_transfer_map()
199 ptrans->box.y >>= 2; in vc4_resource_transfer_map()
200 ptrans->box.width = (ptrans->box.width + 3) >> 2; in vc4_resource_transfer_map()
201 ptrans->box.height = (ptrans->box.height + 3) >> 2; in vc4_resource_transfer_map()
204 ptrans->stride = ptrans->box.width * rsc->cpp; in vc4_resource_transfer_map()
205 ptrans->layer_stride = ptrans->stride * ptrans->box.height; in vc4_resource_transfer_map()
207 trans->map = malloc(ptrans->layer_stride * ptrans->box.depth); in vc4_resource_transfer_map()
210 vc4_load_tiled_image(trans->map, ptrans->stride, in vc4_resource_transfer_map()
212 ptrans->box.z * rsc->cube_map_stride, in vc4_resource_transfer_map()
215 &ptrans->box); in vc4_resource_transfer_map()
219 ptrans->stride = slice->stride; in vc4_resource_transfer_map()
220 ptrans->layer_stride = ptrans->stride; in vc4_resource_transfer_map()
223 ptrans->box.y / util_format_get_blockheight(format) * ptrans->stride + in vc4_resource_transfer_map()
224 ptrans->box.x / util_format_get_blockwidth(format) * rsc->cpp + in vc4_resource_transfer_map()
225 ptrans->box.z * rsc->cube_map_stride; in vc4_resource_transfer_map()
230 vc4_resource_transfer_unmap(pctx, ptrans); in vc4_resource_transfer_map()