fix(hal/vulkan): Use queue family index modified by device open callback (#9965)

This commit is contained in:
Andy Leiserson authored and GitHub committed 2026-08-03 06:19:50 -04:00
1 parent b991e6025d
commit 9c05b85ce5
2 files changed
+9 -7

No files matched your search

+5 -6
View File
@@ -3011,11 +3011,10 @@ impl super::Adapter {
let mut enabled_extensions = self.required_device_extensions(features);
let mut enabled_phd_features = self.physical_device_features(&enabled_extensions, features);
let family_index = 0; //TODO
let family_info = vk::DeviceQueueCreateInfo::default()
.queue_family_index(family_index)
.queue_priorities(&[1.0]);
let mut family_infos = Vec::from([family_info]);
let default_family_index = 0;
let mut family_infos = vec![vk::DeviceQueueCreateInfo::default()
.queue_family_index(default_family_index)
.queue_priorities(&[1.0])];
let mut pre_info = vk::DeviceCreateInfo::default();
@@ -3069,7 +3068,7 @@ impl super::Adapter {
features,
limits,
memory_hints,
family_info.queue_family_index,
family_infos[0].queue_family_index,
0,
)
}
+4 -1
View File
@@ -1710,7 +1710,10 @@ where
pub extensions: &'arg mut Vec<&'static CStr>,
/// The physical device features to enable. You may enable features, but must not disable any.
pub device_features: &'arg mut PhysicalDeviceFeatures,
/// The queue create infos for the device. You may add or modify queue create infos as needed.
/// The queue create infos for the device. You may substitute a different queue, but:
/// 1. Any queue you provide must be compatible with `wgpu`'s usage,
/// 2. You must not leave the vector empty,
/// 3. `wgpu` currently only uses the first entry.
pub queue_create_infos: &'arg mut Vec<vk::DeviceQueueCreateInfo<'pnext>>,
/// The create info for the device. You may add or modify things in the pnext chain, but
/// do not turn features off. Additionally, do not add things to the list of extensions,