5 #include "pipe/p_format.h"
11 /* The number of tiles */
15 /* size of each tile expressed in blocks */
19 /* Describe the tile in pixels */
20 struct pipe_format_block tile
;
22 /* Describe each block within the tile */
23 struct pipe_format_block block
;
26 void pipe_linear_to_tile(size_t src_stride
, void *src_ptr
,
27 struct pipe_tile_info
*t
, void *dst_ptr
);
29 void pipe_linear_from_tile(struct pipe_tile_info
*t
, void *src_ptr
,
30 size_t dst_stride
, void *dst_ptr
);
33 * Convenience function to fillout a pipe_tile_info struct.
34 * @t info to fill out.
35 * @block block info about pixel layout
36 * @tile_width the width of the tile in pixels
37 * @tile_height the height of the tile in pixels
38 * @tiles_x number of tiles in x axis
39 * @tiles_y number of tiles in y axis
41 void pipe_linear_fill_info(struct pipe_tile_info
*t
,
42 struct pipe_format_block
*block
,
43 unsigned tile_width
, unsigned tile_height
,
44 unsigned tiles_x
, unsigned tiles_y
);
46 static INLINE boolean
pipe_linear_check_tile(struct pipe_tile_info
*t
)
48 if (t
->tile
.size
!= t
->block
.size
* t
->cols
* t
->rows
)
51 if (t
->stride
!= t
->block
.size
* t
->cols
* t
->tiles_x
)
54 if (t
->size
< t
->stride
* t
->rows
* t
->tiles_y
)
60 #endif /* U_LINEAR_H */