anv: use image aspects rather than computed ones
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 30 Oct 2018 23:44:05 +0000 (23:44 +0000)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 13 Nov 2018 18:56:27 +0000 (18:56 +0000)
This shouldn't make any difference but I feel uneasy to use the
expanded aspects that do not represent the image in its entirety. If
we ever change the implementation of the anv_image_aspect_to_plane()
helper, this is safer.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_image.c

index b284ed4b40fcc554fe744d69434fefba1a155b2d..4a0284cf212612aca39ac8ab8fc32cc3f1c75a09 100644 (file)
@@ -1321,7 +1321,7 @@ anv_CreateImageView(VkDevice _device,
    uint32_t iaspect_bit, vplane = 0;
    anv_foreach_image_aspect_bit(iaspect_bit, image, expanded_aspects) {
       uint32_t iplane =
-         anv_image_aspect_to_plane(expanded_aspects, 1UL << iaspect_bit);
+         anv_image_aspect_to_plane(image->aspects, 1UL << iaspect_bit);
       VkImageAspectFlags vplane_aspect =
          anv_plane_to_aspect(iview->aspect_mask, vplane);
       struct anv_format_plane format =