mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 14:56:42 +00:00
Fix problems
This commit is contained in:
parent
7e188de47d
commit
583d08c250
@ -1115,7 +1115,6 @@ pub struct FormatProperties {
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone)]
|
||||
pub struct Extent3D {
|
||||
pub width: u32,
|
||||
pub height: u32,
|
||||
@ -1264,7 +1263,6 @@ pub struct PhysicalDeviceProperties {
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone)]
|
||||
pub struct QueueFamilyProperties {
|
||||
pub queueFlags: QueueFlags,
|
||||
pub queueCount: u32,
|
||||
@ -2504,7 +2502,6 @@ pub struct PhysicalDeviceImageFormatInfo2KHR {
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone)]
|
||||
pub struct QueueFamilyProperties2KHR {
|
||||
pub sType: StructureType,
|
||||
pub pNext: *const c_void,
|
||||
|
@ -218,10 +218,13 @@ impl Instance {
|
||||
devices
|
||||
};
|
||||
|
||||
// TODO: should be Into
|
||||
let extensions: InstanceExtensions = (&extensions).into();
|
||||
|
||||
// Getting the properties of all physical devices.
|
||||
// If possible, we use VK_KHR_get_physical_device_properties2.
|
||||
let physical_devices = if extensions.khr_get_physical_device_properties2 {
|
||||
Instance::init_physical_devices2(&vk, physical_devices, extensions)
|
||||
Instance::init_physical_devices2(&vk, physical_devices, &extensions)
|
||||
} else {
|
||||
Instance::init_physical_devices(&vk, physical_devices)
|
||||
};
|
||||
@ -231,7 +234,7 @@ impl Instance {
|
||||
//alloc: None,
|
||||
physical_devices: physical_devices,
|
||||
vk: vk,
|
||||
extensions: (&extensions).into(),
|
||||
extensions: extensions,
|
||||
layers: layers,
|
||||
}))
|
||||
}
|
||||
@ -304,11 +307,13 @@ impl Instance {
|
||||
let mut num = 0;
|
||||
vk.GetPhysicalDeviceQueueFamilyProperties2KHR(device, &mut num, ptr::null_mut());
|
||||
|
||||
let mut families = vec![vk::QueueFamilyProperties2KHR {
|
||||
sType: vk::STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR,
|
||||
pNext: ptr::null_mut(),
|
||||
queueFamilyProperties: mem::uninitialized(),
|
||||
}; num as usize];
|
||||
let mut families = (0 .. num).map(|_| {
|
||||
vk::QueueFamilyProperties2KHR {
|
||||
sType: vk::STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR,
|
||||
pNext: ptr::null_mut(),
|
||||
queueFamilyProperties: mem::uninitialized(),
|
||||
}
|
||||
}).collect::<Vec<_>>();
|
||||
|
||||
vk.GetPhysicalDeviceQueueFamilyProperties2KHR(device, &mut num,
|
||||
families.as_mut_ptr());
|
||||
|
Loading…
Reference in New Issue
Block a user