use crate::vk::*;
use ::core::ptr::NonNull;
use ::core::num::NonZeroU64;
use crate::sys::ffi::*;
use crate::sys;
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct AccelerationStructureKHR(pub NonZeroU64);
from_by_transmute!(AccelerationStructureKHR => sys::VkAccelerationStructureKHR);
impl_raw_handle!(AccelerationStructureKHR: VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR => sys::VkAccelerationStructureKHR; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(AccelerationStructureKHR);
impl AccelerationStructureKHR {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct AccelerationStructureNV(pub NonZeroU64);
from_by_transmute!(AccelerationStructureNV => sys::VkAccelerationStructureNV);
impl_raw_handle!(AccelerationStructureNV: VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV => sys::VkAccelerationStructureNV; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(AccelerationStructureNV);
impl AccelerationStructureNV {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Buffer(pub NonZeroU64);
from_by_transmute!(Buffer => sys::VkBuffer);
impl_raw_handle!(Buffer: VK_OBJECT_TYPE_BUFFER => sys::VkBuffer; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(Buffer);
impl Buffer {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct BufferCollectionFUCHSIA(pub NonZeroU64);
from_by_transmute!(BufferCollectionFUCHSIA => sys::VkBufferCollectionFUCHSIA);
impl_raw_handle!(BufferCollectionFUCHSIA: VK_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA => sys::VkBufferCollectionFUCHSIA; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(BufferCollectionFUCHSIA);
impl BufferCollectionFUCHSIA {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct BufferView(pub NonZeroU64);
from_by_transmute!(BufferView => sys::VkBufferView);
impl_raw_handle!(BufferView: VK_OBJECT_TYPE_BUFFER_VIEW => sys::VkBufferView; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(BufferView);
impl BufferView {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct CommandBuffer(pub NonNull<void>);
from_by_transmute!(CommandBuffer => sys::VkCommandBuffer);
impl_raw_handle!(CommandBuffer: VK_OBJECT_TYPE_COMMAND_BUFFER => sys::VkCommandBuffer; RawSubHandle = CommandPool);
impl_debug_for_raw_dispatchable_handle!(CommandBuffer);
impl CommandBuffer {
pub fn new(raw: *mut void) -> Option<Self> {
NonNull::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: *mut void) -> Self {
Self(unsafe { NonNull::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct CommandPool(pub NonZeroU64);
from_by_transmute!(CommandPool => sys::VkCommandPool);
impl_raw_handle!(CommandPool: VK_OBJECT_TYPE_COMMAND_POOL => sys::VkCommandPool; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(CommandPool);
impl CommandPool {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct CuFunctionNVX(pub NonZeroU64);
from_by_transmute!(CuFunctionNVX => sys::VkCuFunctionNVX);
impl_raw_handle!(CuFunctionNVX: VK_OBJECT_TYPE_CU_FUNCTION_NVX => sys::VkCuFunctionNVX; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(CuFunctionNVX);
impl CuFunctionNVX {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct CuModuleNVX(pub NonZeroU64);
from_by_transmute!(CuModuleNVX => sys::VkCuModuleNVX);
impl_raw_handle!(CuModuleNVX: VK_OBJECT_TYPE_CU_MODULE_NVX => sys::VkCuModuleNVX; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(CuModuleNVX);
impl CuModuleNVX {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct CudaFunctionNV(pub NonZeroU64);
from_by_transmute!(CudaFunctionNV => sys::VkCudaFunctionNV);
impl_raw_handle!(CudaFunctionNV: VK_OBJECT_TYPE_CUDA_FUNCTION_NV => sys::VkCudaFunctionNV; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(CudaFunctionNV);
impl CudaFunctionNV {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct CudaModuleNV(pub NonZeroU64);
from_by_transmute!(CudaModuleNV => sys::VkCudaModuleNV);
impl_raw_handle!(CudaModuleNV: VK_OBJECT_TYPE_CUDA_MODULE_NV => sys::VkCudaModuleNV; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(CudaModuleNV);
impl CudaModuleNV {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct DataGraphPipelineSessionARM(pub NonZeroU64);
from_by_transmute!(DataGraphPipelineSessionARM => sys::VkDataGraphPipelineSessionARM);
impl_raw_handle!(DataGraphPipelineSessionARM: VK_OBJECT_TYPE_DATA_GRAPH_PIPELINE_SESSION_ARM => sys::VkDataGraphPipelineSessionARM; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(DataGraphPipelineSessionARM);
impl DataGraphPipelineSessionARM {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct DebugReportCallbackEXT(pub NonZeroU64);
from_by_transmute!(DebugReportCallbackEXT => sys::VkDebugReportCallbackEXT);
impl_raw_handle!(DebugReportCallbackEXT: VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT => sys::VkDebugReportCallbackEXT; RawSubHandle = Instance);
impl_debug_for_raw_non_dispatchable_handle!(DebugReportCallbackEXT);
impl DebugReportCallbackEXT {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct DebugUtilsMessengerEXT(pub NonZeroU64);
from_by_transmute!(DebugUtilsMessengerEXT => sys::VkDebugUtilsMessengerEXT);
impl_raw_handle!(DebugUtilsMessengerEXT: VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT => sys::VkDebugUtilsMessengerEXT; RawSubHandle = Instance);
impl_debug_for_raw_non_dispatchable_handle!(DebugUtilsMessengerEXT);
impl DebugUtilsMessengerEXT {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct DeferredOperationKHR(pub NonZeroU64);
from_by_transmute!(DeferredOperationKHR => sys::VkDeferredOperationKHR);
impl_raw_handle!(DeferredOperationKHR: VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR => sys::VkDeferredOperationKHR; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(DeferredOperationKHR);
impl DeferredOperationKHR {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct DescriptorPool(pub NonZeroU64);
from_by_transmute!(DescriptorPool => sys::VkDescriptorPool);
impl_raw_handle!(DescriptorPool: VK_OBJECT_TYPE_DESCRIPTOR_POOL => sys::VkDescriptorPool; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(DescriptorPool);
impl DescriptorPool {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct DescriptorSet(pub NonZeroU64);
from_by_transmute!(DescriptorSet => sys::VkDescriptorSet);
impl_raw_handle!(DescriptorSet: VK_OBJECT_TYPE_DESCRIPTOR_SET => sys::VkDescriptorSet; RawSubHandle = DescriptorPool);
impl_debug_for_raw_non_dispatchable_handle!(DescriptorSet);
impl DescriptorSet {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct DescriptorSetLayout(pub NonZeroU64);
from_by_transmute!(DescriptorSetLayout => sys::VkDescriptorSetLayout);
impl_raw_handle!(DescriptorSetLayout: VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT => sys::VkDescriptorSetLayout; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(DescriptorSetLayout);
impl DescriptorSetLayout {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct DescriptorUpdateTemplate(pub NonZeroU64);
from_by_transmute!(DescriptorUpdateTemplate => sys::VkDescriptorUpdateTemplate);
impl_raw_handle!(DescriptorUpdateTemplate: VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE => sys::VkDescriptorUpdateTemplate; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(DescriptorUpdateTemplate);
impl DescriptorUpdateTemplate {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
pub type DescriptorUpdateTemplateKHR = DescriptorUpdateTemplate;
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Device(pub NonNull<void>);
from_by_transmute!(Device => sys::VkDevice);
impl_raw_handle!(Device: VK_OBJECT_TYPE_DEVICE => sys::VkDevice; RawSubHandle = PhysicalDevice);
impl_debug_for_raw_dispatchable_handle!(Device);
impl Device {
pub fn new(raw: *mut void) -> Option<Self> {
NonNull::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: *mut void) -> Self {
Self(unsafe { NonNull::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct DeviceMemory(pub NonZeroU64);
from_by_transmute!(DeviceMemory => sys::VkDeviceMemory);
impl_raw_handle!(DeviceMemory: VK_OBJECT_TYPE_DEVICE_MEMORY => sys::VkDeviceMemory; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(DeviceMemory);
impl DeviceMemory {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct DisplayKHR(pub NonZeroU64);
from_by_transmute!(DisplayKHR => sys::VkDisplayKHR);
impl_raw_handle!(DisplayKHR: VK_OBJECT_TYPE_DISPLAY_KHR => sys::VkDisplayKHR; RawSubHandle = PhysicalDevice);
impl_debug_for_raw_non_dispatchable_handle!(DisplayKHR);
impl DisplayKHR {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct DisplayModeKHR(pub NonZeroU64);
from_by_transmute!(DisplayModeKHR => sys::VkDisplayModeKHR);
impl_raw_handle!(DisplayModeKHR: VK_OBJECT_TYPE_DISPLAY_MODE_KHR => sys::VkDisplayModeKHR; RawSubHandle = DisplayKHR);
impl_debug_for_raw_non_dispatchable_handle!(DisplayModeKHR);
impl DisplayModeKHR {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Event(pub NonZeroU64);
from_by_transmute!(Event => sys::VkEvent);
impl_raw_handle!(Event: VK_OBJECT_TYPE_EVENT => sys::VkEvent; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(Event);
impl Event {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ExternalComputeQueueNV(pub NonNull<void>);
from_by_transmute!(ExternalComputeQueueNV => sys::VkExternalComputeQueueNV);
impl_raw_handle!(ExternalComputeQueueNV: VK_OBJECT_TYPE_EXTERNAL_COMPUTE_QUEUE_NV => sys::VkExternalComputeQueueNV; RawSubHandle = Device);
impl_debug_for_raw_dispatchable_handle!(ExternalComputeQueueNV);
impl ExternalComputeQueueNV {
pub fn new(raw: *mut void) -> Option<Self> {
NonNull::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: *mut void) -> Self {
Self(unsafe { NonNull::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Fence(pub NonZeroU64);
from_by_transmute!(Fence => sys::VkFence);
impl_raw_handle!(Fence: VK_OBJECT_TYPE_FENCE => sys::VkFence; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(Fence);
impl Fence {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Framebuffer(pub NonZeroU64);
from_by_transmute!(Framebuffer => sys::VkFramebuffer);
impl_raw_handle!(Framebuffer: VK_OBJECT_TYPE_FRAMEBUFFER => sys::VkFramebuffer; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(Framebuffer);
impl Framebuffer {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Image(pub NonZeroU64);
from_by_transmute!(Image => sys::VkImage);
impl_raw_handle!(Image: VK_OBJECT_TYPE_IMAGE => sys::VkImage; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(Image);
impl Image {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ImageView(pub NonZeroU64);
from_by_transmute!(ImageView => sys::VkImageView);
impl_raw_handle!(ImageView: VK_OBJECT_TYPE_IMAGE_VIEW => sys::VkImageView; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(ImageView);
impl ImageView {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct IndirectCommandsLayoutEXT(pub NonZeroU64);
from_by_transmute!(IndirectCommandsLayoutEXT => sys::VkIndirectCommandsLayoutEXT);
impl_raw_handle!(IndirectCommandsLayoutEXT: VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_EXT => sys::VkIndirectCommandsLayoutEXT; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(IndirectCommandsLayoutEXT);
impl IndirectCommandsLayoutEXT {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct IndirectCommandsLayoutNV(pub NonZeroU64);
from_by_transmute!(IndirectCommandsLayoutNV => sys::VkIndirectCommandsLayoutNV);
impl_raw_handle!(IndirectCommandsLayoutNV: VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV => sys::VkIndirectCommandsLayoutNV; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(IndirectCommandsLayoutNV);
impl IndirectCommandsLayoutNV {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct IndirectExecutionSetEXT(pub NonZeroU64);
from_by_transmute!(IndirectExecutionSetEXT => sys::VkIndirectExecutionSetEXT);
impl_raw_handle!(IndirectExecutionSetEXT: VK_OBJECT_TYPE_INDIRECT_EXECUTION_SET_EXT => sys::VkIndirectExecutionSetEXT; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(IndirectExecutionSetEXT);
impl IndirectExecutionSetEXT {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Instance(pub NonNull<void>);
from_by_transmute!(Instance => sys::VkInstance);
impl_raw_handle!(Instance: VK_OBJECT_TYPE_INSTANCE => sys::VkInstance; RawRootHandle);
impl_debug_for_raw_dispatchable_handle!(Instance);
impl Instance {
pub fn new(raw: *mut void) -> Option<Self> {
NonNull::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: *mut void) -> Self {
Self(unsafe { NonNull::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct MicromapEXT(pub NonZeroU64);
from_by_transmute!(MicromapEXT => sys::VkMicromapEXT);
impl_raw_handle!(MicromapEXT: VK_OBJECT_TYPE_MICROMAP_EXT => sys::VkMicromapEXT; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(MicromapEXT);
impl MicromapEXT {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct OpticalFlowSessionNV(pub NonZeroU64);
from_by_transmute!(OpticalFlowSessionNV => sys::VkOpticalFlowSessionNV);
impl_raw_handle!(OpticalFlowSessionNV: VK_OBJECT_TYPE_OPTICAL_FLOW_SESSION_NV => sys::VkOpticalFlowSessionNV; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(OpticalFlowSessionNV);
impl OpticalFlowSessionNV {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct PerformanceConfigurationINTEL(pub NonZeroU64);
from_by_transmute!(PerformanceConfigurationINTEL => sys::VkPerformanceConfigurationINTEL);
impl_raw_handle!(PerformanceConfigurationINTEL: VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL => sys::VkPerformanceConfigurationINTEL; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(PerformanceConfigurationINTEL);
impl PerformanceConfigurationINTEL {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct PhysicalDevice(pub NonNull<void>);
from_by_transmute!(PhysicalDevice => sys::VkPhysicalDevice);
impl_raw_handle!(PhysicalDevice: VK_OBJECT_TYPE_PHYSICAL_DEVICE => sys::VkPhysicalDevice; RawSubHandle = Instance);
impl_debug_for_raw_dispatchable_handle!(PhysicalDevice);
impl PhysicalDevice {
pub fn new(raw: *mut void) -> Option<Self> {
NonNull::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: *mut void) -> Self {
Self(unsafe { NonNull::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Pipeline(pub NonZeroU64);
from_by_transmute!(Pipeline => sys::VkPipeline);
impl_raw_handle!(Pipeline: VK_OBJECT_TYPE_PIPELINE => sys::VkPipeline; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(Pipeline);
impl Pipeline {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct PipelineBinaryKHR(pub NonZeroU64);
from_by_transmute!(PipelineBinaryKHR => sys::VkPipelineBinaryKHR);
impl_raw_handle!(PipelineBinaryKHR: VK_OBJECT_TYPE_PIPELINE_BINARY_KHR => sys::VkPipelineBinaryKHR; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(PipelineBinaryKHR);
impl PipelineBinaryKHR {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct PipelineCache(pub NonZeroU64);
from_by_transmute!(PipelineCache => sys::VkPipelineCache);
impl_raw_handle!(PipelineCache: VK_OBJECT_TYPE_PIPELINE_CACHE => sys::VkPipelineCache; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(PipelineCache);
impl PipelineCache {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct PipelineLayout(pub NonZeroU64);
from_by_transmute!(PipelineLayout => sys::VkPipelineLayout);
impl_raw_handle!(PipelineLayout: VK_OBJECT_TYPE_PIPELINE_LAYOUT => sys::VkPipelineLayout; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(PipelineLayout);
impl PipelineLayout {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct PrivateDataSlot(pub NonZeroU64);
from_by_transmute!(PrivateDataSlot => sys::VkPrivateDataSlot);
impl_raw_handle!(PrivateDataSlot: VK_OBJECT_TYPE_PRIVATE_DATA_SLOT => sys::VkPrivateDataSlot; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(PrivateDataSlot);
impl PrivateDataSlot {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
pub type PrivateDataSlotEXT = PrivateDataSlot;
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct QueryPool(pub NonZeroU64);
from_by_transmute!(QueryPool => sys::VkQueryPool);
impl_raw_handle!(QueryPool: VK_OBJECT_TYPE_QUERY_POOL => sys::VkQueryPool; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(QueryPool);
impl QueryPool {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Queue(pub NonNull<void>);
from_by_transmute!(Queue => sys::VkQueue);
impl_raw_handle!(Queue: VK_OBJECT_TYPE_QUEUE => sys::VkQueue; RawSubHandle = Device);
impl_debug_for_raw_dispatchable_handle!(Queue);
impl Queue {
pub fn new(raw: *mut void) -> Option<Self> {
NonNull::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: *mut void) -> Self {
Self(unsafe { NonNull::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct RenderPass(pub NonZeroU64);
from_by_transmute!(RenderPass => sys::VkRenderPass);
impl_raw_handle!(RenderPass: VK_OBJECT_TYPE_RENDER_PASS => sys::VkRenderPass; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(RenderPass);
impl RenderPass {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Sampler(pub NonZeroU64);
from_by_transmute!(Sampler => sys::VkSampler);
impl_raw_handle!(Sampler: VK_OBJECT_TYPE_SAMPLER => sys::VkSampler; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(Sampler);
impl Sampler {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct SamplerYcbcrConversion(pub NonZeroU64);
from_by_transmute!(SamplerYcbcrConversion => sys::VkSamplerYcbcrConversion);
impl_raw_handle!(SamplerYcbcrConversion: VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION => sys::VkSamplerYcbcrConversion; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(SamplerYcbcrConversion);
impl SamplerYcbcrConversion {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
pub type SamplerYcbcrConversionKHR = SamplerYcbcrConversion;
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Semaphore(pub NonZeroU64);
from_by_transmute!(Semaphore => sys::VkSemaphore);
impl_raw_handle!(Semaphore: VK_OBJECT_TYPE_SEMAPHORE => sys::VkSemaphore; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(Semaphore);
impl Semaphore {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct SemaphoreSciSyncPoolNV(pub NonZeroU64);
from_by_transmute!(SemaphoreSciSyncPoolNV => sys::VkSemaphoreSciSyncPoolNV);
impl_raw_handle!(SemaphoreSciSyncPoolNV: VK_OBJECT_TYPE_SEMAPHORE_SCI_SYNC_POOL_NV => sys::VkSemaphoreSciSyncPoolNV; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(SemaphoreSciSyncPoolNV);
impl SemaphoreSciSyncPoolNV {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ShaderEXT(pub NonZeroU64);
from_by_transmute!(ShaderEXT => sys::VkShaderEXT);
impl_raw_handle!(ShaderEXT: VK_OBJECT_TYPE_SHADER_EXT => sys::VkShaderEXT; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(ShaderEXT);
impl ShaderEXT {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ShaderInstrumentationARM(pub NonZeroU64);
from_by_transmute!(ShaderInstrumentationARM => sys::VkShaderInstrumentationARM);
impl_raw_handle!(ShaderInstrumentationARM: VK_OBJECT_TYPE_SHADER_INSTRUMENTATION_ARM => sys::VkShaderInstrumentationARM; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(ShaderInstrumentationARM);
impl ShaderInstrumentationARM {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ShaderModule(pub NonZeroU64);
from_by_transmute!(ShaderModule => sys::VkShaderModule);
impl_raw_handle!(ShaderModule: VK_OBJECT_TYPE_SHADER_MODULE => sys::VkShaderModule; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(ShaderModule);
impl ShaderModule {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct SurfaceKHR(pub NonZeroU64);
from_by_transmute!(SurfaceKHR => sys::VkSurfaceKHR);
impl_raw_handle!(SurfaceKHR: VK_OBJECT_TYPE_SURFACE_KHR => sys::VkSurfaceKHR; RawSubHandle = Instance);
impl_debug_for_raw_non_dispatchable_handle!(SurfaceKHR);
impl SurfaceKHR {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct SwapchainKHR(pub NonZeroU64);
from_by_transmute!(SwapchainKHR => sys::VkSwapchainKHR);
impl_raw_handle!(SwapchainKHR: VK_OBJECT_TYPE_SWAPCHAIN_KHR => sys::VkSwapchainKHR; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(SwapchainKHR);
impl SwapchainKHR {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct TensorARM(pub NonZeroU64);
from_by_transmute!(TensorARM => sys::VkTensorARM);
impl_raw_handle!(TensorARM: VK_OBJECT_TYPE_TENSOR_ARM => sys::VkTensorARM; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(TensorARM);
impl TensorARM {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct TensorViewARM(pub NonZeroU64);
from_by_transmute!(TensorViewARM => sys::VkTensorViewARM);
impl_raw_handle!(TensorViewARM: VK_OBJECT_TYPE_TENSOR_VIEW_ARM => sys::VkTensorViewARM; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(TensorViewARM);
impl TensorViewARM {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ValidationCacheEXT(pub NonZeroU64);
from_by_transmute!(ValidationCacheEXT => sys::VkValidationCacheEXT);
impl_raw_handle!(ValidationCacheEXT: VK_OBJECT_TYPE_VALIDATION_CACHE_EXT => sys::VkValidationCacheEXT; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(ValidationCacheEXT);
impl ValidationCacheEXT {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct VideoSessionKHR(pub NonZeroU64);
from_by_transmute!(VideoSessionKHR => sys::VkVideoSessionKHR);
impl_raw_handle!(VideoSessionKHR: VK_OBJECT_TYPE_VIDEO_SESSION_KHR => sys::VkVideoSessionKHR; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(VideoSessionKHR);
impl VideoSessionKHR {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}
#[repr(transparent)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct VideoSessionParametersKHR(pub NonZeroU64);
from_by_transmute!(VideoSessionParametersKHR => sys::VkVideoSessionParametersKHR);
impl_raw_handle!(VideoSessionParametersKHR: VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR => sys::VkVideoSessionParametersKHR; RawSubHandle = Device);
impl_debug_for_raw_non_dispatchable_handle!(VideoSessionParametersKHR);
impl VideoSessionParametersKHR {
pub fn new(raw: u64) -> Option<Self> {
NonZeroU64::new(raw).map(Self)
}
pub unsafe fn new_unchecked(raw: u64) -> Self {
Self(unsafe { NonZeroU64::new_unchecked(raw) })
}
}