[Mesa-dev] [PATCH 5/6] intel: Fix requests for exact surface row pitch

Jason Ekstrand jason at jlekstrand.net
Mon Mar 6 22:05:22 UTC 2017


Much nicer!

On Mon, Mar 6, 2017 at 10:12 AM, Chad Versace <chadversary at chromium.org>
wrote:

> All callers of isl_surf_init() that set 'min_row_pitch' wanted to
> request an *exact* row pitch, as evidenced by nearby asserts, but isl
> lacked API for doing so. Now that isl has an API for that, update the
> code to use it.
> ---
>  src/intel/blorp/blorp_blit.c | 3 +--
>  src/intel/vulkan/anv_blorp.c | 3 +--
>  src/intel/vulkan/anv_image.c | 2 +-
>  3 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
> index 212d6218853..a3d7937825d 100644
> --- a/src/intel/blorp/blorp_blit.c
> +++ b/src/intel/blorp/blorp_blit.c
> @@ -1419,13 +1419,12 @@ surf_convert_to_single_slice(const struct
> isl_device *isl_dev,
>        .levels = 1,
>        .array_len = 1,
>        .samples = info->surf.samples,
> -      .min_row_pitch = info->surf.row_pitch,
> +      .row_pitch = info->surf.row_pitch,
>        .usage = info->surf.usage,
>        .tiling_flags = 1 << info->surf.tiling,
>     };
>
>     isl_surf_init_s(isl_dev, &info->surf, &init_info);
> -   assert(info->surf.row_pitch == init_info.min_row_pitch);
>
>     /* The view is also different now. */
>     info->view.base_level = 0;
> diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
> index 215afe7d4df..57f689fff77 100644
> --- a/src/intel/vulkan/anv_blorp.c
> +++ b/src/intel/vulkan/anv_blorp.c
> @@ -159,11 +159,10 @@ get_blorp_surf_for_anv_buffer(struct anv_device
> *device,
>                   .levels = 1,
>                   .array_len = 1,
>                   .samples = 1,
> -                 .min_row_pitch = row_pitch,
> +                 .row_pitch = row_pitch,
>                   .usage = ISL_SURF_USAGE_TEXTURE_BIT |
>                            ISL_SURF_USAGE_RENDER_TARGET_BIT,
>                   .tiling_flags = ISL_TILING_LINEAR_BIT);
> -   assert(isl_surf->row_pitch == row_pitch);
>  }
>
>  static void
> diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
> index 4aa8b965b13..a70861d38d0 100644
> --- a/src/intel/vulkan/anv_image.c
> +++ b/src/intel/vulkan/anv_image.c
> @@ -166,7 +166,7 @@ make_surface(const struct anv_device *dev,
>        .array_len = vk_info->arrayLayers,
>        .samples = vk_info->samples,
>        .min_alignment = 0,
> -      .min_row_pitch = anv_info->stride,
> +      .row_pitch = anv_info->stride,
>        .usage = choose_isl_surf_usage(image->usage, aspect),
>        .tiling_flags = tiling_flags);
>
> --
> 2.12.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170306/eb1e857b/attachment.html>


More information about the mesa-dev mailing list