[Vk] Run async readbacks on a second general queue family when no dedicated one exists

The async readback queue was only taken from a family without graphics,
so drivers that expose several general families (each its own hardware
queue) kept every guest readback on the main queue and the command
worker. Any other family with transfer support now qualifies after the
dedicated transfer and compute families.

(cherry picked from commit 7b04d6185dfc1711f0fbdf5c75c842a065acd1fa)
This commit is contained in:
kuba 2026-10-04 19:41:35 +02:00
parent a17aaca533
commit 2239f01987
1 changed files with 9 additions and 1 deletions

View File

@ -684,6 +684,7 @@ internal static unsafe partial class VulkanVideoPresenter
}
uint? compute = null;
uint? general = null;
for (uint index = 0; index < count; index++)
{
var flags = families[index].QueueFlags;
@ -701,9 +702,16 @@ internal static unsafe partial class VulkanVideoPresenter
{
compute ??= index;
}
// MoltenVK exposes only general families, one queue each, every one its own
// Metal command queue: a second one still runs readbacks beside the main queue.
if ((flags & (QueueFlags.TransferBit | QueueFlags.GraphicsBit | QueueFlags.ComputeBit)) != 0)
{
general ??= index;
}
}
return compute;
return compute ?? general;
}
private bool _supportsFragmentShaderBarycentric;