Module: Mesa Branch: lp-surface-tiling Commit: a8aa763e8a717533f2b13bb6ea53cbccbede68c9 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a8aa763e8a717533f2b13bb6ea53cbccbede68c9
Author: Brian Paul <[email protected]> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). --- src/gallium/drivers/llvmpipe/lp_rast.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 73770d8..f3ac77a 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -175,12 +175,26 @@ lp_rast_tile_begin(struct lp_rasterizer_task *task, { struct pipe_surface *zsbuf = rast->curr_scene->fb.zsbuf; if (zsbuf) { + struct llvmpipe_texture *lpt = llvmpipe_texture(zsbuf->texture); + if (scene->has_depth_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->level, + usage, + x, 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(rast, x, y); + assert(task->depth_tile); } else { _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
