Lines Matching refs:xfer
1803 iris_flush_staging_region(struct pipe_transfer *xfer, in iris_flush_staging_region() argument
1806 if (!(xfer->usage & PIPE_MAP_WRITE)) in iris_flush_staging_region()
1809 struct iris_transfer *map = (void *) xfer; in iris_flush_staging_region()
1814 if (xfer->resource->target == PIPE_BUFFER) in iris_flush_staging_region()
1815 src_box.x += xfer->box.x % IRIS_MAP_BUFFER_ALIGNMENT; in iris_flush_staging_region()
1818 .x = xfer->box.x + flush_box->x, in iris_flush_staging_region()
1819 .y = xfer->box.y + flush_box->y, in iris_flush_staging_region()
1820 .z = xfer->box.z + flush_box->z, in iris_flush_staging_region()
1826 iris_copy_region(map->blorp, map->batch, xfer->resource, xfer->level, in iris_flush_staging_region()
1843 struct pipe_transfer *xfer = &map->base.b; in iris_map_copy_region() local
1844 struct pipe_box *box = &xfer->box; in iris_map_copy_region()
1845 struct iris_resource *res = (void *) xfer->resource; in iris_map_copy_region()
1847 unsigned extra = xfer->resource->target == PIPE_BUFFER ? in iris_map_copy_region()
1855 .nr_samples = xfer->resource->nr_samples, in iris_map_copy_region()
1856 .nr_storage_samples = xfer->resource->nr_storage_samples, in iris_map_copy_region()
1861 if (xfer->resource->target == PIPE_BUFFER) in iris_map_copy_region()
1873 xfer->stride = isl_surf_get_row_pitch_B(surf); in iris_map_copy_region()
1874 xfer->layer_stride = isl_surf_get_array_pitch(surf); in iris_map_copy_region()
1877 if (!(xfer->usage & PIPE_MAP_DISCARD_RANGE)) { in iris_map_copy_region()
1879 xfer->resource, xfer->level, box); in iris_map_copy_region()
1894 iris_bo_map(map->dbg, staging_bo, xfer->usage & MAP_FLAGS) + extra; in iris_map_copy_region()
1962 struct pipe_transfer *xfer = &map->base.b; in iris_unmap_s8() local
1963 const struct pipe_box *box = &xfer->box; in iris_unmap_s8()
1964 struct iris_resource *res = (struct iris_resource *) xfer->resource; in iris_unmap_s8()
1967 if (xfer->usage & PIPE_MAP_WRITE) { in iris_unmap_s8()
1970 iris_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS); in iris_unmap_s8()
1974 get_image_offset_el(surf, xfer->level, box->z + s, &x0_el, &y0_el); in iris_unmap_s8()
1982 untiled_s8_map[s * xfer->layer_stride + y * xfer->stride + x]; in iris_unmap_s8()
1994 struct pipe_transfer *xfer = &map->base.b; in iris_map_s8() local
1995 const struct pipe_box *box = &xfer->box; in iris_map_s8()
1996 struct iris_resource *res = (struct iris_resource *) xfer->resource; in iris_map_s8()
1999 xfer->stride = surf->row_pitch_B; in iris_map_s8()
2000 xfer->layer_stride = xfer->stride * box->height; in iris_map_s8()
2006 map->buffer = map->ptr = malloc(xfer->layer_stride * box->depth); in iris_map_s8()
2014 if (!(xfer->usage & PIPE_MAP_DISCARD_RANGE)) { in iris_map_s8()
2017 iris_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS); in iris_map_s8()
2021 get_image_offset_el(surf, xfer->level, box->z + s, &x0_el, &y0_el); in iris_map_s8()
2028 untiled_s8_map[s * xfer->layer_stride + y * xfer->stride + x] = in iris_map_s8()
2066 struct pipe_transfer *xfer = &map->base.b; in iris_unmap_tiled_memcpy() local
2067 const struct pipe_box *box = &xfer->box; in iris_unmap_tiled_memcpy()
2068 struct iris_resource *res = (struct iris_resource *) xfer->resource; in iris_unmap_tiled_memcpy()
2073 if (xfer->usage & PIPE_MAP_WRITE) { in iris_unmap_tiled_memcpy()
2075 iris_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS); in iris_unmap_tiled_memcpy()
2079 tile_extents(surf, box, xfer->level, s, &x1, &x2, &y1, &y2); in iris_unmap_tiled_memcpy()
2081 void *ptr = map->ptr + s * xfer->layer_stride; in iris_unmap_tiled_memcpy()
2084 surf->row_pitch_B, xfer->stride, in iris_unmap_tiled_memcpy()
2095 struct pipe_transfer *xfer = &map->base.b; in iris_map_tiled_memcpy() local
2096 const struct pipe_box *box = &xfer->box; in iris_map_tiled_memcpy()
2097 struct iris_resource *res = (struct iris_resource *) xfer->resource; in iris_map_tiled_memcpy()
2100 xfer->stride = ALIGN(surf->row_pitch_B, 16); in iris_map_tiled_memcpy()
2101 xfer->layer_stride = xfer->stride * box->height; in iris_map_tiled_memcpy()
2104 tile_extents(surf, box, xfer->level, 0, &x1, &x2, &y1, &y2); in iris_map_tiled_memcpy()
2111 os_malloc_aligned(xfer->layer_stride * box->depth, 16); in iris_map_tiled_memcpy()
2117 if (!(xfer->usage & PIPE_MAP_DISCARD_RANGE)) { in iris_map_tiled_memcpy()
2119 iris_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS); in iris_map_tiled_memcpy()
2123 tile_extents(surf, box, xfer->level, s, &x1, &x2, &y1, &y2); in iris_map_tiled_memcpy()
2126 void *ptr = map->ptr + s * xfer->layer_stride; in iris_map_tiled_memcpy()
2128 isl_memcpy_tiled_to_linear(x1, x2, y1, y2, ptr, src, xfer->stride, in iris_map_tiled_memcpy()
2140 struct pipe_transfer *xfer = &map->base.b; in iris_map_direct() local
2141 struct pipe_box *box = &xfer->box; in iris_map_direct()
2142 struct iris_resource *res = (struct iris_resource *) xfer->resource; in iris_map_direct()
2144 void *ptr = iris_bo_map(map->dbg, res->bo, xfer->usage & MAP_FLAGS); in iris_map_direct()
2147 xfer->stride = 0; in iris_map_direct()
2148 xfer->layer_stride = 0; in iris_map_direct()
2158 get_image_offset_el(surf, xfer->level, box->z, &x0_el, &y0_el); in iris_map_direct()
2160 xfer->stride = isl_surf_get_row_pitch_B(surf); in iris_map_direct()
2161 xfer->layer_stride = isl_surf_get_array_pitch(surf); in iris_map_direct()
2163 map->ptr = ptr + (y0_el + box->y) * xfer->stride + (x0_el + box->x) * cpp; in iris_map_direct()
2248 struct pipe_transfer *xfer = &map->base.b; in iris_transfer_map() local
2253 pipe_resource_reference(&xfer->resource, resource); in iris_transfer_map()
2254 xfer->level = level; in iris_transfer_map()
2255 xfer->usage = usage; in iris_transfer_map()
2256 xfer->box = *box; in iris_transfer_map()
2257 *ptransfer = xfer; in iris_transfer_map()
2337 struct pipe_transfer *xfer, in iris_transfer_flush_region() argument
2341 struct iris_resource *res = (struct iris_resource *) xfer->resource; in iris_transfer_flush_region()
2342 struct iris_transfer *map = (void *) xfer; in iris_transfer_flush_region()
2345 iris_flush_staging_region(xfer, box); in iris_transfer_flush_region()
2379 iris_transfer_unmap(struct pipe_context *ctx, struct pipe_transfer *xfer) in iris_transfer_unmap() argument
2382 struct iris_transfer *map = (void *) xfer; in iris_transfer_unmap()
2384 if (!(xfer->usage & (PIPE_MAP_FLUSH_EXPLICIT | in iris_transfer_unmap()
2388 .width = xfer->box.width, in iris_transfer_unmap()
2389 .height = xfer->box.height, in iris_transfer_unmap()
2390 .depth = xfer->box.depth, in iris_transfer_unmap()
2392 iris_transfer_flush_region(ctx, xfer, &flush_box); in iris_transfer_unmap()
2398 pipe_resource_reference(&xfer->resource, NULL); in iris_transfer_unmap()