anv: Delete anv_image::format
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12023>
This commit is contained in:

committed by
Marge Bot

parent
951635dfe7
commit
fc5a6eedbc
@@ -1313,7 +1313,6 @@ anv_image_create(VkDevice _device,
|
|||||||
image->extent = anv_sanitize_image_extent(pCreateInfo->imageType,
|
image->extent = anv_sanitize_image_extent(pCreateInfo->imageType,
|
||||||
pCreateInfo->extent);
|
pCreateInfo->extent);
|
||||||
image->vk_format = pCreateInfo->format;
|
image->vk_format = pCreateInfo->format;
|
||||||
image->format = anv_get_format(pCreateInfo->format);
|
|
||||||
image->aspects = vk_format_aspects(image->vk_format);
|
image->aspects = vk_format_aspects(image->vk_format);
|
||||||
image->levels = pCreateInfo->mipLevels;
|
image->levels = pCreateInfo->mipLevels;
|
||||||
image->array_size = pCreateInfo->arrayLayers;
|
image->array_size = pCreateInfo->arrayLayers;
|
||||||
@@ -1356,14 +1355,14 @@ anv_image_create(VkDevice _device,
|
|||||||
return VK_SUCCESS;
|
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:
|
/* The Vulkan 1.2.165 glossary says:
|
||||||
*
|
*
|
||||||
* A disjoint image consists of multiple disjoint planes, and is created
|
* A disjoint image consists of multiple disjoint planes, and is created
|
||||||
* with the VK_IMAGE_CREATE_DISJOINT_BIT bit set.
|
* 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);
|
(pCreateInfo->flags & VK_IMAGE_CREATE_DISJOINT_BIT);
|
||||||
|
|
||||||
const isl_tiling_flags_t isl_tiling_flags =
|
const isl_tiling_flags_t isl_tiling_flags =
|
||||||
@@ -1594,9 +1593,8 @@ resolve_ahw_image(struct anv_device *device,
|
|||||||
* isl_surface for it.
|
* isl_surface for it.
|
||||||
*/
|
*/
|
||||||
image->vk_format = vk_format;
|
image->vk_format = vk_format;
|
||||||
image->format = anv_get_format(vk_format);
|
|
||||||
image->aspects = vk_format_aspects(image->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 *
|
uint32_t stride = desc.stride *
|
||||||
(isl_format_get_layout(isl_fmt)->bpb / 8);
|
(isl_format_get_layout(isl_fmt)->bpb / 8);
|
||||||
|
@@ -3954,7 +3954,6 @@ struct anv_image {
|
|||||||
* of the actual surface formats.
|
* of the actual surface formats.
|
||||||
*/
|
*/
|
||||||
VkFormat vk_format;
|
VkFormat vk_format;
|
||||||
const struct anv_format *format;
|
|
||||||
|
|
||||||
VkImageAspectFlags aspects;
|
VkImageAspectFlags aspects;
|
||||||
VkExtent3D extent;
|
VkExtent3D extent;
|
||||||
|
Reference in New Issue
Block a user