[PATCH vkd3d 1/2] vkd3d: Map the copy queue to the compute queue if necessary and possible.
Conor McCarthy
cmccarthy at codeweavers.com
Thu Dec 12 06:31:11 CST 2019
The current implementation maps copy to direct unless a dedicated copy
queue is present. Compute queues are often more lightly loaded and there
is usually more than one available.
Signed-off-by: Conor McCarthy <cmccarthy at codeweavers.com>
---
libs/vkd3d/device.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c
index 757d4ac..ad32ff2 100644
--- a/libs/vkd3d/device.c
+++ b/libs/vkd3d/device.c
@@ -1667,8 +1667,16 @@ static HRESULT vkd3d_select_queues(const struct vkd3d_instance *vkd3d_instance,
}
if (info->family_index[VKD3D_QUEUE_FAMILY_TRANSFER] == ~0u)
{
- info->family_index[VKD3D_QUEUE_FAMILY_TRANSFER] = info->family_index[VKD3D_QUEUE_FAMILY_DIRECT];
- info->vk_properties[VKD3D_QUEUE_FAMILY_TRANSFER] = info->vk_properties[VKD3D_QUEUE_FAMILY_DIRECT];
+ if (info->vk_properties[VKD3D_QUEUE_FAMILY_COMPUTE].queueFlags & VK_QUEUE_TRANSFER_BIT)
+ {
+ info->family_index[VKD3D_QUEUE_FAMILY_TRANSFER] = info->family_index[VKD3D_QUEUE_FAMILY_COMPUTE];
+ info->vk_properties[VKD3D_QUEUE_FAMILY_TRANSFER] = info->vk_properties[VKD3D_QUEUE_FAMILY_COMPUTE];
+ }
+ else
+ {
+ info->family_index[VKD3D_QUEUE_FAMILY_TRANSFER] = info->family_index[VKD3D_QUEUE_FAMILY_DIRECT];
+ info->vk_properties[VKD3D_QUEUE_FAMILY_TRANSFER] = info->vk_properties[VKD3D_QUEUE_FAMILY_DIRECT];
+ }
}
/* Compact the array. */
--
2.24.0
More information about the wine-devel
mailing list