• Home
  • Raw
  • Download

Lines Matching refs:xfer

1182 crocus_flush_staging_region(struct pipe_transfer *xfer,  in crocus_flush_staging_region()  argument
1185 if (!(xfer->usage & PIPE_MAP_WRITE)) in crocus_flush_staging_region()
1188 struct crocus_transfer *map = (void *) xfer; in crocus_flush_staging_region()
1193 if (xfer->resource->target == PIPE_BUFFER) in crocus_flush_staging_region()
1194 src_box.x += xfer->box.x % CROCUS_MAP_BUFFER_ALIGNMENT; in crocus_flush_staging_region()
1197 .x = xfer->box.x + flush_box->x, in crocus_flush_staging_region()
1198 .y = xfer->box.y + flush_box->y, in crocus_flush_staging_region()
1199 .z = xfer->box.z + flush_box->z, in crocus_flush_staging_region()
1205 crocus_copy_region(map->blorp, map->batch, xfer->resource, xfer->level, in crocus_flush_staging_region()
1222 struct pipe_transfer *xfer = &map->base.b; in crocus_map_copy_region() local
1223 struct pipe_box *box = &xfer->box; in crocus_map_copy_region()
1224 struct crocus_resource *res = (void *) xfer->resource; in crocus_map_copy_region()
1226 unsigned extra = xfer->resource->target == PIPE_BUFFER ? in crocus_map_copy_region()
1234 .nr_samples = xfer->resource->nr_samples, in crocus_map_copy_region()
1235 .nr_storage_samples = xfer->resource->nr_storage_samples, in crocus_map_copy_region()
1240 if (xfer->resource->target == PIPE_BUFFER) in crocus_map_copy_region()
1252 xfer->stride = isl_surf_get_row_pitch_B(surf); in crocus_map_copy_region()
1253 xfer->layer_stride = isl_surf_get_array_pitch(surf); in crocus_map_copy_region()
1256 if (!(xfer->usage & PIPE_MAP_DISCARD_RANGE)) { in crocus_map_copy_region()
1258 xfer->resource, xfer->level, box); in crocus_map_copy_region()
1272 crocus_bo_map(map->dbg, staging_bo, xfer->usage & MAP_FLAGS) + extra; in crocus_map_copy_region()
1359 struct pipe_transfer *xfer = &map->base.b; in crocus_unmap_s8() local
1360 const struct pipe_box *box = &xfer->box; in crocus_unmap_s8()
1361 struct crocus_resource *res = (struct crocus_resource *) xfer->resource; in crocus_unmap_s8()
1364 if (xfer->usage & PIPE_MAP_WRITE) { in crocus_unmap_s8()
1367 crocus_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS); in crocus_unmap_s8()
1371 get_image_offset_el(surf, xfer->level, box->z + s, &x0_el, &y0_el); in crocus_unmap_s8()
1380 untiled_s8_map[s * xfer->layer_stride + y * xfer->stride + x]; in crocus_unmap_s8()
1392 struct pipe_transfer *xfer = &map->base.b; in crocus_map_s8() local
1393 const struct pipe_box *box = &xfer->box; in crocus_map_s8()
1394 struct crocus_resource *res = (struct crocus_resource *) xfer->resource; in crocus_map_s8()
1397 xfer->stride = surf->row_pitch_B; in crocus_map_s8()
1398 xfer->layer_stride = xfer->stride * box->height; in crocus_map_s8()
1404 map->buffer = map->ptr = malloc(xfer->layer_stride * box->depth); in crocus_map_s8()
1412 if (!(xfer->usage & PIPE_MAP_DISCARD_RANGE)) { in crocus_map_s8()
1415 crocus_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS); in crocus_map_s8()
1419 get_image_offset_el(surf, xfer->level, box->z + s, &x0_el, &y0_el); in crocus_map_s8()
1427 untiled_s8_map[s * xfer->layer_stride + y * xfer->stride + x] = in crocus_map_s8()
1465 struct pipe_transfer *xfer = &map->base.b; in crocus_unmap_tiled_memcpy() local
1466 const struct pipe_box *box = &xfer->box; in crocus_unmap_tiled_memcpy()
1467 struct crocus_resource *res = (struct crocus_resource *) xfer->resource; in crocus_unmap_tiled_memcpy()
1470 if (xfer->usage & PIPE_MAP_WRITE) { in crocus_unmap_tiled_memcpy()
1472 crocus_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS); in crocus_unmap_tiled_memcpy()
1476 tile_extents(surf, box, xfer->level, s, &x1, &x2, &y1, &y2); in crocus_unmap_tiled_memcpy()
1478 void *ptr = map->ptr + s * xfer->layer_stride; in crocus_unmap_tiled_memcpy()
1481 surf->row_pitch_B, xfer->stride, in crocus_unmap_tiled_memcpy()
1493 struct pipe_transfer *xfer = &map->base.b; in crocus_map_tiled_memcpy() local
1494 const struct pipe_box *box = &xfer->box; in crocus_map_tiled_memcpy()
1495 struct crocus_resource *res = (struct crocus_resource *) xfer->resource; in crocus_map_tiled_memcpy()
1498 xfer->stride = ALIGN(surf->row_pitch_B, 16); in crocus_map_tiled_memcpy()
1499 xfer->layer_stride = xfer->stride * box->height; in crocus_map_tiled_memcpy()
1502 tile_extents(surf, box, xfer->level, 0, &x1, &x2, &y1, &y2); in crocus_map_tiled_memcpy()
1509 os_malloc_aligned(xfer->layer_stride * box->depth, 16); in crocus_map_tiled_memcpy()
1513 if (!(xfer->usage & PIPE_MAP_DISCARD_RANGE)) { in crocus_map_tiled_memcpy()
1515 crocus_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS); in crocus_map_tiled_memcpy()
1519 tile_extents(surf, box, xfer->level, s, &x1, &x2, &y1, &y2); in crocus_map_tiled_memcpy()
1522 void *ptr = map->ptr + s * xfer->layer_stride; in crocus_map_tiled_memcpy()
1524 isl_memcpy_tiled_to_linear(x1, x2, y1, y2, ptr, src, xfer->stride, in crocus_map_tiled_memcpy()
1541 struct pipe_transfer *xfer = &map->base.b; in crocus_map_direct() local
1542 struct pipe_box *box = &xfer->box; in crocus_map_direct()
1543 struct crocus_resource *res = (struct crocus_resource *) xfer->resource; in crocus_map_direct()
1545 void *ptr = crocus_bo_map(map->dbg, res->bo, xfer->usage & MAP_FLAGS); in crocus_map_direct()
1548 xfer->stride = 0; in crocus_map_direct()
1549 xfer->layer_stride = 0; in crocus_map_direct()
1561 get_image_offset_el(surf, xfer->level, box->z, &x0_el, &y0_el); in crocus_map_direct()
1566 xfer->stride = isl_surf_get_row_pitch_B(surf); in crocus_map_direct()
1567 xfer->layer_stride = isl_surf_get_array_pitch(surf); in crocus_map_direct()
1569 map->ptr = ptr + y0_el * xfer->stride + x0_el * cpp; in crocus_map_direct()
1638 struct pipe_transfer *xfer = &map->base.b; in crocus_transfer_map() local
1647 pipe_resource_reference(&xfer->resource, resource); in crocus_transfer_map()
1648 xfer->level = level; in crocus_transfer_map()
1649 xfer->usage = usage; in crocus_transfer_map()
1650 xfer->box = *box; in crocus_transfer_map()
1651 *ptransfer = xfer; in crocus_transfer_map()
1725 struct pipe_transfer *xfer, in crocus_transfer_flush_region() argument
1729 struct crocus_resource *res = (struct crocus_resource *) xfer->resource; in crocus_transfer_flush_region()
1730 struct crocus_transfer *map = (void *) xfer; in crocus_transfer_flush_region()
1733 crocus_flush_staging_region(xfer, box); in crocus_transfer_flush_region()
1769 crocus_transfer_unmap(struct pipe_context *ctx, struct pipe_transfer *xfer) in crocus_transfer_unmap() argument
1772 struct crocus_transfer *map = (void *) xfer; in crocus_transfer_unmap()
1774 if (!(xfer->usage & (PIPE_MAP_FLUSH_EXPLICIT | in crocus_transfer_unmap()
1778 .width = xfer->box.width, in crocus_transfer_unmap()
1779 .height = xfer->box.height, in crocus_transfer_unmap()
1780 .depth = xfer->box.depth, in crocus_transfer_unmap()
1782 crocus_transfer_flush_region(ctx, xfer, &flush_box); in crocus_transfer_unmap()
1788 pipe_resource_reference(&xfer->resource, NULL); in crocus_transfer_unmap()