forge
Explore
Log in

Don't you dare go Hollow

B18: vk-video-ffi pick first device with both video and graphics/compute queues

Browse files at this commit

63feeb6ddf8107a1a0f3a298a72e1b941ea17d94Ahmet Kaan GümüşParent: 22f0f3f
setup() chose the first device with a video queue, then failed with NoDevice
when that device had no graphics/compute family, even if a later device had
both. The predicate now requires graphics too. Verified: cargo check and
clippy clean for the edited lines; golden_hw is run by the orchestrator.
shims/vk-video-ffi/src/lib.rsmodified+1 -1
@@ -235,7 +235,7 @@ fn setup(instance: &Instance) -> Result<(vk::PhysicalDevice, Device, String, u32
235 .into_iter()235 .into_iter()
236 .find_map(|pd| {236 .find_map(|pd| {
237 let f = queue_families(instance, pd);237 let f = queue_families(instance, pd);
238- (f.encode.is_some() || f.decode.is_some()).then_some((pd, f))238+ (f.graphics.is_some() && (f.encode.is_some() || f.decode.is_some())).then_some((pd, f))
239 })239 })
240 .ok_or(Error::NoDevice)?;240 .ok_or(Error::NoDevice)?;
241 let graphics = families.graphics.ok_or(Error::NoDevice)?;241 let graphics = families.graphics.ok_or(Error::NoDevice)?;