summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_linear.h
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2009-11-30 20:29:18 +0100
committerRoland Scheidegger <sroland@vmware.com>2009-11-30 20:29:18 +0100
commitac400ffce62be47fc77e8d10cabcd39b92b6c627 (patch)
treec99fc26392294b75bf88cb04a7853c63007424f0 /src/gallium/auxiliary/util/u_linear.h
parent7fa1bcc05a237365e5ea09512453f29a91c7a141 (diff)
gallium: interface cleanups, remove nblocksx/y from pipe_texture and more
This patch removes nblocksx, nblocksy arrays from pipe_texture (can be recalculated if needed). Furthermore, pipe_format_block struct is gone completely (again, contains just derived state). nblocksx, nblocksy, block are also removed from pipe_transfer, together with the format enum (can be obtained from the texture associated with the transfer).
Diffstat (limited to 'src/gallium/auxiliary/util/u_linear.h')
-rw-r--r--src/gallium/auxiliary/util/u_linear.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/util/u_linear.h b/src/gallium/auxiliary/util/u_linear.h
index b74308ffa3..42c40b2aa7 100644
--- a/src/gallium/auxiliary/util/u_linear.h
+++ b/src/gallium/auxiliary/util/u_linear.h
@@ -35,6 +35,19 @@
#include "pipe/p_format.h"
+struct u_linear_format_block
+{
+ /** Block size in bytes */
+ unsigned size;
+
+ /** Block width in pixels */
+ unsigned width;
+
+ /** Block height in pixels */
+ unsigned height;
+};
+
+
struct pipe_tile_info
{
unsigned size;
@@ -49,10 +62,10 @@ struct pipe_tile_info
unsigned rows;
/* Describe the tile in pixels */
- struct pipe_format_block tile;
+ struct u_linear_format_block tile;
/* Describe each block within the tile */
- struct pipe_format_block block;
+ struct u_linear_format_block block;
};
void pipe_linear_to_tile(size_t src_stride, const void *src_ptr,
@@ -71,7 +84,7 @@ void pipe_linear_from_tile(struct pipe_tile_info *t, const void *src_ptr,
* @tiles_y number of tiles in y axis
*/
void pipe_linear_fill_info(struct pipe_tile_info *t,
- const struct pipe_format_block *block,
+ const struct u_linear_format_block *block,
unsigned tile_width, unsigned tile_height,
unsigned tiles_x, unsigned tiles_y);