Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop load() functions from empty Fn structs #752

Merged
merged 1 commit into from
May 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Removed `query_count` parameter from `get_query_pool_results()` in favour of `data.len()` (#644)
- Removed misnamed, deprecated `debug_utils_set_object_name()` and `debug_utils_set_object_tag()` entirely, use `set_debug_utils_object_name()` and `set_debug_utils_object_tag()` instead (#661)
- Removed `get_properties` helper from extension wrappers (and `ext::PhysicalDeviceDrm`). Directly call `get_physical_device_properties2()` with a possible chain of multiple structs instead (#728)
- Removed `fn load()` from empty features and extensions (#752)
- Removed empty `entry_fn_1_2`/`entry_fn_1_3` and getters from `Entry`
- Removed empty `instance_fn_1_2:` and getters from `Instance`

## [0.37.2] - 2022-01-11

Expand Down
4 changes: 0 additions & 4 deletions ash/src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ impl Device {
}

/// Vulkan core 1.3
#[allow(non_camel_case_types)]
impl Device {
#[inline]
pub fn fp_v1_3(&self) -> &vk::DeviceFnV1_3 {
Expand Down Expand Up @@ -531,7 +530,6 @@ impl Device {
}

/// Vulkan core 1.2
#[allow(non_camel_case_types)]
impl Device {
#[inline]
pub fn fp_v1_2(&self) -> &vk::DeviceFnV1_2 {
Expand Down Expand Up @@ -705,7 +703,6 @@ impl Device {
}

/// Vulkan core 1.1
#[allow(non_camel_case_types)]
impl Device {
#[inline]
pub fn fp_v1_1(&self) -> &vk::DeviceFnV1_1 {
Expand Down Expand Up @@ -952,7 +949,6 @@ impl Device {
}

/// Vulkan core 1.0
#[allow(non_camel_case_types)]
impl Device {
#[inline]
pub fn fp_v1_0(&self) -> &vk::DeviceFnV1_0 {
Expand Down
26 changes: 0 additions & 26 deletions ash/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@ pub struct Entry {
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,
entry_fn_1_3: vk::EntryFnV1_3,
#[cfg(feature = "loaded")]
_lib_guard: Option<Arc<Library>>,
}

/// Vulkan core 1.0
#[allow(non_camel_case_types)]
impl Entry {
/// Load default Vulkan library for the current platform
///
Expand Down Expand Up @@ -151,15 +148,11 @@ impl Entry {
};
let entry_fn_1_0 = vk::EntryFnV1_0::load(load_fn);
let entry_fn_1_1 = vk::EntryFnV1_1::load(load_fn);
let entry_fn_1_2 = vk::EntryFnV1_2::load(load_fn);
let entry_fn_1_3 = vk::EntryFnV1_3::load(load_fn);

Self {
static_fn,
entry_fn_1_0,
entry_fn_1_1,
entry_fn_1_2,
entry_fn_1_3,
#[cfg(feature = "loaded")]
_lib_guard: None,
}
Expand Down Expand Up @@ -273,7 +266,6 @@ impl Entry {
}

/// Vulkan core 1.1
#[allow(non_camel_case_types)]
impl Entry {
#[inline]
pub fn fp_v1_1(&self) -> &vk::EntryFnV1_1 {
Expand All @@ -294,24 +286,6 @@ impl Entry {
}
}

/// Vulkan core 1.2
#[allow(non_camel_case_types)]
impl Entry {
#[inline]
pub fn fp_v1_2(&self) -> &vk::EntryFnV1_2 {
&self.entry_fn_1_2
}
}

/// Vulkan core 1.3
#[allow(non_camel_case_types)]
impl Entry {
#[inline]
pub fn fp_v1_3(&self) -> &vk::EntryFnV1_3 {
&self.entry_fn_1_3
}
}

#[cfg(feature = "linked")]
#[cfg_attr(docsrs, doc(cfg(feature = "linked")))]
impl Default for Entry {
Expand Down
14 changes: 0 additions & 14 deletions ash/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pub struct Instance {

pub(crate) instance_fn_1_0: vk::InstanceFnV1_0,
pub(crate) instance_fn_1_1: vk::InstanceFnV1_1,
pub(crate) instance_fn_1_2: vk::InstanceFnV1_2,
pub(crate) instance_fn_1_3: vk::InstanceFnV1_3,
}

Expand All @@ -28,7 +27,6 @@ impl Instance {

instance_fn_1_0: vk::InstanceFnV1_0::load(load_fn),
instance_fn_1_1: vk::InstanceFnV1_1::load(load_fn),
instance_fn_1_2: vk::InstanceFnV1_2::load(load_fn),
instance_fn_1_3: vk::InstanceFnV1_3::load(load_fn),
}
}
Expand All @@ -40,7 +38,6 @@ impl Instance {
}

/// Vulkan core 1.3
#[allow(non_camel_case_types)]
impl Instance {
#[inline]
pub fn fp_v1_3(&self) -> &vk::InstanceFnV1_3 {
Expand Down Expand Up @@ -84,17 +81,7 @@ impl Instance {
}
}

/// Vulkan core 1.2
#[allow(non_camel_case_types)]
impl Instance {
#[inline]
pub fn fp_v1_2(&self) -> &vk::InstanceFnV1_2 {
&self.instance_fn_1_2
}
}

/// Vulkan core 1.1
#[allow(non_camel_case_types)]
impl Instance {
#[inline]
pub fn fp_v1_1(&self) -> &vk::InstanceFnV1_1 {
Expand Down Expand Up @@ -325,7 +312,6 @@ impl Instance {
}

/// Vulkan core 1.0
#[allow(non_camel_case_types)]
impl Instance {
#[inline]
pub fn fp_v1_0(&self) -> &vk::InstanceFnV1_0 {
Expand Down
Loading