entry: Allow querying enumerate_instance_extension_properties()
by layer name (#574)
This commit is contained in:
parent
955cb28d12
commit
40b572ff3a
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Changed
|
||||
|
||||
- extensions/khr: Drop `_khr` suffix from `get_memory_fd_properties_khr` in `ExternalMemoryFd` (#580)
|
||||
- entry: Allow querying `enumerate_instance_extension_properties()` by layer name (#574)
|
||||
|
||||
### Added
|
||||
|
||||
|
|
|
@ -238,11 +238,15 @@ impl Entry {
|
|||
/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkEnumerateInstanceExtensionProperties.html>
|
||||
pub fn enumerate_instance_extension_properties(
|
||||
&self,
|
||||
layer_name: Option<&CStr>,
|
||||
) -> VkResult<Vec<vk::ExtensionProperties>> {
|
||||
unsafe {
|
||||
read_into_uninitialized_vector(|count, data| {
|
||||
self.entry_fn_1_0
|
||||
.enumerate_instance_extension_properties(ptr::null(), count, data)
|
||||
self.entry_fn_1_0.enumerate_instance_extension_properties(
|
||||
layer_name.map_or(ptr::null(), |str| str.as_ptr()),
|
||||
count,
|
||||
data,
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue