diff options
author | José Fonseca <[email protected]> | 2012-11-28 20:14:17 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2012-11-29 14:08:43 +0000 |
commit | 75da95c50aedaa4b1abf51ec1dcaf2fe8ddd4f3b (patch) | |
tree | 618541040ca4bef1d6366c435df66c45f0d82c11 /src/gallium/drivers/llvmpipe/lp_texture.c | |
parent | 6916387e5396a891f2ffbc68866802d03f6a0939 (diff) |
llvmpipe: Eliminate color buffer swizzling.
Now dead code.
Also had to remove the show_tiles/show_subtiles because now the color
buffers are always stored in their native format, so there is no longer
an easy way to paint the tile sizes.
Depth-stencil buffers are still swizzled.
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_texture.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_texture.c | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index dcf2665dbc2..39d646964e4 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -756,25 +756,6 @@ llvmpipe_is_resource_referenced( struct pipe_context *pipe, return lp_setup_is_resource_referenced(llvmpipe->setup, presource); } -boolean -llvmpipe_is_format_unswizzled( enum pipe_format format ) -{ - const struct util_format_description *desc = util_format_description(format); - - if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN || - (desc->colorspace != UTIL_FORMAT_COLORSPACE_RGB && - desc->colorspace != UTIL_FORMAT_COLORSPACE_SRGB) || - desc->block.width != 1 || - desc->block.height != 1 || - desc->is_mixed || - (!desc->is_array && !desc->is_bitmask)) { - assert(0); - return FALSE; - } - - return TRUE; -} - /** * Returns the largest possible alignment for a format in llvmpipe @@ -1365,94 +1346,6 @@ llvmpipe_get_texture_tile(struct llvmpipe_resource *lpr, /** - * Get pointer to tiled data for rendering. - * \return pointer to the tiled data at the given tile position - */ -void -llvmpipe_unswizzle_cbuf_tile(struct llvmpipe_resource *lpr, - unsigned face_slice, unsigned level, - unsigned x, unsigned y, - uint8_t *tile) -{ - struct llvmpipe_texture_image *linear_img = &lpr->linear_img; - const unsigned tx = x / TILE_SIZE, ty = y / TILE_SIZE; - uint8_t *linear_image; - - assert(x % TILE_SIZE == 0); - assert(y % TILE_SIZE == 0); - - if (!linear_img->data) { - /* allocate memory for the linear image now */ - alloc_image_data(lpr, LP_TEX_LAYOUT_LINEAR); - } - - /* compute address of the slice/face of the image that contains the tile */ - linear_image = llvmpipe_get_texture_image_address(lpr, face_slice, level, - LP_TEX_LAYOUT_LINEAR); - - { - uint ii = x, jj = y; - uint tile_offset = jj / TILE_SIZE + ii / TILE_SIZE; - uint byte_offset = tile_offset * TILE_SIZE * TILE_SIZE * 4; - - /* Note that lp_tiled_to_linear expects the tile parameter to - * point at the first tile in a whole-image sized array. In - * this code, we have only a single tile and have to do some - * pointer arithmetic to figure out where the "image" would have - * started. - */ - lp_tiled_to_linear(tile - byte_offset, linear_image, - x, y, TILE_SIZE, TILE_SIZE, - lpr->base.format, - lpr->row_stride[level], - 1); /* tiles per row */ - } - - llvmpipe_set_texture_tile_layout(lpr, face_slice, level, tx, ty, - LP_TEX_LAYOUT_LINEAR); -} - - -/** - * Get pointer to tiled data for rendering. - * \return pointer to the tiled data at the given tile position - */ -void -llvmpipe_swizzle_cbuf_tile(struct llvmpipe_resource *lpr, - unsigned face_slice, unsigned level, - unsigned x, unsigned y, - uint8_t *tile) -{ - uint8_t *linear_image; - - assert(x % TILE_SIZE == 0); - assert(y % TILE_SIZE == 0); - - /* compute address of the slice/face of the image that contains the tile */ - linear_image = llvmpipe_get_texture_image_address(lpr, face_slice, level, - LP_TEX_LAYOUT_LINEAR); - - if (linear_image) { - uint ii = x, jj = y; - uint tile_offset = jj / TILE_SIZE + ii / TILE_SIZE; - uint byte_offset = tile_offset * TILE_SIZE * TILE_SIZE * 4; - - /* Note that lp_linear_to_tiled expects the tile parameter to - * point at the first tile in a whole-image sized array. In - * this code, we have only a single tile and have to do some - * pointer arithmetic to figure out where the "image" would have - * started. - */ - lp_linear_to_tiled(linear_image, tile - byte_offset, - x, y, TILE_SIZE, TILE_SIZE, - lpr->base.format, - lpr->row_stride[level], - 1); /* tiles per row */ - } -} - - -/** * Return size of resource in bytes */ unsigned |