Skip to content

Commit

Permalink
extensions: Expose NAME via reexport instead of const (#887)
Browse files Browse the repository at this point in the history
Now that hand-written extension wrappers are exposed as `mod`ules
instead of `struct`s it is no longer needed to expose `NAME` as
associated `const` when a more-concise `pub use` reexport will do.
  • Loading branch information
MarijnS95 authored Mar 25, 2024
1 parent 547858c commit ac8556e
Show file tree
Hide file tree
Showing 82 changed files with 82 additions and 244 deletions.
4 changes: 1 addition & 3 deletions ash/src/extensions/amd/buffer_marker.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
//! <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_AMD_buffer_marker.html>
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::amd::buffer_marker::NAME;
pub use vk::amd::buffer_marker::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/amd/shader_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
use crate::prelude::*;
use crate::vk;
use alloc::vec::Vec;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::amd::shader_info::NAME;
pub use vk::amd::shader_info::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/amdx/shader_enqueue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ use crate::prelude::*;
use crate::vk;
use crate::RawPtr;
use alloc::vec::Vec;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::amdx::shader_enqueue::NAME;
pub use vk::amdx::shader_enqueue::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
use crate::prelude::*;
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::android::external_memory_android_hardware_buffer::NAME;
pub use vk::android::external_memory_android_hardware_buffer::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/acquire_drm_display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
use crate::prelude::*;
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::acquire_drm_display::NAME;
pub use vk::ext::acquire_drm_display::NAME;

#[derive(Clone)]
pub struct Instance {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/buffer_device_address.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
//! <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_buffer_device_address.html>
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::buffer_device_address::NAME;
pub use vk::ext::buffer_device_address::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/calibrated_timestamps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
use crate::prelude::*;
use crate::vk;
use alloc::vec::Vec;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::calibrated_timestamps::NAME;
pub use vk::ext::calibrated_timestamps::NAME;

/// High-level device function wrapper
#[derive(Clone)]
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/debug_marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
use crate::prelude::*;
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::debug_marker::NAME;
pub use vk::ext::debug_marker::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/debug_report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
use crate::prelude::*;
use crate::vk;
use crate::RawPtr;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::debug_report::NAME;
pub use vk::ext::debug_report::NAME;

#[derive(Clone)]
pub struct Instance {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/debug_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
use crate::prelude::*;
use crate::vk;
use crate::RawPtr;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::debug_utils::NAME;
pub use vk::ext::debug_utils::NAME;

/// High-level device function wrapper
#[derive(Clone)]
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/descriptor_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
use crate::prelude::*;
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::descriptor_buffer::NAME;
pub use vk::ext::descriptor_buffer::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/extended_dynamic_state.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
//! <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_extended_dynamic_state.html>
use crate::vk;
use core::ffi;
use core::mem;
use core::ptr;

pub const NAME: &ffi::CStr = vk::ext::extended_dynamic_state::NAME;
pub use vk::ext::extended_dynamic_state::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/extended_dynamic_state2.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
//! <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_extended_dynamic_state2.html>
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::extended_dynamic_state2::NAME;
pub use vk::ext::extended_dynamic_state2::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/extended_dynamic_state3.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
//! <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_extended_dynamic_state3.html>
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::extended_dynamic_state3::NAME;
pub use vk::ext::extended_dynamic_state3::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/full_screen_exclusive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
use crate::prelude::*;
use crate::vk;
use alloc::vec::Vec;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::full_screen_exclusive::NAME;
pub use vk::ext::full_screen_exclusive::NAME;

/// High-level device function wrapper
#[derive(Clone)]
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/hdr_metadata.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
//! <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_hdr_metadata.html>
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::hdr_metadata::NAME;
pub use vk::ext::hdr_metadata::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/headless_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
use crate::prelude::*;
use crate::vk;
use crate::RawPtr;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::headless_surface::NAME;
pub use vk::ext::headless_surface::NAME;

#[derive(Clone)]
pub struct Instance {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/host_image_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
use super::{super::khr::maintenance5, image_compression_control};
use crate::prelude::*;
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::host_image_copy::NAME;
pub use vk::ext::host_image_copy::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/image_compression_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
#[cfg(doc)]
use super::{super::khr::maintenance5, host_image_copy};
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::image_compression_control::NAME;
pub use vk::ext::image_compression_control::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/image_drm_format_modifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
use crate::prelude::*;
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::image_drm_format_modifier::NAME;
pub use vk::ext::image_drm_format_modifier::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/mesh_shader.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
//! <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_mesh_shader.html>
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::mesh_shader::NAME;
pub use vk::ext::mesh_shader::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/metal_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
use crate::prelude::*;
use crate::vk;
use crate::RawPtr;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::metal_surface::NAME;
pub use vk::ext::metal_surface::NAME;

#[derive(Clone)]
pub struct Instance {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/pipeline_properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
use crate::prelude::*;
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::pipeline_properties::NAME;
pub use vk::ext::pipeline_properties::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/private_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
use crate::prelude::*;
use crate::vk;
use crate::RawPtr;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::private_data::NAME;
pub use vk::ext::private_data::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/sample_locations.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
//! <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_sample_locations.html>
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::sample_locations::NAME;
pub use vk::ext::sample_locations::NAME;

/// High-level device function wrapper
#[derive(Clone)]
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/shader_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ use crate::prelude::*;
use crate::vk;
use crate::RawPtr;
use alloc::vec::Vec;
use core::ffi;
use core::mem;
use core::ptr;

pub const NAME: &ffi::CStr = vk::ext::shader_object::NAME;
pub use vk::ext::shader_object::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/swapchain_maintenance1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
use crate::prelude::*;
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::swapchain_maintenance1::NAME;
pub use vk::ext::swapchain_maintenance1::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/tooling_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
use crate::prelude::*;
use crate::vk;
use alloc::vec::Vec;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::tooling_info::NAME;
pub use vk::ext::tooling_info::NAME;

#[derive(Clone)]
pub struct Instance {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/ext/vertex_input_dynamic_state.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
//! <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_vertex_input_dynamic_state.html>
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::ext::vertex_input_dynamic_state::NAME;
pub use vk::ext::vertex_input_dynamic_state::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/google/display_timing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
use crate::prelude::*;
use crate::vk;
use alloc::vec::Vec;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::google::display_timing::NAME;
pub use vk::google::display_timing::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/khr/acceleration_structure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ use crate::prelude::*;
use crate::vk;
use crate::RawPtr;
use alloc::vec::Vec;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::khr::acceleration_structure::NAME;
pub use vk::khr::acceleration_structure::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/khr/android_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
use crate::prelude::*;
use crate::vk;
use crate::RawPtr;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::khr::android_surface::NAME;
pub use vk::khr::android_surface::NAME;

#[derive(Clone)]
pub struct Instance {
Expand Down
4 changes: 1 addition & 3 deletions ash/src/extensions/khr/buffer_device_address.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
//! <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_buffer_device_address.html>
use crate::vk;
use core::ffi;
use core::mem;

pub const NAME: &ffi::CStr = vk::khr::buffer_device_address::NAME;
pub use vk::khr::buffer_device_address::NAME;

#[derive(Clone)]
pub struct Device {
Expand Down
Loading

0 comments on commit ac8556e

Please sign in to comment.