Add high level wrappers for Vulkan 1.2 (#265)

* Update doc links

* Added `EntryV1_1` impl and notice about compatibility

* Add missing `InstanceV1_1::get_physical_device_features2` function

* Add Vulkan 1.2 wrapper for `Entry`

* Add Vulkan 1.2 wrapper for `Instance`

* Add Vulkan 1.2 wrapper for `Device`

* Mark `enumerate_instance_version` as deprecated
This commit is contained in:
Friz64 2020-01-26 09:27:26 +01:00 committed by Maik Klein
parent 00f52cc5ad
commit 594b184c38
22 changed files with 476 additions and 228 deletions

File diff suppressed because it is too large Load diff

View file

@ -36,6 +36,7 @@ pub struct EntryCustom<L> {
static_fn: vk::StaticFn,
entry_fn_1_0: vk::EntryFnV1_0,
entry_fn_1_1: vk::EntryFnV1_1,
entry_fn_1_2: vk::EntryFnV1_2,
lib: L,
}
@ -76,14 +77,14 @@ pub trait EntryV1_0 {
type Instance;
fn fp_v1_0(&self) -> &vk::EntryFnV1_0;
fn static_fn(&self) -> &vk::StaticFn;
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateInstance.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateInstance.html>"]
unsafe fn create_instance(
&self,
create_info: &vk::InstanceCreateInfo,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> Result<Self::Instance, InstanceError>;
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkEnumerateInstanceLayerProperties.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumerateInstanceLayerProperties.html>"]
fn enumerate_instance_layer_properties(&self) -> VkResult<Vec<vk::LayerProperties>> {
unsafe {
let mut num = 0;
@ -102,7 +103,7 @@ pub trait EntryV1_0 {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkEnumerateInstanceExtensionProperties.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumerateInstanceExtensionProperties.html>"]
fn enumerate_instance_extension_properties(&self) -> VkResult<Vec<vk::ExtensionProperties>> {
unsafe {
let mut num = 0;
@ -125,7 +126,7 @@ pub trait EntryV1_0 {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetInstanceProcAddr.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetInstanceProcAddr.html>"]
unsafe fn get_instance_proc_addr(
&self,
instance: vk::Instance,
@ -137,7 +138,7 @@ pub trait EntryV1_0 {
impl<L> EntryV1_0 for EntryCustom<L> {
type Instance = Instance;
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateInstance.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateInstance.html>"]
unsafe fn create_instance(
&self,
create_info: &vk::InstanceCreateInfo,
@ -166,7 +167,8 @@ impl<L> EntryV1_0 for EntryCustom<L> {
pub trait EntryV1_1: EntryV1_0 {
fn fp_v1_1(&self) -> &vk::EntryFnV1_1;
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkEnumerateInstanceVersion.html>"]
#[deprecated = "This function is unavailable and therefore panics on Vulkan 1.0, please use `try_enumerate_instance_version` instead"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumerateInstanceVersion.html>"]
fn enumerate_instance_version(&self) -> VkResult<u32> {
unsafe {
let mut api_version = 0;
@ -179,6 +181,23 @@ pub trait EntryV1_1: EntryV1_0 {
}
}
impl<L> EntryV1_1 for EntryCustom<L> {
fn fp_v1_1(&self) -> &vk::EntryFnV1_1 {
&self.entry_fn_1_1
}
}
#[allow(non_camel_case_types)]
pub trait EntryV1_2: EntryV1_1 {
fn fp_v1_2(&self) -> &vk::EntryFnV1_2;
}
impl<L> EntryV1_2 for EntryCustom<L> {
fn fp_v1_2(&self) -> &vk::EntryFnV1_2 {
&self.entry_fn_1_2
}
}
impl EntryCustom<Arc<DynamicLibrary>> {
/// ```rust,no_run
/// use ash::{vk, Entry, version::EntryV1_0};
@ -228,15 +247,20 @@ impl<L> EntryCustom<L> {
mem::transmute(static_fn.get_instance_proc_addr(vk::Instance::null(), name.as_ptr()))
});
let entry_fn_1_2 = vk::EntryFnV1_2::load(|name| unsafe {
mem::transmute(static_fn.get_instance_proc_addr(vk::Instance::null(), name.as_ptr()))
});
Ok(EntryCustom {
static_fn,
entry_fn_1_0,
entry_fn_1_1,
entry_fn_1_2,
lib,
})
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkEnumerateInstanceVersion.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumerateInstanceVersion.html>"]
/// ```rust,no_run
/// # use ash::{Entry, vk};
/// # fn main() -> Result<(), Box<std::error::Error>> {

View file

@ -22,7 +22,7 @@ impl DebugMarker {
vk::ExtDebugMarkerFn::name()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkDebugMarkerSetObjectNameEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDebugMarkerSetObjectNameEXT.html>"]
pub unsafe fn debug_marker_set_object_name(
&self,
device: vk::Device,
@ -37,7 +37,7 @@ impl DebugMarker {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdDebugMarkerBeginEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDebugMarkerBeginEXT.html>"]
pub unsafe fn cmd_debug_marker_begin(
&self,
command_buffer: vk::CommandBuffer,
@ -47,13 +47,13 @@ impl DebugMarker {
.cmd_debug_marker_begin_ext(command_buffer, marker_info);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdDebugMarkerEndEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDebugMarkerEndEXT.html>"]
pub unsafe fn cmd_debug_marker_end(&self, command_buffer: vk::CommandBuffer) {
self.debug_marker_fn
.cmd_debug_marker_end_ext(command_buffer);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdDebugMarkerInsertEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDebugMarkerInsertEXT.html>"]
pub unsafe fn cmd_debug_marker_insert(
&self,
command_buffer: vk::CommandBuffer,

View file

@ -27,7 +27,7 @@ impl DebugReport {
vk::ExtDebugReportFn::name()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkDestroyDebugReportCallbackEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyDebugReportCallbackEXT.html>"]
pub unsafe fn destroy_debug_report_callback(
&self,
debug: vk::DebugReportCallbackEXT,
@ -40,7 +40,7 @@ impl DebugReport {
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateDebugReportCallbackEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateDebugReportCallbackEXT.html>"]
pub unsafe fn create_debug_report_callback(
&self,
create_info: &vk::DebugReportCallbackCreateInfoEXT,

View file

@ -26,7 +26,7 @@ impl DebugUtils {
vk::ExtDebugUtilsFn::name()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkSetDebugUtilsObjectNameEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkSetDebugUtilsObjectNameEXT.html>"]
pub unsafe fn debug_utils_set_object_name(
&self,
device: vk::Device,
@ -41,7 +41,7 @@ impl DebugUtils {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkSetDebugUtilsObjectTagEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkSetDebugUtilsObjectTagEXT.html>"]
pub unsafe fn debug_utils_set_object_tag(
&self,
device: vk::Device,
@ -56,7 +56,7 @@ impl DebugUtils {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdBeginDebugUtilsLabelEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBeginDebugUtilsLabelEXT.html>"]
pub unsafe fn cmd_begin_debug_utils_label(
&self,
command_buffer: vk::CommandBuffer,
@ -66,13 +66,13 @@ impl DebugUtils {
.cmd_begin_debug_utils_label_ext(command_buffer, label);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdEndDebugUtilsLabelEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdEndDebugUtilsLabelEXT.html>"]
pub unsafe fn cmd_end_debug_utils_label(&self, command_buffer: vk::CommandBuffer) {
self.debug_utils_fn
.cmd_end_debug_utils_label_ext(command_buffer);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdInsertDebugUtilsLabelEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdInsertDebugUtilsLabelEXT.html>"]
pub unsafe fn cmd_insert_debug_utils_label(
&self,
command_buffer: vk::CommandBuffer,
@ -82,7 +82,7 @@ impl DebugUtils {
.cmd_insert_debug_utils_label_ext(command_buffer, label);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkQueueBeginDebugUtilsLabelEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkQueueBeginDebugUtilsLabelEXT.html>"]
pub unsafe fn queue_begin_debug_utils_label(
&self,
queue: vk::Queue,
@ -92,12 +92,12 @@ impl DebugUtils {
.queue_begin_debug_utils_label_ext(queue, label);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkQueueEndDebugUtilsLabelEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkQueueEndDebugUtilsLabelEXT.html>"]
pub unsafe fn queue_end_debug_utils_label(&self, queue: vk::Queue) {
self.debug_utils_fn.queue_end_debug_utils_label_ext(queue);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkQueueInsertDebugUtilsLabelEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkQueueInsertDebugUtilsLabelEXT.html>"]
pub unsafe fn queue_insert_debug_utils_label(
&self,
queue: vk::Queue,
@ -107,7 +107,7 @@ impl DebugUtils {
.queue_insert_debug_utils_label_ext(queue, label);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateDebugUtilsMessengerEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateDebugUtilsMessengerEXT.html>"]
pub unsafe fn create_debug_utils_messenger(
&self,
create_info: &vk::DebugUtilsMessengerCreateInfoEXT,
@ -126,7 +126,7 @@ impl DebugUtils {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkDestroyDebugUtilsMessengerEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyDebugUtilsMessengerEXT.html>"]
pub unsafe fn destroy_debug_utils_messenger(
&self,
messenger: vk::DebugUtilsMessengerEXT,
@ -139,7 +139,7 @@ impl DebugUtils {
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkSubmitDebugUtilsMessageEXT.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkSubmitDebugUtilsMessageEXT.html>"]
pub unsafe fn submit_debug_utils_message(
&self,
instance: vk::Instance,

View file

@ -27,7 +27,7 @@ impl AndroidSurface {
vk::KhrAndroidSurfaceFn::name()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateAndroidSurfaceKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateAndroidSurfaceKHR.html>"]
pub unsafe fn create_android_surface(
&self,
create_info: &vk::AndroidSurfaceCreateInfoKHR,

View file

@ -27,7 +27,7 @@ impl Display {
vk::KhrDisplayFn::name()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceDisplayPropertiesKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceDisplayPropertiesKHR.html>"]
pub unsafe fn get_physical_device_display_properties(
&self,
physical_device: vk::PhysicalDevice,
@ -51,7 +51,7 @@ impl Display {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceDisplayPlanePropertiesKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceDisplayPlanePropertiesKHR.html>"]
pub unsafe fn get_physical_device_display_plane_properties(
&self,
physical_device: vk::PhysicalDevice,
@ -78,7 +78,7 @@ impl Display {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetDisplayPlaneSupportedDisplaysKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetDisplayPlaneSupportedDisplaysKHR.html>"]
pub unsafe fn get_display_plane_supported_displays(
&self,
physical_device: vk::PhysicalDevice,
@ -105,7 +105,7 @@ impl Display {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetDisplayModePropertiesKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetDisplayModePropertiesKHR.html>"]
pub unsafe fn get_display_mode_properties(
&self,
physical_device: vk::PhysicalDevice,
@ -132,7 +132,7 @@ impl Display {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateDisplayModeKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateDisplayModeKHR.html>"]
pub unsafe fn create_display_mode(
&self,
physical_device: vk::PhysicalDevice,
@ -154,7 +154,7 @@ impl Display {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetDisplayPlaneCapabilitiesKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetDisplayPlaneCapabilitiesKHR.html>"]
pub unsafe fn get_display_plane_capabilities(
&self,
physical_device: vk::PhysicalDevice,
@ -174,7 +174,7 @@ impl Display {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateDisplayPlaneSurfaceKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateDisplayPlaneSurfaceKHR.html>"]
pub unsafe fn create_display_plane_surface(
&self,
create_info: &vk::DisplaySurfaceCreateInfoKHR,

View file

@ -27,7 +27,7 @@ impl DisplaySwapchain {
vk::KhrDisplaySwapchainFn::name()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateSharedSwapchainsKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateSharedSwapchainsKHR.html>"]
pub unsafe fn create_shared_swapchains(
&self,
create_infos: &[vk::SwapchainCreateInfoKHR],

View file

@ -27,7 +27,7 @@ impl PushDescriptor {
vk::KhrPushDescriptorFn::name()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdPushDescriptorSetKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdPushDescriptorSetKHR.html>"]
pub unsafe fn cmd_push_descriptor_set(
&self,
command_buffer: vk::CommandBuffer,
@ -46,7 +46,7 @@ impl PushDescriptor {
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdPushDescriptorSetWithTemplateKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdPushDescriptorSetWithTemplateKHR.html>"]
pub unsafe fn cmd_push_descriptor_set_with_template(
&self,
command_buffer: vk::CommandBuffer,

View file

@ -28,7 +28,7 @@ impl Surface {
vk::KhrSurfaceFn::name()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceSurfaceSupportKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceSurfaceSupportKHR.html>"]
pub unsafe fn get_physical_device_surface_support(
&self,
physical_device: vk::PhysicalDevice,
@ -49,7 +49,7 @@ impl Surface {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceSurfacePresentModesKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceSurfacePresentModesKHR.html>"]
pub unsafe fn get_physical_device_surface_present_modes(
&self,
physical_device: vk::PhysicalDevice,
@ -79,7 +79,7 @@ impl Surface {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceSurfaceCapabilitiesKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceSurfaceCapabilitiesKHR.html>"]
pub unsafe fn get_physical_device_surface_capabilities(
&self,
physical_device: vk::PhysicalDevice,
@ -99,7 +99,7 @@ impl Surface {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceSurfaceFormatsKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceSurfaceFormatsKHR.html>"]
pub unsafe fn get_physical_device_surface_formats(
&self,
physical_device: vk::PhysicalDevice,
@ -126,7 +126,7 @@ impl Surface {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkDestroySurfaceKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroySurfaceKHR.html>"]
pub unsafe fn destroy_surface(
&self,
surface: vk::SurfaceKHR,

View file

@ -28,7 +28,7 @@ impl Swapchain {
vk::KhrSwapchainFn::name()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkDestroySwapchainKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroySwapchainKHR.html>"]
pub unsafe fn destroy_swapchain(
&self,
swapchain: vk::SwapchainKHR,
@ -42,7 +42,7 @@ impl Swapchain {
}
/// On success, returns the next image's index and whether the swapchain is suboptimal for the surface.
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkAcquireNextImageKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkAcquireNextImageKHR.html>"]
pub unsafe fn acquire_next_image(
&self,
swapchain: vk::SwapchainKHR,
@ -66,7 +66,7 @@ impl Swapchain {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateSwapchainKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateSwapchainKHR.html>"]
pub unsafe fn create_swapchain(
&self,
create_info: &vk::SwapchainCreateInfoKHR,
@ -86,7 +86,7 @@ impl Swapchain {
}
/// On success, returns whether the swapchain is suboptimal for the surface.
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkQueuePresentKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkQueuePresentKHR.html>"]
pub unsafe fn queue_present(
&self,
queue: vk::Queue,
@ -100,7 +100,7 @@ impl Swapchain {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetSwapchainImagesKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetSwapchainImagesKHR.html>"]
pub unsafe fn get_swapchain_images(
&self,
swapchain: vk::SwapchainKHR,

View file

@ -27,7 +27,7 @@ impl WaylandSurface {
vk::KhrWaylandSurfaceFn::name()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateWaylandSurfaceKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateWaylandSurfaceKHR.html>"]
pub unsafe fn create_wayland_surface(
&self,
create_info: &vk::WaylandSurfaceCreateInfoKHR,
@ -46,7 +46,7 @@ impl WaylandSurface {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceWaylandPresentationSupportKHR.html"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceWaylandPresentationSupportKHR.html"]
pub unsafe fn get_physical_device_wayland_presentation_support(
&self,
physical_device: vk::PhysicalDevice,

View file

@ -27,7 +27,7 @@ impl Win32Surface {
vk::KhrWin32SurfaceFn::name()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateWin32SurfaceKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateWin32SurfaceKHR.html>"]
pub unsafe fn create_win32_surface(
&self,
create_info: &vk::Win32SurfaceCreateInfoKHR,
@ -46,7 +46,7 @@ impl Win32Surface {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceWin32PresentationSupportKHR.html"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceWin32PresentationSupportKHR.html"]
pub unsafe fn get_physical_device_win32_presentation_support(
&self,
physical_device: vk::PhysicalDevice,

View file

@ -27,7 +27,7 @@ impl XcbSurface {
vk::KhrXcbSurfaceFn::name()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateXcbSurfaceKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateXcbSurfaceKHR.html>"]
pub unsafe fn create_xcb_surface(
&self,
create_info: &vk::XcbSurfaceCreateInfoKHR,
@ -46,7 +46,7 @@ impl XcbSurface {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceXcbPresentationSupportKHR.html"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceXcbPresentationSupportKHR.html"]
pub unsafe fn get_physical_device_xcb_presentation_support(
&self,
physical_device: vk::PhysicalDevice,

View file

@ -27,7 +27,7 @@ impl XlibSurface {
vk::KhrXlibSurfaceFn::name()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateXlibSurfaceKHR.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateXlibSurfaceKHR.html>"]
pub unsafe fn create_xlib_surface(
&self,
create_info: &vk::XlibSurfaceCreateInfoKHR,
@ -46,7 +46,7 @@ impl XlibSurface {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceXlibPresentationSupportKHR.html"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceXlibPresentationSupportKHR.html"]
pub unsafe fn get_physical_device_xlib_presentation_support(
&self,
physical_device: vk::PhysicalDevice,

View file

@ -27,7 +27,7 @@ impl IOSSurface {
vk::MvkIosSurfaceFn::name()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateIOSSurfaceMVK.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateIOSSurfaceMVK.html>"]
pub unsafe fn create_ios_surface_mvk(
&self,
create_info: &vk::IOSSurfaceCreateInfoMVK,

View file

@ -27,7 +27,7 @@ impl MacOSSurface {
vk::MvkMacosSurfaceFn::name()
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateMacOSSurfaceMVK.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateMacOSSurfaceMVK.html>"]
pub unsafe fn create_mac_os_surface_mvk(
&self,
create_info: &vk::MacOSSurfaceCreateInfoMVK,

View file

@ -16,7 +16,7 @@ impl MeshShader {
});
MeshShader { mesh_shader_fn }
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdDrawMeshTasksNV.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDrawMeshTasksNV.html>"]
pub unsafe fn cmd_draw_mesh_tasks(
&self,
command_buffer: vk::CommandBuffer,
@ -26,7 +26,7 @@ impl MeshShader {
self.mesh_shader_fn
.cmd_draw_mesh_tasks_nv(command_buffer, task_count, first_task);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdDrawMeshTasksIndirectNV.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDrawMeshTasksIndirectNV.html>"]
pub unsafe fn cmd_draw_mesh_tasks_indirect(
&self,
command_buffer: vk::CommandBuffer,
@ -43,7 +43,7 @@ impl MeshShader {
stride,
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdDrawMeshTasksIndirectCountNV.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDrawMeshTasksIndirectCountNV.html>"]
pub unsafe fn cmd_draw_mesh_tasks_indirect_count(
&self,
command_buffer: vk::CommandBuffer,

View file

@ -35,7 +35,7 @@ impl RayTracing {
props_rt
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateAccelerationStructureNV.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateAccelerationStructureNV.html>"]
pub unsafe fn create_acceleration_structure(
&self,
create_info: &vk::AccelerationStructureCreateInfoNV,
@ -54,7 +54,7 @@ impl RayTracing {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkDestroyAccelerationStructureNV.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyAccelerationStructureNV.html>"]
pub unsafe fn destroy_acceleration_structure(
&self,
accel_struct: vk::AccelerationStructureNV,
@ -67,7 +67,7 @@ impl RayTracing {
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetAccelerationStructureMemoryRequirementsNV.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetAccelerationStructureMemoryRequirementsNV.html>"]
pub unsafe fn get_acceleration_structure_memory_requirements(
&self,
info: &vk::AccelerationStructureMemoryRequirementsInfoNV,
@ -82,7 +82,7 @@ impl RayTracing {
requirements
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkBindAccelerationStructureMemoryNV.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkBindAccelerationStructureMemoryNV.html>"]
pub unsafe fn bind_acceleration_structure_memory(
&self,
bind_info: &[vk::BindAccelerationStructureMemoryInfoNV],
@ -98,7 +98,7 @@ impl RayTracing {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdBuildAccelerationStructureNV.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBuildAccelerationStructureNV.html>"]
pub unsafe fn cmd_build_acceleration_structure(
&self,
command_buffer: vk::CommandBuffer,
@ -124,7 +124,7 @@ impl RayTracing {
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdCopyAccelerationStructureNV.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdCopyAccelerationStructureNV.html>"]
pub unsafe fn cmd_copy_acceleration_structure(
&self,
command_buffer: vk::CommandBuffer,
@ -136,7 +136,7 @@ impl RayTracing {
.cmd_copy_acceleration_structure_nv(command_buffer, dst, src, mode);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdTraceRaysNV.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdTraceRaysNV.html>"]
pub unsafe fn cmd_trace_rays(
&self,
command_buffer: vk::CommandBuffer,
@ -174,7 +174,7 @@ impl RayTracing {
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateRayTracingPipelinesNV.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateRayTracingPipelinesNV.html>"]
pub unsafe fn create_ray_tracing_pipelines(
&self,
pipeline_cache: vk::PipelineCache,
@ -196,7 +196,7 @@ impl RayTracing {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetRayTracingShaderGroupHandlesNV.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetRayTracingShaderGroupHandlesNV.html>"]
pub unsafe fn get_ray_tracing_shader_group_handles(
&self,
pipeline: vk::Pipeline,
@ -218,7 +218,7 @@ impl RayTracing {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetAccelerationStructureHandleNV.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetAccelerationStructureHandleNV.html>"]
pub unsafe fn get_acceleration_structure_handle(
&self,
accel_struct: vk::AccelerationStructureNV,
@ -237,7 +237,7 @@ impl RayTracing {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdWriteAccelerationStructuresPropertiesNV.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdWriteAccelerationStructuresPropertiesNV.html>"]
pub unsafe fn cmd_write_acceleration_structures_properties(
&self,
command_buffer: vk::CommandBuffer,
@ -257,7 +257,7 @@ impl RayTracing {
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCompileDeferredNV.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCompileDeferredNV.html>"]
pub unsafe fn compile_deferred(&self, pipeline: vk::Pipeline, shader: u32) -> VkResult<()> {
let err_code = self
.ray_tracing_fn

View file

@ -7,12 +7,13 @@ use std::mem;
use std::os::raw::c_char;
use std::ptr;
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkInstance.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkInstance.html>"]
#[derive(Clone)]
pub struct Instance {
handle: vk::Instance,
instance_fn_1_0: vk::InstanceFnV1_0,
instance_fn_1_1: vk::InstanceFnV1_1,
instance_fn_1_2: vk::InstanceFnV1_2,
}
impl Instance {
pub unsafe fn load(static_fn: &vk::StaticFn, instance: vk::Instance) -> Self {
@ -22,18 +23,22 @@ impl Instance {
let instance_fn_1_1 = vk::InstanceFnV1_1::load(|name| {
mem::transmute(static_fn.get_instance_proc_addr(instance, name.as_ptr()))
});
let instance_fn_1_2 = vk::InstanceFnV1_2::load(|name| {
mem::transmute(static_fn.get_instance_proc_addr(instance, name.as_ptr()))
});
Instance {
handle: instance,
instance_fn_1_0,
instance_fn_1_1,
instance_fn_1_2,
}
}
}
impl InstanceV1_0 for Instance {
type Device = Device;
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateDevice.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateDevice.html>"]
unsafe fn create_device(
&self,
physical_device: vk::PhysicalDevice,
@ -67,6 +72,17 @@ impl InstanceV1_1 for Instance {
}
}
impl InstanceV1_2 for Instance {
fn fp_v1_2(&self) -> &vk::InstanceFnV1_2 {
&self.instance_fn_1_2
}
}
#[allow(non_camel_case_types)]
pub trait InstanceV1_2: InstanceV1_1 {
fn fp_v1_2(&self) -> &vk::InstanceFnV1_2;
}
#[allow(non_camel_case_types)]
pub trait InstanceV1_1: InstanceV1_0 {
fn fp_v1_1(&self) -> &vk::InstanceFnV1_1;
@ -81,7 +97,7 @@ pub trait InstanceV1_1: InstanceV1_0 {
group_count as usize
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkEnumeratePhysicalDeviceGroups.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumeratePhysicalDeviceGroups.html>"]
fn enumerate_physical_device_groups(
&self,
out: &mut [vk::PhysicalDeviceGroupProperties],
@ -101,7 +117,17 @@ pub trait InstanceV1_1: InstanceV1_0 {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceProperties2.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceFeatures2.html>"]
unsafe fn get_physical_device_features2(
&self,
physical_device: vk::PhysicalDevice,
features: &mut vk::PhysicalDeviceFeatures2,
) {
self.fp_v1_1()
.get_physical_device_features2(physical_device, features);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceProperties2.html>"]
unsafe fn get_physical_device_properties2(
&self,
physical_device: vk::PhysicalDevice,
@ -111,7 +137,7 @@ pub trait InstanceV1_1: InstanceV1_0 {
.get_physical_device_properties2(physical_device, prop);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceFormatProperties2.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceFormatProperties2.html>"]
unsafe fn get_physical_device_format_properties2(
&self,
physical_device: vk::PhysicalDevice,
@ -122,7 +148,7 @@ pub trait InstanceV1_1: InstanceV1_0 {
.get_physical_device_format_properties2(physical_device, format, out);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceImageFormatProperties2.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceImageFormatProperties2.html>"]
unsafe fn get_physical_device_image_format_properties2(
&self,
physical_device: vk::PhysicalDevice,
@ -154,7 +180,7 @@ pub trait InstanceV1_1: InstanceV1_0 {
queue_count as usize
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceQueueFamilyProperties2.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceQueueFamilyProperties2.html>"]
unsafe fn get_physical_device_queue_family_properties2(
&self,
physical_device: vk::PhysicalDevice,
@ -168,7 +194,7 @@ pub trait InstanceV1_1: InstanceV1_0 {
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceMemoryProperties2.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceMemoryProperties2.html>"]
unsafe fn get_physical_device_memory_properties2(
&self,
physical_device: vk::PhysicalDevice,
@ -194,7 +220,7 @@ pub trait InstanceV1_1: InstanceV1_0 {
format_count as usize
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceSparseImageFormatProperties2.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceSparseImageFormatProperties2.html>"]
unsafe fn get_physical_device_sparse_image_format_properties2(
&self,
physical_device: vk::PhysicalDevice,
@ -211,7 +237,7 @@ pub trait InstanceV1_1: InstanceV1_0 {
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceExternalBufferProperties.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceExternalBufferProperties.html>"]
unsafe fn get_physical_device_external_buffer_properties(
&self,
physical_device: vk::PhysicalDevice,
@ -226,7 +252,7 @@ pub trait InstanceV1_1: InstanceV1_0 {
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceExternalFenceProperties.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceExternalFenceProperties.html>"]
unsafe fn get_physical_device_external_fence_properties(
&self,
physical_device: vk::PhysicalDevice,
@ -241,7 +267,7 @@ pub trait InstanceV1_1: InstanceV1_0 {
);
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceExternalSemaphoreProperties.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceExternalSemaphoreProperties.html>"]
unsafe fn get_physical_device_external_semaphore_properties(
&self,
physical_device: vk::PhysicalDevice,
@ -262,7 +288,7 @@ pub trait InstanceV1_0 {
type Device;
fn handle(&self) -> vk::Instance;
fn fp_v1_0(&self) -> &vk::InstanceFnV1_0;
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCreateDevice.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateDevice.html>"]
unsafe fn create_device(
&self,
physical_device: vk::PhysicalDevice,
@ -270,7 +296,7 @@ pub trait InstanceV1_0 {
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> Result<Self::Device, vk::Result>;
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetDeviceProcAddr.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetDeviceProcAddr.html>"]
unsafe fn get_device_proc_addr(
&self,
device: vk::Device,
@ -279,13 +305,13 @@ pub trait InstanceV1_0 {
self.fp_v1_0().get_device_proc_addr(device, p_name)
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkDestroyInstance.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyInstance.html>"]
unsafe fn destroy_instance(&self, allocation_callbacks: Option<&vk::AllocationCallbacks>) {
self.fp_v1_0()
.destroy_instance(self.handle(), allocation_callbacks.as_raw_ptr());
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceFormatProperties.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceFormatProperties.html>"]
unsafe fn get_physical_device_format_properties(
&self,
physical_device: vk::PhysicalDevice,
@ -300,7 +326,7 @@ pub trait InstanceV1_0 {
format_prop
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceImageFormatProperties.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceImageFormatProperties.html>"]
unsafe fn get_physical_device_image_format_properties(
&self,
physical_device: vk::PhysicalDevice,
@ -327,7 +353,7 @@ pub trait InstanceV1_0 {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceMemoryProperties.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceMemoryProperties.html>"]
unsafe fn get_physical_device_memory_properties(
&self,
physical_device: vk::PhysicalDevice,
@ -338,7 +364,7 @@ pub trait InstanceV1_0 {
memory_prop
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceProperties.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceProperties.html>"]
unsafe fn get_physical_device_properties(
&self,
physical_device: vk::PhysicalDevice,
@ -349,7 +375,7 @@ pub trait InstanceV1_0 {
prop
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceQueueFamilyProperties.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceQueueFamilyProperties.html>"]
unsafe fn get_physical_device_queue_family_properties(
&self,
physical_device: vk::PhysicalDevice,
@ -370,7 +396,7 @@ pub trait InstanceV1_0 {
queue_families_vec
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceFeatures.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceFeatures.html>"]
unsafe fn get_physical_device_features(
&self,
physical_device: vk::PhysicalDevice,
@ -381,7 +407,7 @@ pub trait InstanceV1_0 {
prop
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkEnumeratePhysicalDevices.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumeratePhysicalDevices.html>"]
unsafe fn enumerate_physical_devices(&self) -> VkResult<Vec<vk::PhysicalDevice>> {
let mut num = mem::zeroed();
self.fp_v1_0()
@ -399,7 +425,7 @@ pub trait InstanceV1_0 {
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkEnumerateDeviceExtensionProperties.html>"]
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumerateDeviceExtensionProperties.html>"]
unsafe fn enumerate_device_extension_properties(
&self,
device: vk::PhysicalDevice,

View file

@ -1,7 +1,7 @@
#![allow(clippy::too_many_arguments, clippy::missing_safety_doc)]
//! # Vulkan API
//!
//! <https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/index.html>
//! <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/index.html>
//!
//! ## Examples
//!

View file

@ -1,3 +1,3 @@
pub use crate::device::{DeviceV1_0, DeviceV1_1};
pub use crate::entry::{EntryV1_0, EntryV1_1};
pub use crate::instance::{InstanceV1_0, InstanceV1_1};
pub use crate::device::{DeviceV1_0, DeviceV1_1, DeviceV1_2};
pub use crate::entry::{EntryV1_0, EntryV1_1, EntryV1_2};
pub use crate::instance::{InstanceV1_0, InstanceV1_1, InstanceV1_2};