diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-05-22 23:50:13 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-06-05 02:26:43 +0200 |
commit | d513473cc167455a255a406a5a30e92fa0445ec8 (patch) | |
tree | ac477ae15e038569f240c6374926ddff2b95d48a /src/amd/vulkan/radv_image.c | |
parent | a935cd926b5f96d71e84a20b2e165b9903bfa879 (diff) |
radv: Add support for external queue family.
Signed-off-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_image.c')
-rw-r--r-- | src/amd/vulkan/radv_image.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 9a76d285242..22bc6b41da8 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -644,7 +644,10 @@ radv_image_create(VkDevice _device, image->exclusive = pCreateInfo->sharingMode == VK_SHARING_MODE_EXCLUSIVE; if (pCreateInfo->sharingMode == VK_SHARING_MODE_CONCURRENT) { for (uint32_t i = 0; i < pCreateInfo->queueFamilyIndexCount; ++i) - image->queue_family_mask |= 1u << pCreateInfo->pQueueFamilyIndices[i]; + if (pCreateInfo->pQueueFamilyIndices[i] == VK_QUEUE_FAMILY_EXTERNAL_KHX) + image->queue_family_mask |= (1u << RADV_MAX_QUEUE_FAMILIES) - 1u; + else + image->queue_family_mask |= 1u << pCreateInfo->pQueueFamilyIndices[i]; } radv_init_surface(device, &image->surface, create_info); @@ -803,6 +806,8 @@ unsigned radv_image_queue_family_mask(const struct radv_image *image, uint32_t f { if (!image->exclusive) return image->queue_family_mask; + if (family == VK_QUEUE_FAMILY_EXTERNAL_KHX) + return (1u << RADV_MAX_QUEUE_FAMILIES) - 1u; if (family == VK_QUEUE_FAMILY_IGNORED) return 1u << queue_family; return 1u << family; |