From fc5a6eedbc0fbee9f7d8e7f2ae20257425fafab9 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 21 Jul 2021 18:11:39 -0500 Subject: [PATCH] anv: Delete anv_image::format Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/anv_image.c | 8 +++----- src/intel/vulkan/anv_private.h | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 2fcf4da..d3a01c7 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -1313,7 +1313,6 @@ anv_image_create(VkDevice _device, image->extent = anv_sanitize_image_extent(pCreateInfo->imageType, pCreateInfo->extent); image->vk_format = pCreateInfo->format; - image->format = anv_get_format(pCreateInfo->format); image->aspects = vk_format_aspects(image->vk_format); image->levels = pCreateInfo->mipLevels; image->array_size = pCreateInfo->arrayLayers; @@ -1356,14 +1355,14 @@ anv_image_create(VkDevice _device, return VK_SUCCESS; } - image->n_planes = image->format->n_planes; + image->n_planes = anv_get_format_planes(image->vk_format); /* The Vulkan 1.2.165 glossary says: * * A disjoint image consists of multiple disjoint planes, and is created * with the VK_IMAGE_CREATE_DISJOINT_BIT bit set. */ - image->disjoint = image->format->n_planes > 1 && + image->disjoint = image->n_planes > 1 && (pCreateInfo->flags & VK_IMAGE_CREATE_DISJOINT_BIT); const isl_tiling_flags_t isl_tiling_flags = @@ -1594,9 +1593,8 @@ resolve_ahw_image(struct anv_device *device, * isl_surface for it. */ image->vk_format = vk_format; - image->format = anv_get_format(vk_format); image->aspects = vk_format_aspects(image->vk_format); - image->n_planes = image->format->n_planes; + image->n_planes = anv_get_format_planes(image->vk_format); uint32_t stride = desc.stride * (isl_format_get_layout(isl_fmt)->bpb / 8); diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index e16e07a..d836268 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -3954,7 +3954,6 @@ struct anv_image { * of the actual surface formats. */ VkFormat vk_format; - const struct anv_format *format; VkImageAspectFlags aspects; VkExtent3D extent; -- 2.7.4