Lines Matching defs:map

875           * Even if we wanted to, we can't initialize the CCS via CPU map. So,
893 * map and zero the CCS later on in iris_resource_init_aux_buf.
919 void *map = NULL;
923 if (!map)
924 map = iris_bo_map(NULL, res->bo, MAP_WRITE | MAP_RAW);
925 if (!map)
930 memset((char*)map + res->aux.offset, memset_value,
935 if (!map)
936 map = iris_bo_map(NULL, res->bo, MAP_WRITE | MAP_RAW);
937 if (!map)
940 memset((char*)map + res->aux.extra_aux.offset,
947 if (!map)
948 map = iris_bo_map(NULL, res->bo, MAP_WRITE | MAP_RAW);
949 if (!map)
953 memset((char *)map + res->aux.clear_color_offset, 0, clear_color_size);
959 if (map)
1252 static const uint64_t map[] = {
1258 assert(tiling < ARRAY_SIZE(map));
1260 return map[tiling];
1959 struct iris_transfer *map = (void *) xfer;
1976 iris_copy_region(map->blorp, map->batch, xfer->resource, xfer->level,
1977 dst_box.x, dst_box.y, dst_box.z, map->staging, 0,
1982 iris_unmap_copy_region(struct iris_transfer *map)
1984 iris_resource_destroy(map->staging->screen, map->staging);
1986 map->ptr = NULL;
1990 iris_map_copy_region(struct iris_transfer *map)
1992 struct pipe_screen *pscreen = &map->batch->screen->base;
1993 struct pipe_transfer *xfer = &map->base.b;
2018 map->staging = iris_resource_create(pscreen, &templ);
2019 assert(map->staging);
2022 struct isl_surf *surf = &((struct iris_resource *) map->staging)->surf;
2028 iris_copy_region(map->blorp, map->batch, map->staging, 0, extra, 0, 0,
2030 /* Ensure writes to the staging BO land before we map it below. */
2031 iris_emit_pipe_control_flush(map->batch,
2038 struct iris_bo *staging_bo = iris_resource_bo(map->staging);
2040 if (iris_batch_references(map->batch, staging_bo))
2041 iris_batch_flush(map->batch);
2043 assert(((struct iris_resource *)map->staging)->offset == 0);
2044 map->ptr =
2045 iris_bo_map(map->dbg, staging_bo, xfer->usage & MAP_FLAGS) + extra;
2047 map->unmap = iris_unmap_copy_region;
2111 iris_unmap_s8(struct iris_transfer *map)
2113 struct pipe_transfer *xfer = &map->base.b;
2119 uint8_t *untiled_s8_map = map->ptr;
2121 iris_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS);
2139 free(map->buffer);
2143 iris_map_s8(struct iris_transfer *map)
2145 struct pipe_transfer *xfer = &map->base.b;
2157 map->buffer = map->ptr = malloc(xfer->layer_stride * box->depth);
2158 assert(map->buffer);
2166 uint8_t *untiled_s8_map = map->ptr;
2168 iris_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS);
2186 map->unmap = iris_unmap_s8;
2215 iris_unmap_tiled_memcpy(struct iris_transfer *map)
2217 struct pipe_transfer *xfer = &map->base.b;
2226 iris_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS);
2232 void *ptr = map->ptr + s * xfer->layer_stride;
2239 os_free_aligned(map->buffer);
2240 map->buffer = map->ptr = NULL;
2244 iris_map_tiled_memcpy(struct iris_transfer *map)
2246 struct pipe_transfer *xfer = &map->base.b;
2261 map->buffer =
2263 assert(map->buffer);
2264 map->ptr = (char *)map->buffer + (x1 & 0xf);
2270 iris_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS);
2277 void *ptr = map->ptr + s * xfer->layer_stride;
2285 map->unmap = iris_unmap_tiled_memcpy;
2289 iris_map_direct(struct iris_transfer *map)
2291 struct pipe_transfer *xfer = &map->base.b;
2296 iris_bo_map(map->dbg, res->bo, xfer->usage & MAP_FLAGS);
2302 map->ptr = ptr + box->x;
2320 map->ptr = ptr + y0_el * xfer->stride + x0_el * cpp;
2395 struct iris_transfer *map;
2398 map = slab_zalloc(&ice->transfer_pool_unsync);
2400 map = slab_zalloc(&ice->transfer_pool);
2402 if (!map)
2405 struct pipe_transfer *xfer = &map->base.b;
2407 map->dbg = &ice->dbg;
2415 map->dest_had_defined_contents =
2429 * a linear temporary and map that, to avoid the resolve.
2436 /* We can map directly if it wouldn't stall, there's no compression,
2455 map->batch = &ice->batches[IRIS_BATCH_RENDER];
2456 map->blorp = &ice->blorp;
2457 iris_map_copy_region(map);
2459 /* Otherwise we're free to map on the CPU. */
2475 iris_map_s8(map);
2477 iris_map_tiled_memcpy(map);
2479 iris_map_direct(map);
2483 return map->ptr;
2493 struct iris_transfer *map = (void *) xfer;
2495 if (map->staging)
2512 struct iris_transfer *map = (void *) xfer;
2525 if (map->unmap)
2526 map->unmap(map);
2534 slab_free(&ice->transfer_pool, map);