summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_image.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2016-12-21 23:28:40 +0000
committerDave Airlie <[email protected]>2016-12-21 23:33:04 +0000
commit56020c7a7cda3831fb1fcd4318b453229ff6f91d (patch)
tree16079809037da6cd4574ad5b0b726f42d13461ed /src/amd/vulkan/radv_image.c
parent9d23b8a18e3e83c629f575f94b66c347ec81d704 (diff)
radv/image: only touch queue family info for concurrent images.
The spec says to ignore these fields for exclusive images. Fixes crashes in: dEQP-VK.clipping.* Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_image.c')
-rw-r--r--src/amd/vulkan/radv_image.c6
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);