• Home
  • Raw
  • Download

Lines Matching refs:trans

297 fd_resource_flush_z32s8(struct fd_transfer *trans, const struct pipe_box *box)  in fd_resource_flush_z32s8()  argument
299 struct fd_resource *rsc = fd_resource(trans->base.resource); in fd_resource_flush_z32s8()
300 struct fd_resource_slice *slice = fd_resource_slice(rsc, trans->base.level); in fd_resource_flush_z32s8()
301 struct fd_resource_slice *sslice = fd_resource_slice(rsc->stencil, trans->base.level); in fd_resource_flush_z32s8()
302 enum pipe_format format = trans->base.resource->format; in fd_resource_flush_z32s8()
305 fd_resource_layer_offset(rsc, slice, trans->base.box.z) + in fd_resource_flush_z32s8()
306 (trans->base.box.y + box->y) * slice->pitch * 4 + (trans->base.box.x + box->x) * 4; in fd_resource_flush_z32s8()
308 fd_resource_layer_offset(rsc->stencil, sslice, trans->base.box.z) + in fd_resource_flush_z32s8()
309 (trans->base.box.y + box->y) * sslice->pitch + trans->base.box.x + box->x; in fd_resource_flush_z32s8()
314 trans->staging, trans->base.stride, in fd_resource_flush_z32s8()
319 trans->staging, trans->base.stride, in fd_resource_flush_z32s8()
324 fd_resource_flush_rgtc(struct fd_transfer *trans, const struct pipe_box *box) in fd_resource_flush_rgtc() argument
326 struct fd_resource *rsc = fd_resource(trans->base.resource); in fd_resource_flush_rgtc()
327 struct fd_resource_slice *slice = fd_resource_slice(rsc, trans->base.level); in fd_resource_flush_rgtc()
328 enum pipe_format format = trans->base.resource->format; in fd_resource_flush_rgtc()
331 fd_resource_layer_offset(rsc, slice, trans->base.box.z) + in fd_resource_flush_rgtc()
332 ((trans->base.box.y + box->y) * slice->pitch + in fd_resource_flush_rgtc()
333 trans->base.box.x + box->x) * rsc->cpp; in fd_resource_flush_rgtc()
335 uint8_t *source = trans->staging + in fd_resource_flush_rgtc()
336 util_format_get_nblocksy(format, box->y) * trans->base.stride + in fd_resource_flush_rgtc()
346 source, trans->base.stride, in fd_resource_flush_rgtc()
355 source, trans->base.stride, in fd_resource_flush_rgtc()
365 fd_resource_flush(struct fd_transfer *trans, const struct pipe_box *box) in fd_resource_flush() argument
367 enum pipe_format format = trans->base.resource->format; in fd_resource_flush()
372 fd_resource_flush_z32s8(trans, box); in fd_resource_flush()
382 fd_resource_flush_rgtc(trans, box); in fd_resource_flush()
395 struct fd_transfer *trans = fd_transfer(ptrans); in fd_resource_transfer_flush_region() local
402 if (trans->staging) in fd_resource_transfer_flush_region()
403 fd_resource_flush(trans, box); in fd_resource_transfer_flush_region()
412 struct fd_transfer *trans = fd_transfer(ptrans); in fd_resource_transfer_unmap() local
414 if (trans->staging && !(ptrans->usage & PIPE_TRANSFER_FLUSH_EXPLICIT)) { in fd_resource_transfer_unmap()
417 fd_resource_flush(trans, &box); in fd_resource_transfer_unmap()
433 free(trans->staging); in fd_resource_transfer_unmap()
446 struct fd_transfer *trans; in fd_resource_transfer_map() local
462 trans = fd_transfer(ptrans); in fd_resource_transfer_map()
463 memset(trans, 0, sizeof(*trans)); in fd_resource_transfer_map()
568 assert(trans->base.box.depth == 1); in fd_resource_transfer_map()
570 trans->base.stride = trans->base.box.width * rsc->cpp * 2; in fd_resource_transfer_map()
571 trans->staging = malloc(trans->base.stride * trans->base.box.height); in fd_resource_transfer_map()
572 if (!trans->staging) in fd_resource_transfer_map()
595 trans->staging, trans->base.stride, in fd_resource_transfer_map()
600 trans->staging, trans->base.stride, in fd_resource_transfer_map()
605 buf = trans->staging; in fd_resource_transfer_map()
609 assert(trans->base.box.depth == 1); in fd_resource_transfer_map()
611 trans->base.stride = util_format_get_stride( in fd_resource_transfer_map()
612 format, trans->base.box.width); in fd_resource_transfer_map()
613 trans->staging = malloc( in fd_resource_transfer_map()
614 util_format_get_2d_size(format, trans->base.stride, in fd_resource_transfer_map()
615 trans->base.box.height)); in fd_resource_transfer_map()
616 if (!trans->staging) in fd_resource_transfer_map()
634 trans->staging, trans->base.stride, in fd_resource_transfer_map()
643 trans->staging, trans->base.stride, in fd_resource_transfer_map()
653 buf = trans->staging; in fd_resource_transfer_map()