From 85a91d182c2fd705ad7aa2122319cc01e6367da4 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sun, 15 Nov 2026 10:37:01 -0800 Subject: [PATCH] RUNTIME 2367: Queue plan: a device made with its least plan reserves what its plan reserves, no more The 2080 round 9ce951f521-1115-0907 failed reserved_queues::a_device_with_no_queue_to_spare_reports_the_reserved_queue_absent: "11 asked, 11 reserved; no message", where queue_plan(families, u32::MAX) spares 10 (NVIDIA's graphics family of 16 less the round robin's floor of four and presenting's two). Asked for 11, the plan takes 4 + 2 + 10 plus the staging and fill queues, 18 VkQueues; the driver refused that for want of channels (um790's kernel log: "kchannelAllocMem_GM107: Could not create Channel" 19 times at 10:01 and 13 at 10:02, while the 780 s run that ended 10:04:38 was at the test), and made_within_resources took least_queue_plan: queue_plan_within(families, options.reserved_queues, {1, 0}), a round robin of one and reserved min(15, 11) = 11. 11 is what only that path gives. So a device short of resources gave the caller more reserved queues than the same device given them, and skipped the reserved-queues-absent message, though the least plan's notice and the runtime README say it keeps the plan's reserved queues. least_queue_plan now reserves as many as the device's own plan (within options.queue_limits) reserves; its round robin of one always leaves room for them, so no fewer either. Tests: - queue_limits::the_least_plan_reserves_what_the_plan_reserves: every family shape, reservation (0 to u32::MAX), limit and cached flag; fails without the fix on NVIDIA's shape asked for 11 (11 against 10) and on a family of 24. - reserved_queues::a_device_made_with_its_least_plan_reserves_what_its_plan_spares: the plan refused through refuse_next_devices(1), the device asked for spare + 1 takes its least plan (its notice heard, round robin 1) and reserves spare, reporting the rest absent; refused where the least plan takes no fewer (lavapipe, RADV). - The test sink records each message's id name with its text, so the least plan's notice is matched by its code. Docs: the degrade catalogue (docs/API.md), LeastQueuePlan's rustdoc and the runtime README's "A driver short of resources" say the reserved count is the plan's. Also: queue_share_device's pinned test takes a stay the sharing rule explains, as its siblings do (test only). Verified (msi, m3-max-33039): clippy plain 0; lavapipe reserved_queues, least_queue_plan, queue_limits and the pinned test 16/16. The 2080 run follows on development. --- crates/metal2vulkan-runtime/README.md | 12 +- .../metal2vulkan-runtime/src/degradation.rs | 9 +- .../metal2vulkan-runtime/src/device/create.rs | 19 +++- .../src/tests/queue_limits.rs | 50 +++++++- .../src/tests/queue_share_device.rs | 43 ++++++- .../src/tests/reserved_queues.rs | 107 ++++++++++++++---- crates/metal2vulkan/src/cache/mod.rs | 2 +- docs/API.md | 9 +- 8 files changed, 207 insertions(+), 44 deletions(-) diff --git a/crates/metal2vulkan-runtime/README.md b/crates/metal2vulkan-runtime/README.md index 50c952796..0b563f65b 100644 --- a/crates/metal2vulkan-runtime/README.md +++ b/crates/metal2vulkan-runtime/README.md @@ -236,12 +236,12 @@ Vulkan-side choices Metal has no counterpart for: for want of its resources (`vkCreateDevice` answering `VK_ERROR_TOO_MANY_OBJECTS`, `VK_ERROR_INITIALIZATION_FAILED`, `VK_ERROR_OUT_OF_DEVICE_MEMORY` or `VK_ERROR_OUT_OF_HOST_MEMORY`: on NVIDIA's driver, other devices of the GPU, in this process or others, holding what it needs, -such as its channels), the runtime asks once more with its least -plan's: a round robin of one `VkQueue` and none reserved for presenting, the reserved, extra, -staging and fill queues kept (`queue_limits` of one and none, without that option's messages). A -device made so announces `metal2vulkan-degrade-least-queue-plan` once, as it is made: its command -queues share that one `VkQueue`. A device the driver refuses again, or whose least plan takes no -fewer queues, is refused, `Error::DeviceRefused`. On an RTX 2080 with a 256 MiB BAR (NVIDIA +such as its channels), the runtime asks once more with its least plan's: a round robin of one +`VkQueue` and none reserved for presenting, the extra, staging and fill queues kept, and as many +reserved queues as the plan reserves, no more (`queue_limits` of one and none, without that +option's messages). A device made so announces `metal2vulkan-degrade-least-queue-plan` once, as +it is made: its command queues share that one `VkQueue`. A device the driver refuses again, or +whose least plan takes no fewer queues, is refused, `Error::DeviceRefused`. On an RTX 2080 with a 256 MiB BAR (NVIDIA 620.70.06), sixteen processes started 3 s apart, each making one device: seven devices were made with 17 `VkQueue`s and two more with 2 (one round-robin queue and the staging queue). The driver refused the other seven with both plans, and the kernel logged that it could not allocate a diff --git a/crates/metal2vulkan-runtime/src/degradation.rs b/crates/metal2vulkan-runtime/src/degradation.rs index 3680cebe6..9665feff2 100644 --- a/crates/metal2vulkan-runtime/src/degradation.rs +++ b/crates/metal2vulkan-runtime/src/degradation.rs @@ -2342,10 +2342,11 @@ degradations! { /// `VK_ERROR_OUT_OF_HOST_MEMORY`: on NVIDIA's driver, other devices of the GPU, in this /// process or others, holding what it needs, such as its channels), made with those of its /// least plan: a round robin of one `VkQueue` and none reserved for presenting, beside the - /// plan's reserved, extra, staging and fill queues (`DeviceOptions::queue_limits` of one - /// and none, without its informational messages). Announced once, as the device is made; - /// the payload names the device, the `VkQueue`s of each plan and the driver's answer. A - /// device the driver refuses with its least plan too is refused (`Error::DeviceRefused`). + /// plan's extra, staging and fill queues and as many reserved queues as the plan reserves, + /// no more (`DeviceOptions::queue_limits` of one and none, without its informational + /// messages). Announced once, as the device is made; the payload names the device, the + /// `VkQueue`s of each plan and the driver's answer. A device the driver refuses with its + /// least plan too is refused (`Error::DeviceRefused`). LeastQueuePlan = "least-queue-plan", Performance, "its command queues, presenting ones included, share one `VkQueue`, so one queue's \ command buffers wait behind another's whole command buffer where Metal's run beside \ diff --git a/crates/metal2vulkan-runtime/src/device/create.rs b/crates/metal2vulkan-runtime/src/device/create.rs index 39f568095..77d6832c7 100644 --- a/crates/metal2vulkan-runtime/src/device/create.rs +++ b/crates/metal2vulkan-runtime/src/device/create.rs @@ -1457,15 +1457,28 @@ pub(crate) const LEAST_QUEUE_LIMITS: QueueLimits = QueueLimits { /// The least queue plan of a device of `families` made with `options`, its textures' images in /// memory the host caches or not (`cached`, as [`queue_plan`] takes it): the plan within -/// [`LEAST_QUEUE_LIMITS`], with the reserved and extra queues `options` asks for, placed as -/// [`extra_queue_places`] places them. +/// [`LEAST_QUEUE_LIMITS`], with as many reserved queues as the device's own plan (within +/// `options`' queue limits) reserves of those `options` asks for, no more, and the extra queues +/// it asks for, placed as [`extra_queue_places`] places them. The least plan's round robin of +/// one leaves room for more reserved queues than the plan's floor of [`LEAST_QUEUES`] and +/// presenting's [`PRESENT_QUEUES`] do, but a device the driver refuses for want of its resources +/// takes no more queues for the caller than the plan gives: what the caller is given does not +/// change with the driver's answer (on an RTX 2080 asked for 11, 10 by the plan, not 11). pub(crate) fn least_queue_plan( families: &[vk::QueueFamilyProperties], options: &DeviceOptions, cached: bool, ) -> Option { + let planned = queue_plan_within( + families, + options.reserved_queues, + options.queue_limits, + cached, + )?; + // At most the family's queue count, so within `u32`. + let reserved = planned.reserved.len() as u32; let limits = Some(LEAST_QUEUE_LIMITS); - let mut plan = queue_plan_within(families, options.reserved_queues, limits, cached)?; + let mut plan = queue_plan_within(families, reserved, limits, cached)?; let extra = extra_queue_places(families, &mut plan, &options.extra_queues); Some((plan, extra)) } diff --git a/crates/metal2vulkan-runtime/src/tests/queue_limits.rs b/crates/metal2vulkan-runtime/src/tests/queue_limits.rs index 4c81c4e28..e779fccd4 100644 --- a/crates/metal2vulkan-runtime/src/tests/queue_limits.rs +++ b/crates/metal2vulkan-runtime/src/tests/queue_limits.rs @@ -279,7 +279,7 @@ fn planned(families: &[vk::QueueFamilyProperties], options: &DeviceOptions) -> P /// A device the driver refuses for want of its resources (`VK_ERROR_TOO_MANY_OBJECTS`, /// `VK_ERROR_INITIALIZATION_FAILED`, `VK_ERROR_OUT_OF_DEVICE_MEMORY`, /// `VK_ERROR_OUT_OF_HOST_MEMORY`) with its queue plan's `VkQueue`s is asked for once more with -/// its least plan's (the lane's limits: one for the round robin, none for presenting, the +/// its least plan's (the lane's limits: one for the round robin, none for presenting, the plan's /// reserved, extra, staging and fill queues kept), and made with them, saying what it took; refused /// twice, it is refused naming both attempts, and where the least plan takes no fewer (RADV's and /// lavapipe's one graphics queue) it is asked for once and refused naming it. Any other failure is @@ -376,6 +376,54 @@ fn a_device_refused_for_want_of_resources_is_asked_for_once_with_its_least_plan( } } +/// A device's least plan reserves as many queues as its plan, within the device's queue limits, +/// reserves of those asked for, no more and no fewer, for every shape, every reservation and +/// every limit: its round robin of one leaves room for more (NVIDIA's family of 16 asked for 11: +/// the plan's floor of four and presenting's two leave 10, the least plan's round robin 15), but +/// a device the driver refuses for want of its resources gives the caller what the plan gives. +#[test] +fn the_least_plan_reserves_what_the_plan_reserves() { + let limits = [ + None, + Some(TEST_QUEUE_LIMITS), + Some(LEAN), + Some(QueueLimits { + round_robin: 16, + presenting: 2, + }), + ]; + for families in shapes() { + for reserved in [0, 1, 2, 10, 11, 18, 23, 64, u32::MAX] { + for (queue_limits, cached) in limits + .into_iter() + .flat_map(|limits| [(limits, true), (limits, false)]) + { + let options = DeviceOptions { + reserved_queues: reserved, + queue_limits, + ..DeviceOptions::default() + }; + let plan = queue_plan_within(&families, reserved, queue_limits, cached).unwrap(); + let (least, _) = least_queue_plan(&families, &options, cached).unwrap(); + assert_eq!( + least.reserved.len(), + plan.reserved.len(), + "{} families, {reserved} asked, {queue_limits:?}, cached {cached}", + families.len() + ); + assert_eq!((least.queues.len(), least.present.len()), (1, 0)); + } + } + } + let options = DeviceOptions { + reserved_queues: 11, + queue_limits: None, + ..DeviceOptions::default() + }; + let (least, _) = least_queue_plan(&nvidia(), &options, true).unwrap(); + assert_eq!(least.reserved.len(), 10); +} + /// The runtime's own tests make their devices within their default limits /// (`DeviceOptions::default()` in the test build, `TEST_QUEUE_LIMITS`): four `VkQueue`s of /// NVIDIA's families (two for the round robin, the copy engine's staging and fill queues), where diff --git a/crates/metal2vulkan-runtime/src/tests/queue_share_device.rs b/crates/metal2vulkan-runtime/src/tests/queue_share_device.rs index a3a9b9b92..9449b8a0f 100644 --- a/crates/metal2vulkan-runtime/src/tests/queue_share_device.rs +++ b/crates/metal2vulkan-runtime/src/tests/queue_share_device.rs @@ -350,6 +350,13 @@ fn a_shared_event_wait_on_a_shared_vk_queue_committed_before_its_signal_complete }); } +/// A pinned queue and a presenting queue each make a command buffer at an idle point, with +/// another queue's `VkQueue` busy, eight times: neither ever moves. An unpinned queue in the same +/// place moves onto the busy `VkQueue` where the device shares, at every such choice where the +/// rule calls for a move: a stay is the rule's where it found no other `VkQueue` busy or passed +/// over the busy one for its oldest batch's age (`stayed_by_the_rule`, as the other tests here), +/// which beside other processes' GPU work every choice can (an RTX 2080 beside the runtime +/// suite's, whose check measured a switch of 603 us, moved at none of the eight). #[test] fn pinned_and_presenting_queues_never_move_where_an_unpinned_one_does() { each_policy("pinned", |device, shares| { @@ -365,15 +372,36 @@ fn pinned_and_presenting_queues_never_move_where_an_unpinned_one_does() { let (pinned_at, presenting_at) = (pinned.vk_queue_sharing().0, presenting.vk_queue_sharing().0); let mut free_moved = false; - for _ in 0..8 { + // The rounds where the unpinned queue stayed off the busy `VkQueue` though the rule called + // for a move, and those where it stayed by the rule. + let (mut unexplained, mut by_the_rule) = (Vec::new(), Vec::new()); + for round in 0..8 { for queue in [&pinned, &presenting, &free] { let kept = burst(&busy, &scratch, 24); - let before = queue.vk_queue_sharing().0; + let (at, before) = (queue.vk_queue_sharing().0, device.work_counts()); wait_all(burst(queue, &scratch, 1)); - free_moved |= std::ptr::eq(queue, &free) && queue.vk_queue_sharing().0 != before; + if std::ptr::eq(queue, &free) { + let moved = queue.vk_queue_sharing().0 != at; + free_moved |= moved; + if !moved && at != busy.vk_queue_sharing().0 { + match stayed_by_the_rule(&before, &device.work_counts()) { + true => by_the_rule.push(round), + false => unexplained.push(round), + } + } + } wait_all(kept); } } + let counts = device.work_counts(); + println!( + "the unpinned queue moved: {free_moved}; stayed by the rule in rounds {by_the_rule:?}; \ + choices with none busy {}, old heads passed over {}, queues gone long {}, moves {}", + counts.picks_with_none_busy, + counts.joins_withheld_from_old_heads, + counts.queues_gone_long, + counts.queue_moves + ); assert_eq!( pinned.vk_queue_sharing().0, pinned_at, @@ -386,8 +414,13 @@ fn pinned_and_presenting_queues_never_move_where_an_unpinned_one_does() { ); if shares { assert!( - free_moved, - "the unpinned queue moved where the device shares" + unexplained.is_empty(), + "the unpinned queue stayed off the busy VkQueue where the device shares, in rounds \ + {unexplained:?}" + ); + assert!( + free_moved || !by_the_rule.is_empty(), + "the unpinned queue was never off the busy VkQueue" ); } }); diff --git a/crates/metal2vulkan-runtime/src/tests/reserved_queues.rs b/crates/metal2vulkan-runtime/src/tests/reserved_queues.rs index fe16e1e80..87bf832d5 100644 --- a/crates/metal2vulkan-runtime/src/tests/reserved_queues.rs +++ b/crates/metal2vulkan-runtime/src/tests/reserved_queues.rs @@ -5,19 +5,21 @@ //! moves the runtime's own buffers between command buffers that order it through a shared //! event's semaphore. A device with no queue to spare (MoltenVK's four families of one queue, //! lavapipe's one queue) reserves none, says so in an informational message -//! (`metal2vulkan-reserved-queues-absent`), and is made and runs work all the same. +//! (`metal2vulkan-reserved-queues-absent`), and is made and runs work all the same. A device the +//! driver refuses for want of its resources, made with its least queue plan, reserves no more +//! than its plan does. //! //! Each prints what the device reported (`RESERVED-QUEUE:` lines), which is the evidence of the -//! path that ran: on a device with no queue to spare, the first and third tests check only that -//! nothing was reserved and that the absence was reported. +//! path that ran: on a device with no queue to spare, the first test and the raw copy's check only +//! that nothing was reserved and that the absence was reported. //! //! Device tests: compiled only under the GPU safety cfgs (`m2v_gpu`, `m2v_cpu_icd`), on the kind //! of device the cfg selects. use super::blit_holds::{Scratch, WAIT}; -use crate::device::create::{queue_plan, LEAST_QUEUES, ROUND_ROBIN_CEILING}; +use crate::device::create::{queue_plan, refuse_next_devices, LEAST_QUEUES, ROUND_ROBIN_CEILING}; use crate::{ - CommandBufferStatus, CommandQueue, Device, DeviceKind, DeviceOptions, MessageSink, + CommandBufferStatus, CommandQueue, Device, DeviceKind, DeviceOptions, Error, MessageSink, ReservedQueue, ResourceOptions, ShaderCacheOptions, VkEventSignal, VkEventWait, }; use ash::vk; @@ -32,11 +34,15 @@ const MOST: usize = 17; /// The id name of the message a device with fewer reserved queues than asked sends. const ABSENT: &str = "metal2vulkan-reserved-queues-absent"; -/// The device the cfg selects, its shader cache in `cache`, with `reserved` queues asked for and -/// its messages kept in `messages`. -fn device(cache: &Path, reserved: u32, messages: &Arc>>) -> Device { +/// The id name of the notice a device made with its least queue plan announces. +const LEAST_PLAN: &str = "metal2vulkan-degrade-least-queue-plan"; + +/// The options of the device the cfg selects, its shader cache in `cache`, with `reserved` queues +/// asked for and its messages kept in `messages`, each its id name (a degrade notice's code) and +/// its text. +fn options(cache: &Path, reserved: u32, messages: &Arc>>) -> DeviceOptions { let kept = Arc::clone(messages); - let options = DeviceOptions { + DeviceOptions { kinds: match cfg!(m2v_cpu_icd) { true => vec![DeviceKind::Cpu], false => vec![ @@ -53,11 +59,27 @@ fn device(cache: &Path, reserved: u32, messages: &Arc>>) -> De // The plan, whose reserved queues these are. queue_limits: None, messages: Some(MessageSink::new(move |message| { - kept.lock().unwrap().push(message.text.clone()); + (kept.lock().unwrap()).push(format!("{} {}", message.id_name, message.text)); })), ..DeviceOptions::default() - }; - Device::system_default_with(&options).unwrap() + } +} + +/// That device. +fn device(cache: &Path, reserved: u32, messages: &Arc>>) -> Device { + Device::system_default_with(&options(cache, reserved, messages)).unwrap() +} + +/// How many queues a device of the families of the device the cfg selects spares for the caller +/// by its queue plan: past its round robin's floor and presenting's queues. +fn spare(cache: &Path) -> usize { + let probe = device(cache, 0, &Arc::new(Mutex::new(Vec::new()))); + let families = families(&probe); + drop(probe); + queue_plan(&families, u32::MAX, true) + .unwrap() + .reserved + .len() } /// The device's queue family properties. @@ -195,17 +217,13 @@ fn a_reserved_queue_is_a_runtime_family_s_and_no_command_queue_takes_it() { /// A device asked for one queue more than its families spare (one, on a device with none to /// spare: MoltenVK's, lavapipe's) reserves what it spares, reports the rest absent in an -/// informational message, and is made: a command buffer of its runs and completes. +/// informational message, and is made: a command buffer of its runs and completes. Made with its +/// queue plan or, where the driver refuses that for want of its resources (an RTX 2080 beside +/// the runtime suite's other devices), its least plan, which reserves no more. #[test] fn a_device_with_no_queue_to_spare_reports_the_reserved_queue_absent() { let scratch = Scratch::new("reserved-queue-absent"); - let probe_messages = Arc::new(Mutex::new(Vec::new())); - let probe = device(&scratch.0, 0, &probe_messages); - let spare = queue_plan(&families(&probe), u32::MAX, true) - .unwrap() - .reserved - .len(); - drop(probe); + let spare = spare(&scratch.0); let asked = spare as u32 + 1; let messages = Arc::new(Mutex::new(Vec::new())); let device = device(&scratch.0, asked, &messages); @@ -243,6 +261,55 @@ fn a_device_with_no_queue_to_spare_reports_the_reserved_queue_absent() { assert!(bytes.iter().all(|&b| b == 0xa5)); } +/// A device the driver refuses for want of its resources with its queue plan's `VkQueue`s, made +/// with its least plan's (`create.rs`'s `made_within_resources`, the refusal stood in for by +/// `refuse_next_devices`), asked for one queue more than its families spare, reserves what its +/// plan spares, no more, though the least plan's round robin of one leaves room for more, and +/// reports the rest absent: on an RTX 2080 beside the runtime suite's other devices, a device of +/// the least plan asked for 11 reserved all 11 where the plan spares 10. Where the least plan +/// takes no fewer `VkQueue`s (lavapipe's and RADV's one graphics queue), or the driver refuses it +/// too, the device is refused, and that is all that is checked. Its `RESERVED-QUEUE:` line and +/// the least plan's notice are the evidence of the path that ran. +#[test] +fn a_device_made_with_its_least_plan_reserves_what_its_plan_spares() { + let scratch = Scratch::new("reserved-queue-least"); + let spare = spare(&scratch.0); + let asked = spare as u32 + 1; + let messages = Arc::new(Mutex::new(Vec::new())); + refuse_next_devices(1); + let made = Device::system_default_with(&options(&scratch.0, asked, &messages)); + // The refusal stood in for the driver's, which no later device meets. + refuse_next_devices(0); + let device = match made { + Ok(device) => device, + Err(Error::DeviceRefused(refused)) => { + println!("RESERVED-QUEUE: refused: {refused}"); + return; + } + Err(error) => panic!("the device: {error}"), + }; + // SAFETY: the handles are read while the device lives. + let raw = unsafe { device.raw() }; + let text = messages.lock().unwrap().join("\n"); + println!( + "RESERVED-QUEUE: {}: least plan, {asked} asked, {} reserved, round robin {}; {}", + device.name(), + raw.reserved_queues.len(), + device.shared().round_robin(), + (text.lines()) + .find(|line| line.contains(ABSENT)) + .unwrap_or("no message") + ); + assert!(text.contains(LEAST_PLAN), "no {LEAST_PLAN} notice: {text}"); + assert_eq!(device.shared().round_robin(), 1); + assert_eq!(raw.reserved_queues.len(), spare); + assert!( + text.contains(&format!("reserved {spare} of the {asked} queue(s)")) + && text.contains(ABSENT), + "the absence is reported: {text}" + ); +} + /// A raw copy on a reserved queue moves the runtime's own buffers, with no ownership transfer: /// it waits for a command buffer's `encodeSignalEvent:` (the fill of its source), where the /// signal is not reached as it asks (`VkEventWait::Reached` needs no wait), and signals diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index 39ac9b777..d441042cd 100644 --- a/crates/metal2vulkan/src/cache/mod.rs +++ b/crates/metal2vulkan/src/cache/mod.rs @@ -94,7 +94,7 @@ pub const ARTIFACT_FORMAT_VERSION: u32 = 523; /// changes no behaviour, and then updates that hash alone with the commit saying why, or changes /// behaviour and also bumps this version. The commit that bumps it says what changed; this comment /// keeps no history. -pub const RUNTIME_VERSION: u32 = 2366; +pub const RUNTIME_VERSION: u32 = 2367; /// The digest of the sources this build of the crate was compiled from: SHA-256, as lowercase hex, /// of the manifest, the build script, and exactly the files the crate roots' module tree compiles diff --git a/docs/API.md b/docs/API.md index 7089ceb7e..107548757 100644 --- a/docs/API.md +++ b/docs/API.md @@ -4080,10 +4080,11 @@ bound. answering `VK_ERROR_TOO_MANY_OBJECTS`, `VK_ERROR_INITIALIZATION_FAILED`, `VK_ERROR_OUT_OF_DEVICE_MEMORY` or `VK_ERROR_OUT_OF_HOST_MEMORY`; on NVIDIA's driver, other devices of the GPU holding what it needs, such as its channels), made with those of its - least plan: a round robin of one `VkQueue` and none reserved for presenting, beside the reserved, - extra, staging and fill queues. Announced once, as the device is made, naming the `VkQueue`s of - each plan and the driver's answer; a device the driver refuses with the least plan too is refused, - `Error::DeviceRefused`. Cost: its command queues, presenting ones included, share one `VkQueue`, + least plan: a round robin of one `VkQueue` and none reserved for presenting, beside the extra, + staging and fill queues and as many reserved queues as the plan reserves, no more. Announced + once, as the device is made, naming the `VkQueue`s of each plan and the driver's answer; a + device the driver refuses with the least plan too is refused, `Error::DeviceRefused`. Cost: its + command queues, presenting ones included, share one `VkQueue`, so one queue's command buffers wait behind another's whole command buffer where Metal's run beside each other; what each command buffer does is the same. - `metal2vulkan-degrade-device-recovered` (performance). `DeviceRecovered`: A device whose