Lines Matching defs:map

569       void *map = crocus_bo_map(NULL, res->aux.bo, MAP_WRITE | MAP_RAW);
571 if (!map)
576 memset((char*)map + res->aux.offset, memset_value,
784 static const uint64_t map[] = {
790 assert(tiling < ARRAY_SIZE(map));
792 return map[tiling];
1202 struct crocus_transfer *map = (void *) xfer;
1219 crocus_copy_region(map->blorp, map->batch, xfer->resource, xfer->level,
1220 dst_box.x, dst_box.y, dst_box.z, map->staging, 0,
1225 crocus_unmap_copy_region(struct crocus_transfer *map)
1227 crocus_resource_destroy(map->staging->screen, map->staging);
1229 map->ptr = NULL;
1233 crocus_map_copy_region(struct crocus_transfer *map)
1235 struct pipe_screen *pscreen = &map->batch->screen->base;
1236 struct pipe_transfer *xfer = &map->base.b;
1261 map->staging = crocus_resource_create(pscreen, &templ);
1262 assert(map->staging);
1265 struct isl_surf *surf = &((struct crocus_resource *) map->staging)->surf;
1271 crocus_copy_region(map->blorp, map->batch, map->staging, 0, extra, 0, 0,
1273 /* Ensure writes to the staging BO land before we map it below. */
1274 crocus_emit_pipe_control_flush(map->batch,
1280 struct crocus_bo *staging_bo = crocus_resource_bo(map->staging);
1282 if (crocus_batch_references(map->batch, staging_bo))
1283 crocus_batch_flush(map->batch);
1285 map->ptr =
1286 crocus_bo_map(map->dbg, staging_bo, xfer->usage & MAP_FLAGS) + extra;
1288 map->unmap = crocus_unmap_copy_region;
1371 crocus_unmap_s8(struct crocus_transfer *map)
1373 struct pipe_transfer *xfer = &map->base.b;
1379 uint8_t *untiled_s8_map = map->ptr;
1381 crocus_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS);
1392 map->has_swizzling);
1400 free(map->buffer);
1404 crocus_map_s8(struct crocus_transfer *map)
1406 struct pipe_transfer *xfer = &map->base.b;
1418 map->buffer = map->ptr = malloc(xfer->layer_stride * box->depth);
1419 assert(map->buffer);
1427 uint8_t *untiled_s8_map = map->ptr;
1429 crocus_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS);
1440 map->has_swizzling);
1448 map->unmap = crocus_unmap_s8;
1477 crocus_unmap_tiled_memcpy(struct crocus_transfer *map)
1479 struct pipe_transfer *xfer = &map->base.b;
1486 crocus_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS);
1492 void *ptr = map->ptr + s * xfer->layer_stride;
1496 map->has_swizzling,
1500 os_free_aligned(map->buffer);
1501 map->buffer = map->ptr = NULL;
1505 crocus_map_tiled_memcpy(struct crocus_transfer *map)
1507 struct pipe_transfer *xfer = &map->base.b;
1522 map->buffer =
1524 assert(map->buffer);
1525 map->ptr = (char *)map->buffer + (x1 & 0xf);
1529 crocus_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS);
1536 void *ptr = map->ptr + s * xfer->layer_stride;
1540 map->has_swizzling,
1549 map->unmap = crocus_unmap_tiled_memcpy;
1553 crocus_map_direct(struct crocus_transfer *map)
1555 struct pipe_transfer *xfer = &map->base.b;
1559 void *ptr = crocus_bo_map(map->dbg, res->bo, xfer->usage & MAP_FLAGS);
1565 map->ptr = ptr + box->x;
1583 map->ptr = ptr + y0_el * xfer->stride + x0_el * cpp;
1646 struct crocus_transfer *map;
1648 map = slab_zalloc(&ice->transfer_pool_unsync);
1650 map = slab_zalloc(&ice->transfer_pool);
1652 struct pipe_transfer *xfer = &map->base.b;
1654 if (!map)
1657 map->dbg = &ice->dbg;
1659 map->has_swizzling = screen->devinfo.has_bit6_swizzle;
1666 map->dest_had_defined_contents =
1689 * temporary and map that, to avoid the resolve. (It might be better to
1704 map->batch = &ice->batches[CROCUS_BATCH_RENDER];
1705 map->blorp = &ice->blorp;
1706 crocus_map_copy_region(map);
1708 /* Otherwise we're free to map on the CPU. */
1725 crocus_map_s8(map);
1727 crocus_map_tiled_memcpy(map);
1729 crocus_map_direct(map);
1733 return map->ptr;
1743 struct crocus_transfer *map = (void *) xfer;
1745 if (map->staging)
1751 if (map->staging)
1754 if (map->dest_had_defined_contents)
1785 struct crocus_transfer *map = (void *) xfer;
1798 if (map->unmap)
1799 map->unmap(map);
1806 slab_free(&ice->transfer_pool, map);