diff --git a/CHANGELOG_VULKANO.md b/CHANGELOG_VULKANO.md index 54fbbf18..c065ebb2 100644 --- a/CHANGELOG_VULKANO.md +++ b/CHANGELOG_VULKANO.md @@ -55,6 +55,9 @@ - Fixed a bug which caused a segfault when extending memory allocation info in DeviceMemoryBuilder - `BufferlessDefinition` and `BufferlessVertices` now derive `Copy` and `Clone`. This allows `GraphicsPipelineBuilder`s that have not yet defined a vertex buffer type to be cloned. - Various functions for converting to/from Vulkan flags have been consolidated into implementations of the standard `From` trait. +- Export root-level `entry_point` method on `loader::FunctionPointers` type. +- Add few more `InstanceExtensions` from KHR and EXT. +- Add `MEMORY_HEAP_MULTI_INSTANCE_BIT` for `MemoryHeap`. # Version 0.22.0 (2021-03-31) diff --git a/vk-sys/src/lib.rs b/vk-sys/src/lib.rs index 89210c41..a39e414a 100644 --- a/vk-sys/src/lib.rs +++ b/vk-sys/src/lib.rs @@ -1434,6 +1434,7 @@ pub type MemoryPropertyFlags = Flags; pub type MemoryHeapFlagBits = u32; pub const MEMORY_HEAP_DEVICE_LOCAL_BIT: u32 = 0x00000001; +pub const MEMORY_HEAP_MULTI_INSTANCE_BIT: u32 = 0x00000002; pub type MemoryHeapFlags = Flags; pub type DeviceCreateFlags = Flags; pub type DeviceQueueCreateFlags = Flags; diff --git a/vulkano/src/instance/extensions.rs b/vulkano/src/instance/extensions.rs index 9f048b8d..73d4a895 100644 --- a/vulkano/src/instance/extensions.rs +++ b/vulkano/src/instance/extensions.rs @@ -160,6 +160,15 @@ instance_extensions! { ext_swapchain_colorspace => b"VK_EXT_swapchain_colorspace", khr_get_physical_device_properties2 => b"VK_KHR_get_physical_device_properties2", khr_get_surface_capabilities2 => b"VK_KHR_get_surface_capabilities2", + khr_device_group_creation => b"VK_KHR_device_group_creation", + khr_external_fence_capabilities => b"VK_KHR_external_fence_capabilities", + khr_external_memory_capabilities => b"VK_KHR_external_memory_capabilities", + khr_external_semaphore_capabilities => b"VK_KHR_external_semaphore_capabilities", + khr_get_display_properties2 => b"VK_KHR_get_display_properties2", + ext_acquire_xlib_display => b"VK_EXT_acquire_xlib_display", + ext_debug_report => b"VK_EXT_debug_report", + ext_direct_mode_display => b"VK_EXT_direct_mode_display", + ext_display_surface_counter => b"VK_EXT_display_surface_counter", } /// This helper type can only be instantiated inside this module. diff --git a/vulkano/src/instance/instance.rs b/vulkano/src/instance/instance.rs index 669dd378..72603fb5 100644 --- a/vulkano/src/instance/instance.rs +++ b/vulkano/src/instance/instance.rs @@ -1379,6 +1379,14 @@ impl<'a> MemoryHeap<'a> { let flags = self.physical_device.infos().memory.memoryHeaps[self.id as usize].flags; (flags & vk::MEMORY_HEAP_DEVICE_LOCAL_BIT) != 0 } + + /// Returns true if the heap is multi-instance enabled, that is allocation from such + /// heap will replicate to each physical-device's instance of heap. + #[inline] + pub fn is_multi_instance(&self) -> bool { + let flags = self.physical_device.infos().memory.memoryHeaps[self.id as usize].flags; + (flags & vk::MEMORY_HEAP_MULTI_INSTANCE_BIT) != 0 + } } /// Iterator for all the memory heaps available on a physical device. diff --git a/vulkano/src/instance/loader.rs b/vulkano/src/instance/loader.rs index 2c68b49e..9959076c 100644 --- a/vulkano/src/instance/loader.rs +++ b/vulkano/src/instance/loader.rs @@ -133,7 +133,7 @@ impl FunctionPointers { /// Returns the collection of Vulkan entry points from the Vulkan loader. #[inline] - pub(crate) fn entry_points(&self) -> &vk::EntryPoints { + pub fn entry_points(&self) -> &vk::EntryPoints { &self.entry_points }