[Mesa-dev] [RFC PATCH v1 07/30] anv: Refactor get_image_format_properties() - plane_format

Lionel Landwerlin lionel.g.landwerlin at intel.com
Tue Nov 7 15:32:34 UTC 2017


Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

On 07/11/17 14:47, Chad Versace wrote:
> Rename parameter 'format' to 'plane_format'.
>
> Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
> ---
>   src/intel/vulkan/anv_formats.c | 16 ++++++++--------
>   1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
> index eaf6093a4f8..a296378a68e 100644
> --- a/src/intel/vulkan/anv_formats.c
> +++ b/src/intel/vulkan/anv_formats.c
> @@ -470,12 +470,12 @@ static VkFormatFeatureFlags
>   get_image_format_properties(const struct gen_device_info *devinfo,
>                               VkFormat vk_format,
>                               enum isl_format base,
> -                            struct anv_format_plane format,
> +                            struct anv_format_plane plane_format,
>                               VkImageTiling vk_tiling)
>   {
>      VkFormatFeatureFlags flags = 0;
>   
> -   if (format.isl_format == ISL_FORMAT_UNSUPPORTED)
> +   if (plane_format.isl_format == ISL_FORMAT_UNSUPPORTED)
>         return 0;
>   
>      const VkImageAspectFlags aspects = vk_format_aspects(vk_format);
> @@ -499,14 +499,14 @@ get_image_format_properties(const struct gen_device_info *devinfo,
>   
>      /* ASTC textures must be in Y-tiled memory */
>      if (vk_tiling == VK_IMAGE_TILING_LINEAR &&
> -       isl_format_get_layout(format.isl_format)->txc == ISL_TXC_ASTC)
> +       isl_format_get_layout(plane_format.isl_format)->txc == ISL_TXC_ASTC)
>         return 0;
>   
> -   if (isl_format_supports_sampling(devinfo, format.isl_format)) {
> +   if (isl_format_supports_sampling(devinfo, plane_format.isl_format)) {
>         flags |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT |
>                  VK_FORMAT_FEATURE_BLIT_SRC_BIT;
>   
> -      if (isl_format_supports_filtering(devinfo, format.isl_format))
> +      if (isl_format_supports_filtering(devinfo, plane_format.isl_format))
>            flags |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT;
>      }
>   
> @@ -514,12 +514,12 @@ get_image_format_properties(const struct gen_device_info *devinfo,
>       * moved, then blending won't work correctly.  The PRM tells us
>       * straight-up not to render to such a surface.
>       */
> -   if (isl_format_supports_rendering(devinfo, format.isl_format) &&
> -       format.swizzle.a == ISL_CHANNEL_SELECT_ALPHA) {
> +   if (isl_format_supports_rendering(devinfo, plane_format.isl_format) &&
> +       plane_format.swizzle.a == ISL_CHANNEL_SELECT_ALPHA) {
>         flags |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT |
>                  VK_FORMAT_FEATURE_BLIT_DST_BIT;
>   
> -      if (isl_format_supports_alpha_blending(devinfo, format.isl_format))
> +      if (isl_format_supports_alpha_blending(devinfo, plane_format.isl_format))
>            flags |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT;
>      }
>   




More information about the mesa-dev mailing list