Replace const fn name()
with associated NAME
constants (#715)
`CStr::from_bytes_with_nul_unchecked` is `const`-stable since Rust 1.59 which is already required for `ash` so it is high time to finally turn these inlined `name()` functions into associated constants (which is a breaking change in itself that cannot be backported).
This commit is contained in:
parent
1c9e422577
commit
7a1686014e
|
@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Replaced builders with lifetimes/setters directly on Vulkan structs (#602)
|
- Replaced builders with lifetimes/setters directly on Vulkan structs (#602)
|
||||||
- Inlined struct setters (#602)
|
- Inlined struct setters (#602)
|
||||||
- Bumped MSRV from 1.59 to 1.60 (#709)
|
- Bumped MSRV from 1.59 to 1.60 (#709)
|
||||||
|
- Replaced `const fn name()` with associated `NAME` constants (#715)
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
|
@ -206,9 +206,9 @@ use ash::extensions::{Swapchain, XlibSurface, Surface, DebugReport};
|
||||||
#[cfg(all(unix, not(target_os = "android")))]
|
#[cfg(all(unix, not(target_os = "android")))]
|
||||||
fn extension_names() -> Vec<*const i8> {
|
fn extension_names() -> Vec<*const i8> {
|
||||||
vec![
|
vec![
|
||||||
Surface::name().as_ptr(),
|
Surface::NAME.as_ptr(),
|
||||||
XlibSurface::name().as_ptr(),
|
XlibSurface::NAME.as_ptr(),
|
||||||
DebugReport::name().as_ptr()
|
DebugReport::NAME.as_ptr()
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
@ -117,48 +117,44 @@ pub fn enumerate_required_extensions(
|
||||||
let extensions = match display_handle {
|
let extensions = match display_handle {
|
||||||
RawDisplayHandle::Windows(_) => {
|
RawDisplayHandle::Windows(_) => {
|
||||||
const WINDOWS_EXTS: [*const c_char; 2] = [
|
const WINDOWS_EXTS: [*const c_char; 2] = [
|
||||||
khr::Surface::name().as_ptr(),
|
khr::Surface::NAME.as_ptr(),
|
||||||
khr::Win32Surface::name().as_ptr(),
|
khr::Win32Surface::NAME.as_ptr(),
|
||||||
];
|
];
|
||||||
&WINDOWS_EXTS
|
&WINDOWS_EXTS
|
||||||
}
|
}
|
||||||
|
|
||||||
RawDisplayHandle::Wayland(_) => {
|
RawDisplayHandle::Wayland(_) => {
|
||||||
const WAYLAND_EXTS: [*const c_char; 2] = [
|
const WAYLAND_EXTS: [*const c_char; 2] = [
|
||||||
khr::Surface::name().as_ptr(),
|
khr::Surface::NAME.as_ptr(),
|
||||||
khr::WaylandSurface::name().as_ptr(),
|
khr::WaylandSurface::NAME.as_ptr(),
|
||||||
];
|
];
|
||||||
&WAYLAND_EXTS
|
&WAYLAND_EXTS
|
||||||
}
|
}
|
||||||
|
|
||||||
RawDisplayHandle::Xlib(_) => {
|
RawDisplayHandle::Xlib(_) => {
|
||||||
const XLIB_EXTS: [*const c_char; 2] = [
|
const XLIB_EXTS: [*const c_char; 2] =
|
||||||
khr::Surface::name().as_ptr(),
|
[khr::Surface::NAME.as_ptr(), khr::XlibSurface::NAME.as_ptr()];
|
||||||
khr::XlibSurface::name().as_ptr(),
|
|
||||||
];
|
|
||||||
&XLIB_EXTS
|
&XLIB_EXTS
|
||||||
}
|
}
|
||||||
|
|
||||||
RawDisplayHandle::Xcb(_) => {
|
RawDisplayHandle::Xcb(_) => {
|
||||||
const XCB_EXTS: [*const c_char; 2] = [
|
const XCB_EXTS: [*const c_char; 2] =
|
||||||
khr::Surface::name().as_ptr(),
|
[khr::Surface::NAME.as_ptr(), khr::XcbSurface::NAME.as_ptr()];
|
||||||
khr::XcbSurface::name().as_ptr(),
|
|
||||||
];
|
|
||||||
&XCB_EXTS
|
&XCB_EXTS
|
||||||
}
|
}
|
||||||
|
|
||||||
RawDisplayHandle::Android(_) => {
|
RawDisplayHandle::Android(_) => {
|
||||||
const ANDROID_EXTS: [*const c_char; 2] = [
|
const ANDROID_EXTS: [*const c_char; 2] = [
|
||||||
khr::Surface::name().as_ptr(),
|
khr::Surface::NAME.as_ptr(),
|
||||||
khr::AndroidSurface::name().as_ptr(),
|
khr::AndroidSurface::NAME.as_ptr(),
|
||||||
];
|
];
|
||||||
&ANDROID_EXTS
|
&ANDROID_EXTS
|
||||||
}
|
}
|
||||||
|
|
||||||
RawDisplayHandle::AppKit(_) | RawDisplayHandle::UiKit(_) => {
|
RawDisplayHandle::AppKit(_) | RawDisplayHandle::UiKit(_) => {
|
||||||
const METAL_EXTS: [*const c_char; 2] = [
|
const METAL_EXTS: [*const c_char; 2] = [
|
||||||
khr::Surface::name().as_ptr(),
|
khr::Surface::NAME.as_ptr(),
|
||||||
ext::MetalSurface::name().as_ptr(),
|
ext::MetalSurface::NAME.as_ptr(),
|
||||||
];
|
];
|
||||||
&METAL_EXTS
|
&METAL_EXTS
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ pub struct Entry {
|
||||||
impl Entry {
|
impl Entry {
|
||||||
/// Load default Vulkan library for the current platform
|
/// Load default Vulkan library for the current platform
|
||||||
///
|
///
|
||||||
/// Prefer this over [`linked`](Self::linked) when your application can gracefully handle
|
/// Prefer this over [`linked()`][Self::linked()] when your application can gracefully handle
|
||||||
/// environments that lack Vulkan support, and when the build environment might not have Vulkan
|
/// environments that lack Vulkan support, and when the build environment might not have Vulkan
|
||||||
/// development packages installed (e.g. the Vulkan SDK, or Ubuntu's `libvulkan-dev`).
|
/// development packages installed (e.g. the Vulkan SDK, or Ubuntu's `libvulkan-dev`).
|
||||||
///
|
///
|
||||||
|
@ -78,7 +78,7 @@ impl Entry {
|
||||||
|
|
||||||
/// Load entry points from a Vulkan loader linked at compile time
|
/// Load entry points from a Vulkan loader linked at compile time
|
||||||
///
|
///
|
||||||
/// Compared to [`load`](Self::load), this is infallible, but requires that the build
|
/// Compared to [`load()`][Self::load()], this is infallible, but requires that the build
|
||||||
/// environment have Vulkan development packages installed (e.g. the Vulkan SDK, or Ubuntu's
|
/// environment have Vulkan development packages installed (e.g. the Vulkan SDK, or Ubuntu's
|
||||||
/// `libvulkan-dev`), and prevents the resulting binary from starting in environments that do not
|
/// `libvulkan-dev`), and prevents the resulting binary from starting in environments that do not
|
||||||
/// support Vulkan.
|
/// support Vulkan.
|
||||||
|
@ -197,9 +197,7 @@ impl Entry {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut api_version = 0;
|
let mut api_version = 0;
|
||||||
let enumerate_instance_version: Option<vk::PFN_vkEnumerateInstanceVersion> = {
|
let enumerate_instance_version: Option<vk::PFN_vkEnumerateInstanceVersion> = {
|
||||||
let name = ::std::ffi::CStr::from_bytes_with_nul_unchecked(
|
let name = CStr::from_bytes_with_nul_unchecked(b"vkEnumerateInstanceVersion\0");
|
||||||
b"vkEnumerateInstanceVersion\0",
|
|
||||||
);
|
|
||||||
mem::transmute((self.static_fn.get_instance_proc_addr)(
|
mem::transmute((self.static_fn.get_instance_proc_addr)(
|
||||||
vk::Instance::null(),
|
vk::Instance::null(),
|
||||||
name.as_ptr(),
|
name.as_ptr(),
|
||||||
|
@ -218,7 +216,7 @@ impl Entry {
|
||||||
///
|
///
|
||||||
/// # Safety
|
/// # Safety
|
||||||
/// In order for the created [`Instance`] to be valid for the duration of its
|
/// In order for the created [`Instance`] to be valid for the duration of its
|
||||||
/// usage, the [`Entry`](Self) this was called on must be dropped later than the
|
/// usage, the [`Entry`][Self] this was called on must be dropped later than the
|
||||||
/// resulting [`Instance`].
|
/// resulting [`Instance`].
|
||||||
#[inline]
|
#[inline]
|
||||||
pub unsafe fn create_instance(
|
pub unsafe fn create_instance(
|
||||||
|
@ -326,14 +324,11 @@ impl Default for Entry {
|
||||||
impl vk::StaticFn {
|
impl vk::StaticFn {
|
||||||
pub fn load_checked<F>(mut _f: F) -> Result<Self, MissingEntryPoint>
|
pub fn load_checked<F>(mut _f: F) -> Result<Self, MissingEntryPoint>
|
||||||
where
|
where
|
||||||
F: FnMut(&::std::ffi::CStr) -> *const c_void,
|
F: FnMut(&CStr) -> *const c_void,
|
||||||
{
|
{
|
||||||
// TODO: Make this a &'static CStr once CStr::from_bytes_with_nul_unchecked is const
|
|
||||||
static ENTRY_POINT: &[u8] = b"vkGetInstanceProcAddr\0";
|
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
get_instance_proc_addr: unsafe {
|
get_instance_proc_addr: unsafe {
|
||||||
let cname = CStr::from_bytes_with_nul_unchecked(ENTRY_POINT);
|
let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetInstanceProcAddr\0");
|
||||||
let val = _f(cname);
|
let val = _f(cname);
|
||||||
if val.is_null() {
|
if val.is_null() {
|
||||||
return Err(MissingEntryPoint);
|
return Err(MissingEntryPoint);
|
||||||
|
|
|
@ -43,10 +43,7 @@ impl AcquireDrmDisplay {
|
||||||
.assume_init_on_success(display)
|
.assume_init_on_success(display)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtAcquireDrmDisplayFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtAcquireDrmDisplayFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtAcquireDrmDisplayFn {
|
pub fn fp(&self) -> &vk::ExtAcquireDrmDisplayFn {
|
||||||
|
|
|
@ -27,10 +27,7 @@ impl BufferDeviceAddress {
|
||||||
(self.fp.get_buffer_device_address_ext)(self.handle, info)
|
(self.fp.get_buffer_device_address_ext)(self.handle, info)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtBufferDeviceAddressFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtBufferDeviceAddressFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtBufferDeviceAddressFn {
|
pub fn fp(&self) -> &vk::ExtBufferDeviceAddressFn {
|
||||||
|
|
|
@ -55,10 +55,7 @@ impl CalibratedTimestamps {
|
||||||
.result_with_success((timestamps, max_deviation))
|
.result_with_success((timestamps, max_deviation))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtCalibratedTimestampsFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtCalibratedTimestampsFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtCalibratedTimestampsFn {
|
pub fn fp(&self) -> &vk::ExtCalibratedTimestampsFn {
|
||||||
|
|
|
@ -54,10 +54,7 @@ impl DebugMarker {
|
||||||
(self.fp.cmd_debug_marker_insert_ext)(command_buffer, marker_info);
|
(self.fp.cmd_debug_marker_insert_ext)(command_buffer, marker_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtDebugMarkerFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtDebugMarkerFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtDebugMarkerFn {
|
pub fn fp(&self) -> &vk::ExtDebugMarkerFn {
|
||||||
|
|
|
@ -51,10 +51,7 @@ impl DebugReport {
|
||||||
.result_with_success(debug_cb)
|
.result_with_success(debug_cb)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtDebugReportFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtDebugReportFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtDebugReportFn {
|
pub fn fp(&self) -> &vk::ExtDebugReportFn {
|
||||||
|
|
|
@ -134,10 +134,7 @@ impl DebugUtils {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtDebugUtilsFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtDebugUtilsFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtDebugUtilsFn {
|
pub fn fp(&self) -> &vk::ExtDebugUtilsFn {
|
||||||
|
|
|
@ -194,10 +194,7 @@ impl DescriptorBuffer {
|
||||||
.result()
|
.result()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtDescriptorBufferFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtDescriptorBufferFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtDescriptorBufferFn {
|
pub fn fp(&self) -> &vk::ExtDescriptorBufferFn {
|
||||||
|
|
|
@ -184,10 +184,7 @@ impl ExtendedDynamicState {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtExtendedDynamicStateFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtExtendedDynamicStateFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtExtendedDynamicStateFn {
|
pub fn fp(&self) -> &vk::ExtExtendedDynamicStateFn {
|
||||||
|
|
|
@ -73,10 +73,7 @@ impl ExtendedDynamicState2 {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtExtendedDynamicState2Fn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtExtendedDynamicState2Fn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtExtendedDynamicState2Fn {
|
pub fn fp(&self) -> &vk::ExtExtendedDynamicState2Fn {
|
||||||
|
|
|
@ -397,10 +397,7 @@ impl ExtendedDynamicState3 {
|
||||||
(self.fp.cmd_set_coverage_reduction_mode_nv)(command_buffer, coverage_reduction_mode)
|
(self.fp.cmd_set_coverage_reduction_mode_nv)(command_buffer, coverage_reduction_mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtExtendedDynamicState3Fn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtExtendedDynamicState3Fn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtExtendedDynamicState3Fn {
|
pub fn fp(&self) -> &vk::ExtExtendedDynamicState3Fn {
|
||||||
|
|
|
@ -69,10 +69,7 @@ impl FullScreenExclusive {
|
||||||
.result_with_success(present_modes)
|
.result_with_success(present_modes)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtFullScreenExclusiveFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtFullScreenExclusiveFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtFullScreenExclusiveFn {
|
pub fn fp(&self) -> &vk::ExtFullScreenExclusiveFn {
|
||||||
|
|
|
@ -38,10 +38,7 @@ impl HeadlessSurface {
|
||||||
.result_with_success(surface)
|
.result_with_success(surface)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtHeadlessSurfaceFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtHeadlessSurfaceFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtHeadlessSurfaceFn {
|
pub fn fp(&self) -> &vk::ExtHeadlessSurfaceFn {
|
||||||
|
|
|
@ -30,10 +30,7 @@ impl ImageCompressionControl {
|
||||||
(self.fp.get_image_subresource_layout2_ext)(self.handle, image, subresource, layout)
|
(self.fp.get_image_subresource_layout2_ext)(self.handle, image, subresource, layout)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtImageCompressionControlFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtImageCompressionControlFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtImageCompressionControlFn {
|
pub fn fp(&self) -> &vk::ExtImageCompressionControlFn {
|
||||||
|
|
|
@ -31,10 +31,7 @@ impl ImageDrmFormatModifier {
|
||||||
.result()
|
.result()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtImageDrmFormatModifierFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtImageDrmFormatModifierFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtImageDrmFormatModifierFn {
|
pub fn fp(&self) -> &vk::ExtImageDrmFormatModifierFn {
|
||||||
|
|
|
@ -82,10 +82,7 @@ impl MeshShader {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtMeshShaderFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtMeshShaderFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtMeshShaderFn {
|
pub fn fp(&self) -> &vk::ExtMeshShaderFn {
|
||||||
|
|
|
@ -37,10 +37,7 @@ impl MetalSurface {
|
||||||
.result_with_success(surface)
|
.result_with_success(surface)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtMetalSurfaceFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtMetalSurfaceFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtMetalSurfaceFn {
|
pub fn fp(&self) -> &vk::ExtMetalSurfaceFn {
|
||||||
|
|
|
@ -19,8 +19,5 @@ impl PhysicalDeviceDrm {
|
||||||
props_drm
|
props_drm
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtPhysicalDeviceDrmFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtPhysicalDeviceDrmFn::name()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,10 +88,7 @@ impl PrivateData {
|
||||||
data
|
data
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtPrivateDataFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtPrivateDataFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtPrivateDataFn {
|
pub fn fp(&self) -> &vk::ExtPrivateDataFn {
|
||||||
|
|
|
@ -42,10 +42,7 @@ impl SampleLocations {
|
||||||
(self.fp.cmd_set_sample_locations_ext)(command_buffer, sample_locations_info)
|
(self.fp.cmd_set_sample_locations_ext)(command_buffer, sample_locations_info)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtSampleLocationsFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtSampleLocationsFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtSampleLocationsFn {
|
pub fn fp(&self) -> &vk::ExtSampleLocationsFn {
|
||||||
|
|
|
@ -28,10 +28,7 @@ impl ToolingInfo {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::ExtToolingInfoFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::ExtToolingInfoFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::ExtToolingInfoFn {
|
pub fn fp(&self) -> &vk::ExtToolingInfoFn {
|
||||||
|
|
|
@ -305,10 +305,7 @@ impl AccelerationStructure {
|
||||||
size_info
|
size_info
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrAccelerationStructureFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrAccelerationStructureFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrAccelerationStructureFn {
|
pub fn fp(&self) -> &vk::KhrAccelerationStructureFn {
|
||||||
|
|
|
@ -37,10 +37,7 @@ impl AndroidSurface {
|
||||||
.result_with_success(surface)
|
.result_with_success(surface)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrAndroidSurfaceFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrAndroidSurfaceFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrAndroidSurfaceFn {
|
pub fn fp(&self) -> &vk::KhrAndroidSurfaceFn {
|
||||||
|
|
|
@ -45,10 +45,7 @@ impl BufferDeviceAddress {
|
||||||
(self.fp.get_device_memory_opaque_capture_address_khr)(self.handle, info)
|
(self.fp.get_device_memory_opaque_capture_address_khr)(self.handle, info)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrBufferDeviceAddressFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrBufferDeviceAddressFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrBufferDeviceAddressFn {
|
pub fn fp(&self) -> &vk::KhrBufferDeviceAddressFn {
|
||||||
|
|
|
@ -72,10 +72,7 @@ impl CopyCommands2 {
|
||||||
(self.fp.cmd_resolve_image2_khr)(command_buffer, resolve_image_info)
|
(self.fp.cmd_resolve_image2_khr)(command_buffer, resolve_image_info)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrCopyCommands2Fn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrCopyCommands2Fn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrCopyCommands2Fn {
|
pub fn fp(&self) -> &vk::KhrCopyCommands2Fn {
|
||||||
|
|
|
@ -73,10 +73,7 @@ impl CreateRenderPass2 {
|
||||||
(self.fp.cmd_end_render_pass2_khr)(command_buffer, subpass_end_info);
|
(self.fp.cmd_end_render_pass2_khr)(command_buffer, subpass_end_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrCreateRenderpass2Fn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrCreateRenderpass2Fn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrCreateRenderpass2Fn {
|
pub fn fp(&self) -> &vk::KhrCreateRenderpass2Fn {
|
||||||
|
|
|
@ -76,10 +76,7 @@ impl DeferredHostOperations {
|
||||||
(self.fp.get_deferred_operation_result_khr)(self.handle, operation).result()
|
(self.fp.get_deferred_operation_result_khr)(self.handle, operation).result()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrDeferredHostOperationsFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrDeferredHostOperationsFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrDeferredHostOperationsFn {
|
pub fn fp(&self) -> &vk::KhrDeferredHostOperationsFn {
|
||||||
|
|
|
@ -152,10 +152,7 @@ impl DeviceGroup {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrDeviceGroupFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrDeviceGroupFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrDeviceGroupFn {
|
pub fn fp(&self) -> &vk::KhrDeviceGroupFn {
|
||||||
|
|
|
@ -49,10 +49,7 @@ impl DeviceGroupCreation {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrDeviceGroupCreationFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrDeviceGroupCreationFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrDeviceGroupCreationFn {
|
pub fn fp(&self) -> &vk::KhrDeviceGroupCreationFn {
|
||||||
|
|
|
@ -126,10 +126,7 @@ impl Display {
|
||||||
.assume_init_on_success(surface)
|
.assume_init_on_success(surface)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrDisplayFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrDisplayFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrDisplayFn {
|
pub fn fp(&self) -> &vk::KhrDisplayFn {
|
||||||
|
|
|
@ -40,10 +40,7 @@ impl DisplaySwapchain {
|
||||||
Ok(swapchains)
|
Ok(swapchains)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrDisplaySwapchainFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrDisplaySwapchainFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrDisplaySwapchainFn {
|
pub fn fp(&self) -> &vk::KhrDisplaySwapchainFn {
|
||||||
|
|
|
@ -62,10 +62,7 @@ impl DrawIndirectCount {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrDrawIndirectCountFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrDrawIndirectCountFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrDrawIndirectCountFn {
|
pub fn fp(&self) -> &vk::KhrDrawIndirectCountFn {
|
||||||
|
|
|
@ -32,10 +32,7 @@ impl DynamicRendering {
|
||||||
(self.fp.cmd_end_rendering_khr)(command_buffer)
|
(self.fp.cmd_end_rendering_khr)(command_buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrDynamicRenderingFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrDynamicRenderingFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrDynamicRenderingFn {
|
pub fn fp(&self) -> &vk::KhrDynamicRenderingFn {
|
||||||
|
|
|
@ -32,10 +32,7 @@ impl ExternalFenceFd {
|
||||||
(self.fp.get_fence_fd_khr)(self.handle, get_info, &mut fd).result_with_success(fd)
|
(self.fp.get_fence_fd_khr)(self.handle, get_info, &mut fd).result_with_success(fd)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrExternalFenceFdFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrExternalFenceFdFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrExternalFenceFdFn {
|
pub fn fp(&self) -> &vk::KhrExternalFenceFdFn {
|
||||||
|
|
|
@ -41,10 +41,7 @@ impl ExternalFenceWin32 {
|
||||||
.result_with_success(handle)
|
.result_with_success(handle)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrExternalFenceWin32Fn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrExternalFenceWin32Fn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrExternalFenceWin32Fn {
|
pub fn fp(&self) -> &vk::KhrExternalFenceWin32Fn {
|
||||||
|
|
|
@ -43,10 +43,7 @@ impl ExternalMemoryFd {
|
||||||
.result_with_success(memory_fd_properties)
|
.result_with_success(memory_fd_properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrExternalMemoryFdFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrExternalMemoryFdFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrExternalMemoryFdFn {
|
pub fn fp(&self) -> &vk::KhrExternalMemoryFdFn {
|
||||||
|
|
|
@ -49,10 +49,7 @@ impl ExternalMemoryWin32 {
|
||||||
.result_with_success(memory_win32_handle_properties)
|
.result_with_success(memory_win32_handle_properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrExternalMemoryWin32Fn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrExternalMemoryWin32Fn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrExternalMemoryWin32Fn {
|
pub fn fp(&self) -> &vk::KhrExternalMemoryWin32Fn {
|
||||||
|
|
|
@ -35,10 +35,7 @@ impl ExternalSemaphoreFd {
|
||||||
(self.fp.get_semaphore_fd_khr)(self.handle, get_info, &mut fd).result_with_success(fd)
|
(self.fp.get_semaphore_fd_khr)(self.handle, get_info, &mut fd).result_with_success(fd)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrExternalSemaphoreFdFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrExternalSemaphoreFdFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrExternalSemaphoreFdFn {
|
pub fn fp(&self) -> &vk::KhrExternalSemaphoreFdFn {
|
||||||
|
|
|
@ -41,10 +41,7 @@ impl ExternalSemaphoreWin32 {
|
||||||
.result_with_success(handle)
|
.result_with_success(handle)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrExternalSemaphoreWin32Fn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrExternalSemaphoreWin32Fn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrExternalSemaphoreWin32Fn {
|
pub fn fp(&self) -> &vk::KhrExternalSemaphoreWin32Fn {
|
||||||
|
|
|
@ -75,10 +75,7 @@ impl GetMemoryRequirements2 {
|
||||||
assert_eq!(count as usize, out.len());
|
assert_eq!(count as usize, out.len());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrGetMemoryRequirements2Fn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrGetMemoryRequirements2Fn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrGetMemoryRequirements2Fn {
|
pub fn fp(&self) -> &vk::KhrGetMemoryRequirements2Fn {
|
||||||
|
|
|
@ -155,10 +155,7 @@ impl GetPhysicalDeviceProperties2 {
|
||||||
assert_eq!(count as usize, out.len());
|
assert_eq!(count as usize, out.len());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrGetPhysicalDeviceProperties2Fn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrGetPhysicalDeviceProperties2Fn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrGetPhysicalDeviceProperties2Fn {
|
pub fn fp(&self) -> &vk::KhrGetPhysicalDeviceProperties2Fn {
|
||||||
|
|
|
@ -72,10 +72,7 @@ impl GetSurfaceCapabilities2 {
|
||||||
err_code.result()
|
err_code.result()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrGetSurfaceCapabilities2Fn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrGetSurfaceCapabilities2Fn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrGetSurfaceCapabilities2Fn {
|
pub fn fp(&self) -> &vk::KhrGetSurfaceCapabilities2Fn {
|
||||||
|
|
|
@ -28,10 +28,7 @@ impl Maintenance1 {
|
||||||
(self.fp.trim_command_pool_khr)(self.handle, command_pool, flags);
|
(self.fp.trim_command_pool_khr)(self.handle, command_pool, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrMaintenance1Fn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrMaintenance1Fn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrMaintenance1Fn {
|
pub fn fp(&self) -> &vk::KhrMaintenance1Fn {
|
||||||
|
|
|
@ -28,10 +28,7 @@ impl Maintenance3 {
|
||||||
(self.fp.get_descriptor_set_layout_support_khr)(self.handle, create_info, out);
|
(self.fp.get_descriptor_set_layout_support_khr)(self.handle, create_info, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrMaintenance3Fn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrMaintenance3Fn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrMaintenance3Fn {
|
pub fn fp(&self) -> &vk::KhrMaintenance3Fn {
|
||||||
|
|
|
@ -74,10 +74,7 @@ impl Maintenance4 {
|
||||||
assert_eq!(count as usize, out.len());
|
assert_eq!(count as usize, out.len());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrMaintenance4Fn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrMaintenance4Fn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrMaintenance4Fn {
|
pub fn fp(&self) -> &vk::KhrMaintenance4Fn {
|
||||||
|
|
|
@ -67,10 +67,7 @@ impl PipelineExecutableProperties {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrPipelineExecutablePropertiesFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrPipelineExecutablePropertiesFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrPipelineExecutablePropertiesFn {
|
pub fn fp(&self) -> &vk::KhrPipelineExecutablePropertiesFn {
|
||||||
|
|
|
@ -30,10 +30,7 @@ impl PresentWait {
|
||||||
(self.fp.wait_for_present_khr)(self.handle, swapchain, present_id, timeout).result()
|
(self.fp.wait_for_present_khr)(self.handle, swapchain, present_id, timeout).result()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrPresentWaitFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrPresentWaitFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrPresentWaitFn {
|
pub fn fp(&self) -> &vk::KhrPresentWaitFn {
|
||||||
|
|
|
@ -56,10 +56,7 @@ impl PushDescriptor {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrPushDescriptorFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrPushDescriptorFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrPushDescriptorFn {
|
pub fn fp(&self) -> &vk::KhrPushDescriptorFn {
|
||||||
|
|
|
@ -30,10 +30,7 @@ impl RayTracingMaintenance1 {
|
||||||
(self.fp.cmd_trace_rays_indirect2_khr)(command_buffer, indirect_device_address);
|
(self.fp.cmd_trace_rays_indirect2_khr)(command_buffer, indirect_device_address);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrRayTracingMaintenance1Fn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrRayTracingMaintenance1Fn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrRayTracingMaintenance1Fn {
|
pub fn fp(&self) -> &vk::KhrRayTracingMaintenance1Fn {
|
||||||
|
|
|
@ -177,10 +177,7 @@ impl RayTracingPipeline {
|
||||||
(self.fp.cmd_set_ray_tracing_pipeline_stack_size_khr)(command_buffer, pipeline_stack_size);
|
(self.fp.cmd_set_ray_tracing_pipeline_stack_size_khr)(command_buffer, pipeline_stack_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrRayTracingPipelineFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrRayTracingPipelineFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrRayTracingPipelineFn {
|
pub fn fp(&self) -> &vk::KhrRayTracingPipelineFn {
|
||||||
|
|
|
@ -93,10 +93,7 @@ impl Surface {
|
||||||
(self.fp.destroy_surface_khr)(self.handle, surface, allocation_callbacks.as_raw_ptr());
|
(self.fp.destroy_surface_khr)(self.handle, surface, allocation_callbacks.as_raw_ptr());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrSurfaceFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrSurfaceFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrSurfaceFn {
|
pub fn fp(&self) -> &vk::KhrSurfaceFn {
|
||||||
|
|
|
@ -194,10 +194,7 @@ impl Swapchain {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrSwapchainFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrSwapchainFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrSwapchainFn {
|
pub fn fp(&self) -> &vk::KhrSwapchainFn {
|
||||||
|
|
|
@ -89,10 +89,7 @@ impl Synchronization2 {
|
||||||
(self.fp.queue_submit2_khr)(queue, submits.len() as u32, submits.as_ptr(), fence).result()
|
(self.fp.queue_submit2_khr)(queue, submits.len() as u32, submits.as_ptr(), fence).result()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrSynchronization2Fn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrSynchronization2Fn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrSynchronization2Fn {
|
pub fn fp(&self) -> &vk::KhrSynchronization2Fn {
|
||||||
|
|
|
@ -43,10 +43,7 @@ impl TimelineSemaphore {
|
||||||
(self.fp.signal_semaphore_khr)(self.handle, signal_info).result()
|
(self.fp.signal_semaphore_khr)(self.handle, signal_info).result()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrTimelineSemaphoreFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrTimelineSemaphoreFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrTimelineSemaphoreFn {
|
pub fn fp(&self) -> &vk::KhrTimelineSemaphoreFn {
|
||||||
|
|
|
@ -54,10 +54,7 @@ impl WaylandSurface {
|
||||||
b > 0
|
b > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrWaylandSurfaceFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrWaylandSurfaceFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrWaylandSurfaceFn {
|
pub fn fp(&self) -> &vk::KhrWaylandSurfaceFn {
|
||||||
|
|
|
@ -52,10 +52,7 @@ impl Win32Surface {
|
||||||
b > 0
|
b > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrWin32SurfaceFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrWin32SurfaceFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrWin32SurfaceFn {
|
pub fn fp(&self) -> &vk::KhrWin32SurfaceFn {
|
||||||
|
|
|
@ -56,10 +56,7 @@ impl XcbSurface {
|
||||||
b > 0
|
b > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrXcbSurfaceFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrXcbSurfaceFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrXcbSurfaceFn {
|
pub fn fp(&self) -> &vk::KhrXcbSurfaceFn {
|
||||||
|
|
|
@ -56,10 +56,7 @@ impl XlibSurface {
|
||||||
b > 0
|
b > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::KhrXlibSurfaceFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::KhrXlibSurfaceFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::KhrXlibSurfaceFn {
|
pub fn fp(&self) -> &vk::KhrXlibSurfaceFn {
|
||||||
|
|
|
@ -37,10 +37,7 @@ impl IOSSurface {
|
||||||
.result_with_success(surface)
|
.result_with_success(surface)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::MvkIosSurfaceFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::MvkIosSurfaceFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::MvkIosSurfaceFn {
|
pub fn fp(&self) -> &vk::MvkIosSurfaceFn {
|
||||||
|
|
|
@ -37,10 +37,7 @@ impl MacOSSurface {
|
||||||
.result_with_success(surface)
|
.result_with_success(surface)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::MvkMacosSurfaceFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::MvkMacosSurfaceFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::MvkMacosSurfaceFn {
|
pub fn fp(&self) -> &vk::MvkMacosSurfaceFn {
|
||||||
|
|
|
@ -37,10 +37,7 @@ impl ViSurface {
|
||||||
.result_with_success(surface)
|
.result_with_success(surface)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::NnViSurfaceFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::NnViSurfaceFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::NnViSurfaceFn {
|
pub fn fp(&self) -> &vk::NnViSurfaceFn {
|
||||||
|
|
|
@ -58,10 +58,7 @@ impl CoverageReductionMode {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::NvCoverageReductionModeFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::NvCoverageReductionModeFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::NvCoverageReductionModeFn {
|
pub fn fp(&self) -> &vk::NvCoverageReductionModeFn {
|
||||||
|
|
|
@ -51,10 +51,7 @@ impl DeviceDiagnosticCheckpoints {
|
||||||
assert_eq!(count as usize, out.len());
|
assert_eq!(count as usize, out.len());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::NvDeviceDiagnosticCheckpointsFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::NvDeviceDiagnosticCheckpointsFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::NvDeviceDiagnosticCheckpointsFn {
|
pub fn fp(&self) -> &vk::NvDeviceDiagnosticCheckpointsFn {
|
||||||
|
|
|
@ -69,10 +69,7 @@ impl MeshShader {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::NvMeshShaderFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::NvMeshShaderFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::NvMeshShaderFn {
|
pub fn fp(&self) -> &vk::NvMeshShaderFn {
|
||||||
|
|
|
@ -254,10 +254,7 @@ impl RayTracing {
|
||||||
(self.fp.compile_deferred_nv)(self.handle, pipeline, shader).result()
|
(self.fp.compile_deferred_nv)(self.handle, pipeline, shader).result()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub const NAME: &'static CStr = vk::NvRayTracingFn::NAME;
|
||||||
pub const fn name() -> &'static CStr {
|
|
||||||
vk::NvRayTracingFn::name()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn fp(&self) -> &vk::NvRayTracingFn {
|
pub fn fp(&self) -> &vk::NvRayTracingFn {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -228,13 +228,13 @@ impl ExampleBase {
|
||||||
ash_window::enumerate_required_extensions(window.raw_display_handle())
|
ash_window::enumerate_required_extensions(window.raw_display_handle())
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.to_vec();
|
.to_vec();
|
||||||
extension_names.push(DebugUtils::name().as_ptr());
|
extension_names.push(DebugUtils::NAME.as_ptr());
|
||||||
|
|
||||||
#[cfg(any(target_os = "macos", target_os = "ios"))]
|
#[cfg(any(target_os = "macos", target_os = "ios"))]
|
||||||
{
|
{
|
||||||
extension_names.push(KhrPortabilityEnumerationFn::name().as_ptr());
|
extension_names.push(KhrPortabilityEnumerationFn::NAME.as_ptr());
|
||||||
// Enabling this extension is a requirement when using `VK_KHR_portability_subset`
|
// Enabling this extension is a requirement when using `VK_KHR_portability_subset`
|
||||||
extension_names.push(KhrGetPhysicalDeviceProperties2Fn::name().as_ptr());
|
extension_names.push(KhrGetPhysicalDeviceProperties2Fn::NAME.as_ptr());
|
||||||
}
|
}
|
||||||
|
|
||||||
let appinfo = vk::ApplicationInfo::default()
|
let appinfo = vk::ApplicationInfo::default()
|
||||||
|
@ -316,9 +316,9 @@ impl ExampleBase {
|
||||||
.expect("Couldn't find suitable device.");
|
.expect("Couldn't find suitable device.");
|
||||||
let queue_family_index = queue_family_index as u32;
|
let queue_family_index = queue_family_index as u32;
|
||||||
let device_extension_names_raw = [
|
let device_extension_names_raw = [
|
||||||
Swapchain::name().as_ptr(),
|
Swapchain::NAME.as_ptr(),
|
||||||
#[cfg(any(target_os = "macos", target_os = "ios"))]
|
#[cfg(any(target_os = "macos", target_os = "ios"))]
|
||||||
KhrPortabilitySubsetFn::name().as_ptr(),
|
KhrPortabilitySubsetFn::NAME.as_ptr(),
|
||||||
];
|
];
|
||||||
let features = vk::PhysicalDeviceFeatures {
|
let features = vk::PhysicalDeviceFeatures {
|
||||||
shader_clip_distance: 1,
|
shader_clip_distance: 1,
|
||||||
|
|
|
@ -1078,10 +1078,9 @@ pub fn generate_extension_commands<'a>(
|
||||||
let byte_name_ident = Literal::byte_string(format!("{extension_name}\0").as_bytes());
|
let byte_name_ident = Literal::byte_string(format!("{extension_name}\0").as_bytes());
|
||||||
let extension_cstr = quote! {
|
let extension_cstr = quote! {
|
||||||
impl #ident {
|
impl #ident {
|
||||||
#[inline]
|
pub const NAME: &'static ::std::ffi::CStr = unsafe {
|
||||||
pub const fn name() -> &'static ::std::ffi::CStr {
|
::std::ffi::CStr::from_bytes_with_nul_unchecked(#byte_name_ident)
|
||||||
unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(#byte_name_ident) }
|
};
|
||||||
}
|
|
||||||
#spec_version
|
#spec_version
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue