[Mesa-dev] [PATCH] intel/blorp: do not return const data by get_px_size_sa()
Jason Ekstrand
jason at jlekstrand.net
Tue Feb 7 23:19:01 UTC 2017
On Tue, Feb 7, 2017 at 1:26 PM, Emil Velikov <emil.l.velikov at gmail.com>
wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> Not much point in the const qualifier since we provide a copy to the
> user. Resolves the following -Wignored-qualifiers warning.
>
> src/intel/blorp/blorp_blit.c:1857:8: warning: 'const' type qualifier on
> return type has no effect [-Wignored-qualifiers]
>
> Cc: Jason Ekstrand <jason at jlekstrand.net>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> src/intel/blorp/blorp_blit.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
> index 111f1c13a8..dcfc06540c 100644
> --- a/src/intel/blorp/blorp_blit.c
> +++ b/src/intel/blorp/blorp_blit.c
> @@ -1857,10 +1857,10 @@ adjust_split_source_coords(const struct blt_axis
> *orig,
> split_coords->src1 = orig->src1 + (scale >= 0.0 ? delta1 : delta0);
> }
>
> -static const struct isl_extent2d
> +static struct isl_extent2d
> get_px_size_sa(const struct isl_surf *surf)
> {
> - static const struct isl_extent2d one_to_one = { .w = 1, .h = 1 };
> + static struct isl_extent2d one_to_one = { .w = 1, .h = 1 };
>
Why are you getting rid of const here? That significantly changes the
storage of this variable.
>
> if (surf->msaa_layout != ISL_MSAA_LAYOUT_INTERLEAVED)
> return one_to_one;
> --
> 2.11.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170207/97288bfe/attachment-0001.html>
More information about the mesa-dev
mailing list