radv/image: only touch queue family info for concurrent images.
authorDave Airlie <airlied@redhat.com>
Wed, 21 Dec 2016 23:28:40 +0000 (23:28 +0000)
committerDave Airlie <airlied@redhat.com>
Wed, 21 Dec 2016 23:33:04 +0000 (23:33 +0000)
The spec says to ignore these fields for exclusive images.

Fixes crashes in:
dEQP-VK.clipping.*

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_image.c

index a0287fcb3eb4582bc3b4b6819303beebc5600f8e..6e03f496d4b5b890df2322c4f4df9116b6315bb3 100644 (file)
@@ -700,8 +700,10 @@ radv_image_create(VkDevice _device,
        image->usage = pCreateInfo->usage;
 
        image->exclusive = pCreateInfo->sharingMode == VK_SHARING_MODE_EXCLUSIVE;
-       for (uint32_t i = 0; i < pCreateInfo->queueFamilyIndexCount; ++i)
-               image->queue_family_mask |= 1u << pCreateInfo->pQueueFamilyIndices[i];
+       if (pCreateInfo->sharingMode == VK_SHARING_MODE_CONCURRENT) {
+               for (uint32_t i = 0; i < pCreateInfo->queueFamilyIndexCount; ++i)
+                       image->queue_family_mask |= 1u << pCreateInfo->pQueueFamilyIndices[i];
+       }
 
        radv_init_surface(device, &image->surface, create_info);