diff --git a/libportability-gfx/src/impls.rs b/libportability-gfx/src/impls.rs index 0f946b2..91f6209 100644 --- a/libportability-gfx/src/impls.rs +++ b/libportability-gfx/src/impls.rs @@ -572,6 +572,7 @@ pub unsafe extern "C" fn gfxGetInstanceProcAddr( vkGetPhysicalDeviceSurfacePresentModesKHR, PFN_vkGetPhysicalDeviceSurfacePresentModesKHR => gfxGetPhysicalDeviceSurfacePresentModesKHR, vkGetPhysicalDeviceWin32PresentationSupportKHR, PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR => gfxGetPhysicalDeviceWin32PresentationSupportKHR, + vkCreateXcbSurfaceKHR, PFN_vkCreateXcbSurfaceKHR => gfxCreateXcbSurfaceKHR, vkCreateWin32SurfaceKHR, PFN_vkCreateWin32SurfaceKHR => gfxCreateWin32SurfaceKHR, vkCreateMetalSurfaceEXT, PFN_vkCreateMetalSurfaceEXT => gfxCreateMetalSurfaceEXT, vkCreateMacOSSurfaceMVK, PFN_vkCreateMacOSSurfaceMVK => gfxCreateMacOSSurfaceMVK, @@ -982,6 +983,8 @@ lazy_static! { static ref INSTANCE_EXTENSION_NAMES: Vec<&'static [u8]> = { vec![ VK_KHR_SURFACE_EXTENSION_NAME, + #[cfg(target_os="linux")] + VK_KHR_XCB_SURFACE_EXTENSION_NAME, #[cfg(target_os="windows")] VK_KHR_WIN32_SURFACE_EXTENSION_NAME, #[cfg(feature="gfx-backend-metal")] @@ -999,6 +1002,11 @@ lazy_static! { extensionName: [0; 256], // VK_KHR_SURFACE_EXTENSION_NAME specVersion: VK_KHR_SURFACE_SPEC_VERSION, }, + #[cfg(target_os="linux")] + VkExtensionProperties { + extensionName: [0; 256], // VK_KHR_XCB_SURFACE_EXTENSION_NAME + specVersion: VK_KHR_XCB_SURFACE_SPEC_VERSION, + }, #[cfg(target_os="windows")] VkExtensionProperties { extensionName: [0; 256], // VK_KHR_WIN32_SURFACE_EXTENSION_NAME diff --git a/libportability-gfx/src/lib.rs b/libportability-gfx/src/lib.rs index 120f242..0adb557 100644 --- a/libportability-gfx/src/lib.rs +++ b/libportability-gfx/src/lib.rs @@ -357,8 +357,10 @@ pub const VK_MAX_DESCRIPTION_SIZE: ::std::os::raw::c_uint = 256; pub const VK_KHR_surface: ::std::os::raw::c_uint = 1; pub const VK_KHR_SURFACE_SPEC_VERSION: ::std::os::raw::c_uint = 25; pub const VK_KHR_SURFACE_EXTENSION_NAME: &'static [u8; 15usize] = b"VK_KHR_surface\x00"; +pub const VK_KHR_XCB_SURFACE_SPEC_VERSION: ::std::os::raw::c_uint = 6; pub const VK_KHR_WIN32_SURFACE_SPEC_VERSION: ::std::os::raw::c_uint = 6; pub const VK_MVK_MACOS_SURFACE_SPEC_VERSION: ::std::os::raw::c_uint = 2; +pub const VK_KHR_XCB_SURFACE_EXTENSION_NAME: &'static [u8; 19usize] = b"VK_KHR_xcb_surface\x00"; pub const VK_KHR_WIN32_SURFACE_EXTENSION_NAME: &'static [u8; 21usize] = b"VK_KHR_win32_surface\x00"; pub const VK_MVK_MACOS_SURFACE_EXTENSION_NAME: &'static [u8; 21usize] = b"VK_MVK_macos_surface\x00"; pub const VK_EXT_METAL_SURFACE_EXTENSION_NAME: &'static [u8; 21usize] = b"VK_EXT_metal_surface\x00"; @@ -7145,6 +7147,15 @@ pub type PFN_vkDestroyInstance = ::std::option::Option< unsafe extern "C" fn(instance: VkInstance, pAllocator: *const VkAllocationCallbacks), >; +pub type PFN_vkCreateXcbSurfaceKHR = ::std::option::Option< + unsafe extern "C" fn( + instance: VkInstance, + pCreateInfo: *const VkXcbSurfaceCreateInfoKHR, + pAllocator: *const VkAllocationCallbacks, + pSurface: *mut VkSurfaceKHR, + ) -> VkResult, +>; + pub type PFN_vkCreateWin32SurfaceKHR = ::std::option::Option< unsafe extern "C" fn( instance: VkInstance,