Fix instance getters to support extensions
This commit allows the user to pass in a chain of structures to be filled in by the Vulkan driver.
This commit is contained in:
parent
898e9791b7
commit
53161660ef
|
@ -108,16 +108,13 @@ pub trait InstanceV1_1: InstanceV1_0 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_physical_device_properties2(
|
unsafe fn get_physical_device_properties2(
|
||||||
&self,
|
&self,
|
||||||
physical_device: vk::PhysicalDevice,
|
physical_device: vk::PhysicalDevice,
|
||||||
) -> vk::PhysicalDeviceProperties2 {
|
prop: &mut vk::PhysicalDeviceProperties2,
|
||||||
unsafe {
|
) {
|
||||||
let mut prop = mem::uninitialized();
|
|
||||||
self.fp_v1_1()
|
self.fp_v1_1()
|
||||||
.get_physical_device_properties2(physical_device, &mut prop);
|
.get_physical_device_properties2(physical_device, prop);
|
||||||
prop
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_physical_device_format_properties2(
|
fn get_physical_device_format_properties2(
|
||||||
|
@ -140,15 +137,15 @@ pub trait InstanceV1_1: InstanceV1_0 {
|
||||||
&self,
|
&self,
|
||||||
physical_device: vk::PhysicalDevice,
|
physical_device: vk::PhysicalDevice,
|
||||||
format_info: &vk::PhysicalDeviceImageFormatInfo2,
|
format_info: &vk::PhysicalDeviceImageFormatInfo2,
|
||||||
) -> VkResult<vk::ImageFormatProperties2> {
|
image_format_prop: &mut vk::ImageFormatProperties2
|
||||||
let mut image_format_prop = mem::uninitialized();
|
) -> VkResult<()> {
|
||||||
let err_code = self.fp_v1_1().get_physical_device_image_format_properties2(
|
let err_code = self.fp_v1_1().get_physical_device_image_format_properties2(
|
||||||
physical_device,
|
physical_device,
|
||||||
format_info,
|
format_info,
|
||||||
&mut image_format_prop,
|
image_format_prop,
|
||||||
);
|
);
|
||||||
if err_code == vk::Result::SUCCESS {
|
if err_code == vk::Result::SUCCESS {
|
||||||
Ok(image_format_prop)
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
Err(err_code)
|
Err(err_code)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue