From: Brian Paul Date: Wed, 11 Feb 2009 21:11:48 +0000 (-0700) Subject: gallium: const-correctness for u_linear.c functions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6b06a6b929aa742f92653728254255f1867d6210;p=mesa.git gallium: const-correctness for u_linear.c functions --- diff --git a/src/gallium/auxiliary/util/u_linear.c b/src/gallium/auxiliary/util/u_linear.c index ba6204d6f77..e999cefe748 100644 --- a/src/gallium/auxiliary/util/u_linear.c +++ b/src/gallium/auxiliary/util/u_linear.c @@ -3,7 +3,7 @@ #include "u_linear.h" void -pipe_linear_to_tile(size_t src_stride, void *src_ptr, +pipe_linear_to_tile(size_t src_stride, const void *src_ptr, struct pipe_tile_info *t, void *dst_ptr) { int x, y, z; @@ -27,7 +27,7 @@ pipe_linear_to_tile(size_t src_stride, void *src_ptr, } } -void pipe_linear_from_tile(struct pipe_tile_info *t, void *src_ptr, +void pipe_linear_from_tile(struct pipe_tile_info *t, const void *src_ptr, size_t dst_stride, void *dst_ptr) { int x, y, z; @@ -51,7 +51,7 @@ void pipe_linear_from_tile(struct pipe_tile_info *t, void *src_ptr, void pipe_linear_fill_info(struct pipe_tile_info *t, - struct pipe_format_block *block, + const struct pipe_format_block *block, unsigned tile_width, unsigned tile_height, unsigned tiles_x, unsigned tiles_y) { diff --git a/src/gallium/auxiliary/util/u_linear.h b/src/gallium/auxiliary/util/u_linear.h index e337cfd7702..1589f029bc4 100644 --- a/src/gallium/auxiliary/util/u_linear.h +++ b/src/gallium/auxiliary/util/u_linear.h @@ -3,6 +3,7 @@ #define U_LINEAR_H #include "pipe/p_format.h" + struct pipe_tile_info { unsigned size; @@ -23,10 +24,10 @@ struct pipe_tile_info struct pipe_format_block block; }; -void pipe_linear_to_tile(size_t src_stride, void *src_ptr, +void pipe_linear_to_tile(size_t src_stride, const void *src_ptr, struct pipe_tile_info *t, void *dst_ptr); -void pipe_linear_from_tile(struct pipe_tile_info *t, void *src_ptr, +void pipe_linear_from_tile(struct pipe_tile_info *t, const void *src_ptr, size_t dst_stride, void *dst_ptr); /** @@ -39,11 +40,11 @@ void pipe_linear_from_tile(struct pipe_tile_info *t, void *src_ptr, * @tiles_y number of tiles in y axis */ void pipe_linear_fill_info(struct pipe_tile_info *t, - struct pipe_format_block *block, + const struct pipe_format_block *block, unsigned tile_width, unsigned tile_height, unsigned tiles_x, unsigned tiles_y); -static INLINE boolean pipe_linear_check_tile(struct pipe_tile_info *t) +static INLINE boolean pipe_linear_check_tile(const struct pipe_tile_info *t) { if (t->tile.size != t->block.size * t->cols * t->rows) return FALSE;