radv: Generate storage image descriptors unconditionally
authorAlex Smith <asmith@feralinteractive.com>
Fri, 21 Jul 2017 16:00:00 +0000 (17:00 +0100)
committerDave Airlie <airlied@redhat.com>
Fri, 21 Jul 2017 20:40:29 +0000 (06:40 +1000)
We can also use storage images internally for resolves, which don't
require TRANSFER_DST usage on the image, so currently we may not create
the needed descriptors.

Just create these descriptors unconditionally.

Fixes: 0e1886efb9e ("radv: Fix descriptors for cube images with VK_IMAGE_USAGE_STORAGE_BIT")
Reported-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_image.c

index f5fb790ddaf9c3728ae7edf0189d0ef6434bb7f2..d8b7e8f421f824b9dbac1d55a2d936314bebcf59 100644 (file)
@@ -945,10 +945,7 @@ radv_image_view_init(struct radv_image_view *iview,
        iview->base_mip = range->baseMipLevel;
 
        radv_image_view_make_descriptor(iview, device, pCreateInfo, false);
-
-       /* For transfers we may use the image as a storage image. */
-       if (image->usage & (VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT))
-               radv_image_view_make_descriptor(iview, device, pCreateInfo, true);
+       radv_image_view_make_descriptor(iview, device, pCreateInfo, true);
 }
 
 bool radv_layout_has_htile(const struct radv_image *image,