Collection of commits. (#1567)

* Add core instance extensions.

core extensions added as part of `vulkano::instance::InstanceExtensions`

VK_KHR_device_group_creation
VK_KHR_external_fence_capabilities
VK_KHR_external_memory_capabilities
VK_KHR_external_semaphore_capabilities
VK_KHR_get_display_properties2
VK_EXT_acquire_xlib_display
VK_EXT_debug_report
VK_EXT_direct_mode_display
VK_EXT_display_surface_counter

* export FunctionPointers::entry_points method.

Similar to PhysicalDevice.instance().pointers() export root-level
entry_points() method. This will allow applications to call vk-functions
like `vkEnumerateInstanceExtensionProperties` directly.

* heap: Add MEMORY_HEAP_MULTI_INSTANCE_BIT for MemoryHeap.

A new method is_multi_instance() method is added to `MemoryHeap` to
know whether the heap is enabled for multi-instance.

* CHANGE-LOG.
This commit is contained in:
prataprc 2021-05-10 20:02:08 +05:30 committed by GitHub
parent 87e161cc78
commit 116abf4d58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 1 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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.

View File

@ -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.

View File

@ -133,7 +133,7 @@ impl<L> FunctionPointers<L> {
/// 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
}