[Mesa-dev] [RFC 02/27] i965: Mark sources for offset getters as constants
Ian Romanick
idr at freedesktop.org
Mon Feb 24 10:53:53 PST 2014
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
On 02/22/2014 01:05 AM, Topi Pohjolainen wrote:
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
> src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 6 +++---
> src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 4 ++--
> src/mesa/drivers/dri/i965/intel_regions.c | 4 ++--
> src/mesa/drivers/dri/i965/intel_regions.h | 4 ++--
> 4 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index 8e0d2be..89df0d3 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -920,7 +920,7 @@ intel_miptree_set_image_offset(struct intel_mipmap_tree *mt,
> }
>
> void
> -intel_miptree_get_image_offset(struct intel_mipmap_tree *mt,
> +intel_miptree_get_image_offset(const struct intel_mipmap_tree *mt,
> GLuint level, GLuint slice,
> GLuint *x, GLuint *y)
> {
> @@ -941,12 +941,12 @@ intel_miptree_get_image_offset(struct intel_mipmap_tree *mt,
> * from there.
> */
> uint32_t
> -intel_miptree_get_tile_offsets(struct intel_mipmap_tree *mt,
> +intel_miptree_get_tile_offsets(const struct intel_mipmap_tree *mt,
> GLuint level, GLuint slice,
> uint32_t *tile_x,
> uint32_t *tile_y)
> {
> - struct intel_region *region = mt->region;
> + const struct intel_region *region = mt->region;
> uint32_t x, y;
> uint32_t mask_x, mask_y;
>
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> index 6c45cfd..4250e0f 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
> @@ -520,7 +520,7 @@ bool intel_miptree_match_image(struct intel_mipmap_tree *mt,
> struct gl_texture_image *image);
>
> void
> -intel_miptree_get_image_offset(struct intel_mipmap_tree *mt,
> +intel_miptree_get_image_offset(const struct intel_mipmap_tree *mt,
> GLuint level, GLuint slice,
> GLuint *x, GLuint *y);
>
> @@ -529,7 +529,7 @@ intel_miptree_get_dimensions_for_image(struct gl_texture_image *image,
> int *width, int *height, int *depth);
>
> uint32_t
> -intel_miptree_get_tile_offsets(struct intel_mipmap_tree *mt,
> +intel_miptree_get_tile_offsets(const struct intel_mipmap_tree *mt,
> GLuint level, GLuint slice,
> uint32_t *tile_x,
> uint32_t *tile_y);
> diff --git a/src/mesa/drivers/dri/i965/intel_regions.c b/src/mesa/drivers/dri/i965/intel_regions.c
> index a845683..d891e09 100644
> --- a/src/mesa/drivers/dri/i965/intel_regions.c
> +++ b/src/mesa/drivers/dri/i965/intel_regions.c
> @@ -283,7 +283,7 @@ intel_region_release(struct intel_region **region_handle)
> * untiled, the masks are set to 0.
> */
> void
> -intel_region_get_tile_masks(struct intel_region *region,
> +intel_region_get_tile_masks(const struct intel_region *region,
> uint32_t *mask_x, uint32_t *mask_y,
> bool map_stencil_as_y_tiled)
> {
> @@ -316,7 +316,7 @@ intel_region_get_tile_masks(struct intel_region *region,
> * multiples of the tile size.
> */
> uint32_t
> -intel_region_get_aligned_offset(struct intel_region *region, uint32_t x,
> +intel_region_get_aligned_offset(const struct intel_region *region, uint32_t x,
> uint32_t y, bool map_stencil_as_y_tiled)
> {
> int cpp = region->cpp;
> diff --git a/src/mesa/drivers/dri/i965/intel_regions.h b/src/mesa/drivers/dri/i965/intel_regions.h
> index c301f23..eb2123e 100644
> --- a/src/mesa/drivers/dri/i965/intel_regions.h
> +++ b/src/mesa/drivers/dri/i965/intel_regions.h
> @@ -104,12 +104,12 @@ void intel_region_reference(struct intel_region **dst,
> void intel_region_release(struct intel_region **ib);
>
> void
> -intel_region_get_tile_masks(struct intel_region *region,
> +intel_region_get_tile_masks(const struct intel_region *region,
> uint32_t *mask_x, uint32_t *mask_y,
> bool map_stencil_as_y_tiled);
>
> uint32_t
> -intel_region_get_aligned_offset(struct intel_region *region, uint32_t x,
> +intel_region_get_aligned_offset(const struct intel_region *region, uint32_t x,
> uint32_t y, bool map_stencil_as_y_tiled);
>
> /**
>
More information about the mesa-dev
mailing list