+ const struct lp_scene *scene = task->scene;
+ enum lp_texture_usage usage;
+
+ LP_DBG(DEBUG_RAST, "%s %d,%d\n", __FUNCTION__, bin->x, bin->y);
+
+ task->bin = bin;
+ task->x = bin->x * TILE_SIZE;
+ task->y = bin->y * TILE_SIZE;
+
+ /* reset pointers to color tile(s) */
+ memset(task->color_tiles, 0, sizeof(task->color_tiles));
+
+ /* get pointer to depth/stencil tile */
+ {
+ struct pipe_surface *zsbuf = task->scene->fb.zsbuf;
+ if (zsbuf) {
+ struct llvmpipe_resource *lpt = llvmpipe_resource(zsbuf->texture);
+
+ if (scene->has_depthstencil_clear)
+ usage = LP_TEX_USAGE_WRITE_ALL;
+ else
+ usage = LP_TEX_USAGE_READ_WRITE;
+
+ /* "prime" the tile: convert data from linear to tiled if necessary
+ * and update the tile's layout info.
+ */
+ (void) llvmpipe_get_texture_tile(lpt,
+ zsbuf->face + zsbuf->zslice,
+ zsbuf->level,
+ usage,
+ task->x,
+ task->y);
+ /* Get actual pointer to the tile data. Note that depth/stencil
+ * data is tiled differently than color data.
+ */
+ task->depth_tile = lp_rast_get_depth_block_pointer(task,
+ task->x,
+ task->y);