diff options
-rw-r--r-- | src/amd/vulkan/radv_image.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index a0287fcb3eb..6e03f496d4b 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -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); |