diff options
author | Dave Airlie <[email protected]> | 2017-01-31 15:18:33 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-02-02 08:25:04 +1000 |
commit | cda9f3d8ecce663b53c982236557dcd1b70a25b0 (patch) | |
tree | 3fecd565b3772b154fc5e4fbb0647e8c91d0fc80 /src/amd/vulkan/radv_image.c | |
parent | fa316ed02ff0c2c4c8121380d23f2e66ac87649f (diff) |
radv: handle VK_QUEUE_FAMILY_IGNORED in image transitions (v3)
The CTS tests at least are using this, and we were totally
ignoring it.
This hopefully fixes the bouncing multisample CTS tests.
v2: get family mask in ignored case from command buffer.
v3: only change things in one place, use logic from Bas.
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.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index f75f0088495..99d17376cf6 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -905,10 +905,13 @@ bool radv_layout_can_fast_clear(const struct radv_image *image, } -unsigned radv_image_queue_family_mask(const struct radv_image *image, int family) { - if (image->exclusive) - return 1u <<family; - return image->queue_family_mask; +unsigned radv_image_queue_family_mask(const struct radv_image *image, uint32_t family, uint32_t queue_family) +{ + if (!image->exclusive) + return image->queue_family_mask; + if (family == VK_QUEUE_FAMILY_IGNORED) + return 1u << queue_family; + return 1u << family; } VkResult |