gallium: const-correctness for u_linear.c functions
authorBrian Paul <brianp@vmware.com>
Wed, 11 Feb 2009 21:11:48 +0000 (14:11 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 11 Feb 2009 21:11:48 +0000 (14:11 -0700)
src/gallium/auxiliary/util/u_linear.c
src/gallium/auxiliary/util/u_linear.h

index ba6204d6f7726785c2e44e9138e95b5d74479715..e999cefe748c0a39d8ef9304a4e8a30b35ddcd86 100644 (file)
@@ -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)
 {
index e337cfd7702865bcce91e4ad10616dd2fe72b4be..1589f029bc47a09f5e2a34e8f5feb682e5f971e9 100644 (file)
@@ -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;