From 686f6c69bd36c537573f6e8095aaf24ec0ae4047 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Wed, 27 Feb 2013 19:26:01 +0100 Subject: llvmpipe: support rendering to buffer render targets. Unfortunately not usable from OpenGL, and no cap bit. Pretty similar to a 1d texture, though allows specifying a start element. v2: also fix up renderbuffer width (which will get promoted to fb width) to be the number of elements Reviewed-by: Jose Fonseca --- src/gallium/drivers/llvmpipe/lp_rast_priv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/llvmpipe/lp_rast_priv.h') diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/src/gallium/drivers/llvmpipe/lp_rast_priv.h index 5db8fcd19b2..c0f41f69fe2 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h +++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h @@ -196,7 +196,7 @@ lp_rast_get_unswizzled_color_tile_pointer(struct lp_rasterizer_task *task, struct pipe_surface *cbuf = scene->fb.cbufs[buf]; assert(cbuf); - format_bytes = util_format_description(cbuf->format)->block.bits / 8; + format_bytes = util_format_get_blocksize(cbuf->format); task->color_tiles[buf] = scene->cbufs[buf].map + scene->cbufs[buf].stride * task->y + format_bytes * task->x; } @@ -221,7 +221,7 @@ lp_rast_get_unswizzled_color_block_pointer(struct lp_rasterizer_task *task, assert((y % TILE_VECTOR_HEIGHT) == 0); assert(buf < task->scene->fb.nr_cbufs); - format_bytes = util_format_description(task->scene->fb.cbufs[buf]->format)->block.bits / 8; + format_bytes = util_format_get_blocksize(task->scene->fb.cbufs[buf]->format); color = lp_rast_get_unswizzled_color_tile_pointer(task, buf, LP_TEX_USAGE_READ_WRITE); assert(color); -- cgit v1.2.3